cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
VJKinstall
Level 3

setText() for ISTextField is not displaying the value

Hello,

In a dialog, I wanted to get the value from a variable in VPD and display in a ISTextField control

My code looks something like this:

String var = context.getServices().getISDatabase().getVaraiableValue ("IS_VAR1");

ISTextField textField = arg0.getISPanel().getTextField ("fieldName");


textField.setText (var);

I tried having the above few lines in

enteredDIALOG ()

&

initializeUIDIALOG () as well.


But the value is not seen in the dialog.

Could someone confirm, what is going wrong and if I need to anything as well ?

Also, which is the correct event to use ? initializeUI or entered ?

Thanks in advance for the help.
Labels (1)
0 Kudos
(2) Replies
gamlidek
Level 4

Try this in your initializeUI method:


String text = context.resolveString("$V(IS_VAR1)");
ISTextField textField = arg0.getISPanel().getTextField ("fieldName");
textField.setText (text);


cheers,

/gam/
0 Kudos
VJKinstall
Level 3

Your reply solved my problem. Thank You.
0 Kudos