cancel
Showing results for 
Search instead for 
Did you mean: 

Change the value of TextView dynamically from wdDoInit() of view

Former Member
0 Kudos

Hi

Could you pls. let me know how to change the Text value of TextView UI Element dynamically from wdDoInit() or any other method in View class.

Thank You!......

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Bind the "text" property to some context attribute and change the value of this attribute.

Armin

Former Member
0 Kudos

Thanks Armin, it solved my problem.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

If you need to change the text view value dynamically everytime then you need to do this in wdModifyView.

wdDoInit will be executed once at a time but the wdModifyView will run everytime whenever you do any operation.

Thanks

Kanai.

Former Member
0 Kudos

No. The text should be accessed via the context and this can/should be done in any controller method and not in wdDoModifyView().

Armin

Former Member
0 Kudos

Hi Kennai

Thanks. ya i understand that.

Actually i made 2 context variables va_first_name and va_last_name. I have set these values in wdDoInit or wdDoModifyView method.

Now thing is i want to display both first name and last name in one textView but at design time we can only assign single context variable

Pls let me know how to solve this issue...

Thanks...

Former Member
0 Kudos

Just add another attribute that stores the concatenation. A calculated attribute could be useful here.

And don't use wdDoModifyView() to change those context attribute values.

Armin

Former Member
0 Kudos

Thanks Armin. It's done