on 04-02-2008 12:28 PM
Hi All,
I am trying to complete the Integrating EJB 3.0 into Web Dynpro Using the EJB Model Importer tutorial that goes with SAP NetWeaver Composition Environment 7.1 SP3 Developer Studio.
Does anyone ever completed this tutorial because I have problems completing it. The result is very important for me because I need to use this technology for my essay.
In this tutorial you create a button that calls the method StudsBean.getStudent(String). In this method the object student is created and it will be returned. In several labels the information of the returned student should be displayed. But that doesnt happen, when I push the button no error occurs but the labels are still empty. When I try to debug the Enterprise Bean and Web Dynpro application I see that the method StudsBean.getStudent(String) is called and the propertys are set and the student object is returned, but still it isnt displayed.
After discussing this with a colleague I tried to search for a solution on the SDN and of course Google. First I thought I would be a bug but I only found 2 people with the same problem. I found it remarkable because its one of the key subjects of Java EE 5 and its a tutorial displayed in the welcome page of the Developer Studio.
So do you people think its a bug in WebDynpro? Because I am sure that I followed all the steps mentioned (a colleague checked it even).
Regards,
Sander
Hi Sander,
Do you invalidate the Response:
wdContext.nodeResponse().invalidate();
You need to do this in order the UI to be refreshed. This is mandatory for context elements with cardinality ONE.
Have you happened to check for any exceptions caught in the WD application code?
Best regards,
Vesselin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vesselin,
Thank you for the quick replay, this is the code I'm using:
public void onActionGetStudent(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionGetStudent(ServerEvent)
try {
// executes the corresponding method on the session facade
wdContext.currentRequest_StudsLocal_getStudentElement().
modelObject().execute();
// forces Web Dynpro to re-create the Request model object
// in order to clear the InputField
wdContext.nodeRequest_StudsLocal_getStudent().invalidate();
// updates the UI elements bound to the Response node
wdContext.nodeResponse().invalidate();
//Code for trying something out
//wdContext.nodeReturn().invalidate();
//wdContext.nodeAddress().invalidate();
} catch (Exception e) {
throw new RuntimeException(e);
}
Have you tried this example yourself, or is replay based on experience?
Kind Regards,
Sander
Hi Sander,
Yep, I've tried the same example by myself. And it works fine.
I think I have seen similar issues reported - can you please try commenting the line when the Request is invalidated? If does not help - you can also try skipping response invalidation... But first only the Request
Cheers,
Vesselin
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
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.