12.07.2015 Views

Beginning Java EE 6 with GlassFish 3, Second Edition

Beginning Java EE 6 with GlassFish 3, Second Edition

Beginning Java EE 6 with GlassFish 3, Second Edition

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 11 ■ PAGES AND COMPONENTSBoth buttons and links have an action attribute to invoke a method on a managed bean. To call thedoNew() method of the bookController, use the expression language to specify it in the action attributeas follows:Create a new bookInputsInputs are components that display their current value to the user and allow the user to enter differentkinds of textual information. These can be text fields, text areas, or components to enter a password orhidden data. The input tags are listed in Table 11-11.Table 11-11. Input TagsTagDescriptionRepresents an HTML input element of type hidden (which is useful to propagatevalues outside of the session from page to page).Represents an HTML input element of type password. On a redisplay, anypreviously entered value will not be rendered (for security reasons) unless theredisplay property is set to true.Represents an HTML input element of type text.Represents an HTML text area element.Many web pages contain forms in which a user has to enter some data or log on using a password.Input components have several attributes that allow you to change their length, content, or look andfeel, as follows:327

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!