How can I detect to the textField is empty?

Hello!

I hope this is an easy question:

I would like to check the value:

	if ( textSzures.equals( "" ) ) {
			getWindow().showNotification("the text filed is empty"));
		} else {
			getWindow().showNotification( (String) textSzures.getValue() );
		}	

but it does not work. How can I detect to the textField is empty?

Thanks!

Hi,

if the textfield name is textSzures try

if ( textSzures.getValue().equals( “” ) )

OR

if ( textSzures.getValue().toString().length() == 0)

both should work

Thank you!