SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 71 | Next

Alexander Kolesnikov

"Tapestry 5: Building Web Applications"


Please note the t:value="message" attribute of the TextField. This is where the
component is bound to a property of the page class (there is no such property yet, we
shall create it in a moment).
When Tapestry renders the page (produces an HTML content to be sent to the user's
browser), it asks each component on that page to render itself. The expansions will
then insert the values of some properties, the PageLink will become a link to another
page, and when it comes to the TextField component, it will render itself as a text
box (more precisely, as an HTML control). However, should
this text box be empty, or should there be some value in it? To find this out, Tapestry
will have a look at the TextField's value parameter. In our case, its content is
"message", which means, the component is bound to the message property of the
page, and Tapestry will call the getMessage method of the page class to find out
whether to display something in the text box.
Let's say the user has typed some text into the text box and clicked on the Submit
button. The contents of the form will be sent back to Tapestry. Tapestry will take
the content of the text box and understand that this is the value for the TextField
component.


Pages:
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
AVON Konsultantka Oferty Pracy Ciastka lampy witrażowe szkolenia językowe dla firm