I use this sentese for refresh my form,
but this not refresh
application.updateUI();
how can I solve this
Thank’s!!
I use this sentese for refresh my form,
but this not refresh
application.updateUI();
how can I solve this
Thank’s!!
Can you explain a little bit more about what you’re trying to do? What do you mean with “refreshing a form”?
Servoy automatically updates the UI, just not when you’re still running a script. If you want to update the UI in the middle of a script you can use application.updateUI(), but this is only useful if your script takes a long time to finish.
Is this how you use it? What exactly is going wrong when you do that?
If you want to update the UI in the middle of a script you can use application.updateUI(), but this is only useful if your script takes a long time to finish.
And when the task is ‘heavy’ application.updateUI() might not give the result you expect…
IT2Be:
If you want to update the UI in the middle of a script you can use application.updateUI(), but this is only useful if your script takes a long time to finish.
And when the task is ‘heavy’ application.updateUI() might not give the result you expect…
the task is not heavy, I have a form to login where the user chooses the language of preference, to choose one of these, the labels should change to the language selected for this and I application.updateUI () being upgraded so that the Form
ahurtado:
the task is not heavy, I have a form to login where the user chooses the language of preference, to choose one of these, the labels should change to the language selected for this and I application.updateUI () being upgraded so that the Form
You don’t need to call application.updateUI() for that, you should see the changes directly if your method is finished.
Do you use i18n? Because changing the locale doesn’t affect the text of labels on forms that are already cached, in that case you have to change that text manually. Can you post your code here?
Joas:
ahurtado:
the task is not heavy, I have a form to login where the user chooses the language of preference, to choose one of these, the labels should change to the language selected for this and I application.updateUI () being upgraded so that the FormYou don’t need to call application.updateUI() for that, you should see the changes directly if your method is finished.
Do you use i18n? Because changing the locale doesn’t affect the text of labels on forms that are already cached, in that case you have to change that text manually. Can you post your code here?
Yes, i use i18n, my code is
function setLanguage()
{
var _button = application.getMethodTriggerElementName()
var _language = utils.stringReplace(_button, ‘_des’, ‘’)
globals.svy_sec_setUserProperty(‘nav_language’,_language);
lang = _language
i18n.setLocale(lang, i18n.getCurrentCountry())
setFlags()
application.updateUI()
}
i refresh the form after selecting the leguage
how do you “change the text manually”?