on 11-18-2006 6:59 AM
hi all,
when importing the complex bean model into the webDynpro, it was returning the blank.
Thanks in advance
Hi Srini,
Please go through the weblog for complex bean model.
/people/balaramnaidu.bankuru/blog/2006/04/23/importing-complex-javabean-model-into-webdynpro-by-creating-relationships-for-the-model-classes
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
show your code for see and understand what could be wrong.
Here one mine example:
The model class
/*
* Created on 27-ott-2006
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package tmp.userslist.comp.model.userslist;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.sql.DataSource;
import java.util.Collection;
import java.util.ArrayList;
import java.io.Serializable;
/**
* @author rtagliento
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class AllUsers {
// implements Serializable {
private Connection con;
private ResultSet rs;
private Statement stmt;
private String SqlQuery;
private Collection usersList = null;
private UserElement users = null;
// private Collection empDetailsList=null;
// private EmpDetailsHelperClass empdetails=null;
public AllUsers(){
con = null;
java.sql.ResultSet rs = null;
rs = null;
SqlQuery = "SELECT * FROM TMP_USERSLIST ; ";
}
public Connection getConnection (){
return con;
}
public void setConnection (Connection c){
con = c;
}
public Collection getUsersList()
{
return usersList;
}
public UserElement getUsers()
{
return users;
}
public void setUsers(UserElement class1)
{
users = class1;
}
public void execute() throws Exception {
String DEBUG = new String("");
try {
stmt = con.createStatement();
rs = stmt.executeQuery(SqlQuery);
usersList = new ArrayList();
usersList.clear();
while (rs.next()){
users = new UserElement();
users.setID(rs.getString("ID"));
DEBUG += "ID: " + rs.getString("ID") + " | ";
users.setName(rs.getString("NAME"));
DEBUG += "NAME: " + rs.getString("NAME") + " | ";
users.setSurname(rs.getString("SURNAME"));
DEBUG += "SURNAME: " + rs.getString("SURNAME") + " | ";
users.setBirthDay(rs.getDate("BIRTHDAY"));
DEBUG += "BIRTHDAY: " + rs.getDate("BIRTHDAY").toString() + " ---------- ";
usersList.add(users);
}
rs.close();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
throw new Exception(e.toString() + DEBUG);
}
// throw new Exception(new Integer(usersList.size()).toString() + DEBUG);
}
}
when use it:
AllUsers AllU = new AllUsers();
// AllU.setConnection(myJdbc.getConnection());
wdContext.nodeAllUsers().bind(AllU);
wdContext.currentAllUsersElement().setConnection(myJdbc.getConnection());
try {
wdContext.currentAllUsersElement().modelObject().execute();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Hope can help.
Bye
Hi ,
Could you post what exactly is the error log while importing. It could be checked at Window >> Show View >> PDE Runtime >> Error log. Usually i faced this issue when importer is not able to resolve some of the referenced beans/ classes in its classpath i.e the bean which you want to import if uses some other library's class then all the classes has to be part of the jars which are used for importing. Also there are some enhancements i have seen on the new version of ide . May be you could try that .
regards
Dhawal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.