on 09-20-2005 1:35 PM
HI All,
when I run webdynpro application first time thejava objects are not instatiating (java objects may be have database operation) .I am instatiating the java objects in the following section
/*
The following code section can be used for any Java code that is
not to be visible to other controllers/views or that contains constructs
currently not supported directly by Web Dynpro (such as inner classes or
member variables etc.). </p>
*
Note: The content of this section is in no way managed/controlled
by the Web Dynpro Designtime or the Web Dynpro Runtime.
*/
//@@begin others
com.sap.service.dao.UserDAO userdao = new com.sap.service.dao.impl.UserDAOImpl();
//@@end
The problem is if I run application first time not getting any data from java classes.If I refresh or click on other application link or action then only java objects are instatiating.
where actully we have to instantiate the Java Object in WDInit() method or java section of webdynpro.
please help.
Hi Mohammad,
Initialize your Java objects inside view's init method if those objects are only useful to that view. But, if you want to initialize thse objects before any view calls then you have to initialize your objects in Component controller's init method.
Regards,
Bhavik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mohammad,
You can initialize your java object too in your wdDoIniti() method.
Declare your object in the others section like
com.sap.service.dao.UserDAO userdao = null;
Then inside your wdDoInit() you can instantiate it like
userDAO = new com.sap.service.dao.UserDAO();
Hope this helps,
Best Regards,
Nibu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.