cancel
Showing results for 
Search instead for 
Did you mean: 

InputField value setting.

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Please explain in detail what actually you want to do.

what do you mean by controls of view?

Regards

Raghu

Former Member
0 Kudos

Hi,

I mean InputField with control of view.

Thanks.

former_member197348
Active Contributor
0 Kudos

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

Former Member
0 Kudos

HI

What do you want to do from input field.?

If you want to clear the input field then the code in the above post will siffice your requirement.

Please elaborate your question so as to get your problem resolved ASAP.

Regards

Raghu

Former Member
0 Kudos

Hi,

I want to update only input field inside.

I want context inside must stay unchanged.

Thanks.

former_member40425
Contributor
0 Kudos

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

Former Member
0 Kudos

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

former_member197348
Active Contributor
0 Kudos

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

Answers (1)

Answers (1)

Former Member
0 Kudos

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