on 08-17-2009 3:26 PM
Hi,
I'm developin webdynpro java application. controls ofv view has context mapped. I want to clear inside of controls directly.
Is it possible while they are linked to the context.
Thanks.
Hi
Please explain in detail what actually you want to do.
what do you mean by controls of view?
Regards
Raghu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Cemil Bozlagan,
We can clear the values inside the control.
e.g. If your InputField is bound to some context attribute (say attrib1), we can clear it value like
wdContext.currentContextElement.setAttrib1("");
Like this, we can clear any UIElement value but make sure the code is written in appropriate action handler.
Regards,
Siva
Hi,
I guess you do not want to clear your context attribute because you may need the value of this context attribute somewhere in your code. then you can do one thing you can store value of this context attribute in a different variale or in a new context attribute before making it null. Now you can set your attribute with old value(which one you have saved in variable or attribute ) where ever you want. Now again you will be having the same value before clearing the attribute.
I hope it helps.
Regards,
Rohit
Hi Cemil Bozlagan ,
Suppose u have an attribute called attr1 which is binded to input field. Create another attribute say attr2.
When u want to change the i/p value, do this.
String value=wdContext.currentContextElement.getAttr1();//get the value from attr1
wdContext.currentContextElement.setAttr2(value);//set it to attr2
wdContext.currentContextElement.setAtt1("new value");//set new value to attr1,so that the i/p value could be changed.
Now u can use value of attr2 which is the previous one.
Regards,
srikanth
Hi Cemil Bozlagan,
I want to update only input field inside.
I want context inside must stay unchanged.
For this purpose, you need to use 2 different attributes as in the other two posts. But I suggest opposite approach what they told.
Create a temporary variable and bind it to the input field. Once the user enters the value copy this value into your context attribute which you want unchanged. Then you can clear/update the input field.
wdContext.currentContextElement().setAttribname("anyvalue or blank");
Regards,
Siva
Hi expert,
if you want to clear the input value then you ahve to do ane thing,write some cod ein wdDoModify method
wdDoModify(.....................boolean firstTime){
wdcontext.current<Node>Element().set<ContextAttrribut>("");
}
I think it will refresh input value while you licked to any context .
Thanks
Jati
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.