George Christman wrote:
> 
> Nillehammer, I don't mind. I've been an interface designer for years, so
> moving to the backend I'm rather green. I am very confused with how to use
> annotations in my situation, so I'm going to post a snippet of my code and
> hopefully you guys will be able to help clarify this for me. 
> 
You'll soon discover that the real hard work is needed in the frontend.
Programming the backend is quite a lazy job compared to that. (Don't take
this 100% serious ;-)) ).


George Christman wrote:
> 
> I am very confused with how to use annotations in my situation, so I'm
> going to post a snippet of my code and hopefully you guys will be able to
> help clarify this for me.
> 
Thiago has already provided the code. This just for clarification.

For every event caused by user action (like clicking a link, submitting a
form) and for a lot of events trigered by components (like form's failure or
success) that you want get handeled you use the Annotation @OnEvent. To
narrow down the events you actually want to get handeled you use a) the
event type (the annotation's value-attribute) and b) the event source's name
(the annotation's component-attribute). 

You'll find those in the names of your event handler methods too, e.g.
on*Selected*From*Update*.
So "selected" is the event type and "update" is the event source's name.

For events that are widely used around applications Tapestry provides a
constants class "EventConstants". This should be your first stop. Browse the
constants to get an overwiew of the several events that are triggered. A
second stop would be Tapestry's component reference. You'll find a detailed
explanation of which events are triggered when by each component. Each event
gives you the possibility to hook in by providing a handler.

And if that isn't enough, you can even trigger events of your choice
yourself!

Hope this was helpfull.


-----
http://www.winfonet.eu
--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Form-using-both-a-zone-and-no-zone-tp4635695p4639057.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to