Updating label of a text field is not reflecting in ui.

Hi I have a text field and I need to update the caption after text box is initiated. I am using setCaption() method of text field to do this. But the new caption is not refreshed in UI. I found in one of the thread that I need to invoke UI.getcurrent().push()… Is it safe to call this method? what is the correct way to update the caption of a UI element?

I found in one of the thread that I need to invoke UI.getcurrent().push()… Is it safe to call this method?

Usually you do not need to use manual push, instead just add @Push annotation in your main UI class. The system will push changes automatically.