on 06-10-2008 10:16 AM
Hi there,
I have to create a Java webdynpro application which reads data from MS SQL and show the data on the screen.
I'm also required to create a model based on EJB, because I need to use EJB's as a layer between the DB and my application.. Can someone tell me how to proceed?
Does someone have a tutorial concerning this?
Inputfields on the screen:
u2022 Store
u2022 ProductType
u2022 Depot
u2022 DeliveryDT
Thanks
Kind regards
May be u can use this as refrences
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Following is a sample app
Regards
Ayyapparaj
Thanks Ayyapparaj.
I've created 2 java classes:
1) class Book with attributes Title & Author
/*
* Created on Jun 10, 2007
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package javabeans;
/**
* @author AllanDu
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class Boek {
public String titel;
public String auteur;
public Boek(){
titel = "titel_"+Math.random()*100;
auteur = "auteur_"+Math.random()*100;
}
public String getAuteur(){
return auteur;
}
public String getTitel(){
return titel;
}
public void setAuteur(String sauteur){
auteur = sauteur;
}
public void setTitel(String stitel){
titel = stitel;
}
}
2) Class DemoJavaBeanDao in which a collection of these Books will be kept. This collection should then be filled in the execute method.
/*
* Created on Jun 10, 2007
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package javabeans;
import java.util.ArrayList;
import java.util.Collection;
/**
* @author AllanDu
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class Demo_javabean_dao {
public Collection Boeken = new ArrayList();
}
One thing I just cannot understand is how to do the relations between the javabeans & why. Could someone help me out with this?
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Allan,
Here also try going through this document:
The link was not working earlier when I replied to your other thread. Check now.
You can create the EJB which talks to the MS SQL server. Then you can use this EJB as a Model in your Web Dynpro (as is explained in the document provided by Ayyapparaj in his reply above)
Bye
Ankur
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.