Thursday, April 16, 2009

ENGLISH BEST LINK

Hi Friend

I have found this is the one of the best link for English Communication.Please try it by clikcing below
English Communication

Friday, April 3, 2009

AJAX

1.What is expanstion for AJAX?
AJAX = Asynchronous JavaScript and XML


2.How Ajax Loads the data without relaoding the page?
Ajax Uses XMLHttpRequest object which directly interacts with seb server.

AJAX uses asynchronous data transfer (HTTP requests) between the browser and the web server, allowing web pages to request small bits of information from the server instead of whole pages.

Wednesday, April 1, 2009

Back Base Steps

Steps to Implement BACKBASE

1.Install Jar
backbase-dataservices-core-1.1.0.jar—core functionality
backbase-dataservices-servlet-1.1.0.jar—servlet bridge classes
2.Set Up Dataservice - add in Servlet web.xml
<display-name>datamodule-web-example</display-name>
<servlet>
<servlet-name>datamodule-web-example</servlet-name>
<servlet-class>
com.backbase.datamodule.servlet.DatamoduleServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>datamodule-web-example</servlet-name>
<url-pattern>/data/*</url-pattern>
</servlet-mapping>
3.Client-Side Implementation
Data Source Definition
Widget Binding
4.Add datamodule-config - for Pagination

Tuesday, March 31, 2009

Hibenate Coding Steps

Steps to Code Hibenate :
1.Edit hibernate.cfg.xml :
Hibernate uses the hibernate.cfg.xml to create the connection pool and setup required environment. Add an Entry for ???.hbm.xml

2.Create Table in databse

3.Create POJO Class which contains getter and setter method

4.Map Table Column vs POJO Class in .hbm.xml

5.Write Client Program

SessionFactory factory=null;
Session ses=null;
Transaction tx=null;
try
{ factory=new Configuration().configure().buildSessionFactory();
ses=factory.openSession();
tx = ses.beginTransaction();
ses.save(emp);
tx.commit();
}
catch (Exception e)
{
}

Monday, March 30, 2009

JavaScript

How to set Select a particular value when Select box is loaded?

1.Find Length of Select Box.
document.mtstafftransferform.qualification.options.length
2.Loop through
a)get the value of combobox
var val = document.mtstafftransferform.qualification.options[i].value;
b)match option value with value whihc needs to selected.
3.If matches
select the value selected
document.mtstafftransferform.qualification.selectedIndex=i;


Example :

<SCRIPT language=JavaScript type=text/javascript>
var qualify ="MATHS";
var comp_len = document.mtstafftransferform.qualification.options.length;
for (i=0; i<comp_len; i++)
{
var val = document.mtstafftransferform.qualification.options[i].value;
alert(""+val);
if(val == qualify)
{
document.mtstafftransferform.qualification.selectedIndex=i;
}
}
</SCRIPT>

Thursday, March 26, 2009

Tuesday, March 17, 2009

Hibernate Important Interview Question

1.What is O-R Mapping?
2.What is the difference between createCriteria and createQuery in Hibernate?
3.How would you implement on deletecasecade in Hiberante?
4.How Inheritance Implemented in Hiberante?
5.Is one Bean class can be involved with more than one relationship?
For example 1 class may have 1 to 1 and 1 to many
6.How do define compound primary key?
7.How to implement Oncasecasde deletion?
8.What is cascade="all"

Code Examples :

What are the steps to be followed to implement 1 to 1 database insert/update/delete?

Pre - Request :
Check we able to connect databse through Sample JSP program.

Step 1:

Table and Bean :

Create master table and Child table
Create bean for Master and Child table. Here Both Bean should contain gettter and setter value of other bean.


XML Entry :

In Master

Apart from XML Entry, There should be map to child table

<one-to-one name="<<Childtablename>>" class="<<ChildtableClass>>" cascade="all" />

<one-to-one name="employeeSalary" class="EmployeeSalary" cascade="all" />

Note : it refers only the class

In Child table

refer the master table's as below

In reference key column,

a)metioned generator class =foreign then mention property name
b)define one to one with property name and Class