PDA

View Full Version : setText() for ISTextField is not displaying the value



VJKinstall
03-10-2006, 12:15 AM
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.

gamlidek
03-10-2006, 01:57 PM
Try this in your initializeUI method:



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

cheers,

/gam/

VJKinstall
03-20-2006, 08:06 AM
Your reply solved my problem. Thank You.