on 01-12-2007 12:01 PM
Hi,
how can I change the context mapping of a label at runtime (by code)? I have a label and like to use it for displaying different "Model attributes" from different "Model Nodes" depending on some conditions.
Thanks a lot.
Regards,
Henning
In the IWDmodify view you can change the binding of any UI elements
IWDLabel lb1 = (IWDLabel) view.getElement("Label");
IWDAttributeInfo attrinfo = wdContext.getNodeInfo().getAttribute(IPrivateHelloWorldView.IContextElement.CA__SECOND);
lb1.bindText(attrinfo);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anoop,
sound like the solution I am looking for.
But how must I call the method out of my custom controller in detail?
I need to deliver some parameter values.
- IPrivateXSSPortalApplicationMainView wdThis
- IPrivateXSSPortalApplicationMainView.IContextNode wdContext
- com.sap.tc.webdynpro.progmodel.api.IWDView view
- boolean firstTime
But what must I pass to these varaiables in detail?
Thanks a lot.
regards,
Henning
com.sap.tc.webdynpro.progmodel.api.IWDAttributeInfo is to be imported..
Regards
AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
com.sap.tc.webdynpro.clientserver.uielib.standrad.IWDLabel. is to be imported.
No particaular jar files to be added
you do one thing type IWD and after that press ctrl and space together...
you may get all the UI element type.
Regards
AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Simply copy the code from Anoop post and past your WDModifyview() method
it showing some errors for that you can do simple ctrlshifto or right click the mouse there source->ogranizeImports might helps you.
there change your label name "Label" what u mention in the design of ur View.
thanks,
Lohi.
Message was edited by:
Lohitha M
doModify will be inviked after each and every action in the view..
Regards
AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ok, that it is called on each action sounds good. Then there will be no need to call it from the controller.
But now I have another problem.
The type "IWDLabel" is unknown and can not be resolved. Even after trying to organize the imports.
Do I need to add a special import/external jar?
Thx.
Henning
do u mean that u have to invoke the doModify() from Custome controler.
is there any particular intension to do that...give me ur exact requirement.
Regards
AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.