on 10-07-2005 8:13 AM
Hi,
I created a JavaBean with properties, getters and setters and a few other methods (addRecord, deleteRecord etc.). I'm using this bean to insert & update data on a Oracle database.
I created a model from this JavaBean, added it to used models and did the context mapping.
I can see the getters and setters fine, but the other methods do not show up.
What should I do to get these methods visible to WebDynpro ? Should these methods be of certain type or should I add them somwhere (to methods in the JavaBean model in dev studio maybe ?) to be visible ?
Any help greatly appreciated!
Kind Regards,
Jari Pakarinen
Message was edited by: Jari Pakarinen
After import JavaBean model and connecting in data modeler, try applay model to view. It's work fine.
In controller you can bind that model puting code in controller wdDoInit()
try {
MyObject myobject= new MyObject();
myobject.callSomeMethod();
wdContext.nodeMyNode().bind(myobject);
} catch (Exception e) {}
When you want to call some method, make action and in action method put
wdContext.currentMyObjectElement().modelObject().callMethodFromMyObject();
wdContext.nodeMyNode().bind(wdContext.currentMyObjectElement().modelObject());
I hope it will help you.
Regard
Vedran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi again
Should I just use the JavaBean straigth from the view of component controller and leave the model thingy out of the picture ?
What are the pros/cons here ?
Regards,
Jari
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 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
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.