cancel
Showing results for 
Search instead for 
Did you mean: 

TextEdit Component

Former Member
0 Kudos

Hello Guys,

I've create a Web Dynpro Application and inside the view I add a TextEdit component with "EMPTY VALUE". How can I set the value "TEST" on the wdDoInit() method on this value in Runtime ? I don't Context parameters.

Like:

TextEdit.setValue("TEST);

I should use a wdControllerAPI or wdComponentAPI ?

Thanks,

Evandro.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Evandro

As Armin mentioned you must bind value property to a context attribute.

Let xxx is the context value of type string.Inside wdDoInit() write:

wdContext.currentContextElement().setxxx("TEST");

You can also use inside wdDoModifyView() this code

IWDTextEdit t= (IWDTextEdit)view.getElement("TextEdit1");
t.setValue("TEST");

but still context binding is needed.

Regards

Ananda

Former Member
0 Kudos

Hey Guys,

I'm creating a TextEdit Dynamically.....I want to set value to this TextEdit dynamically...how do i do it?

Former Member
0 Kudos
wdDoModifyView(...)
{
  IWDTextEdit edit = (IWDTextEdit) view.createElement(IWDTextEdit.class, null);
  edit.bindText("<path-to-context-attribute>");
}

Value in TextEdit will be value in context attribute.

Armin

Answers (2)

Answers (2)

Former Member
0 Kudos

Armin,

I just add the TextEdit on the view. I'm not using Context parameters. I would like set the value on the wdDoInit().

Thanks,

Evandro

Former Member
0 Kudos

Do as I told in my first reply.

Armin

Former Member
0 Kudos

You must bind the "value" property to a context attribute and set the context attribute value.

Armin