code sample icon Sample Code

In the source editor, add the following code to the file.

Replace:

                               
 // Add event code here...
  return null;
                            

With:

                               
  if (inputText1.getValue().toString().equals("guest"))
     return "success";
  else
     return "failure";
                            

You can replace "guest" with whatever name you'd like.

Instead of typing the sample code, you can copy the code in this window and then paste it into the source editor.

Copyright © 1997, 2009, Oracle. All rights reserved.

false ,,,,,,,,,,,,,,,