Re: Triggered event check on page
You want to generate two links that are handled differently. Either put a context value into each EventLink, or switch to ActionLink which makes it easy to distinguish the two, by component id. Got duplicate code? Refactor it into a common method. 2011/7/28 Михаил Слободянюк : > Hi! > If you want debug event call order read > http://tapestry.apache.org/logging.html Component Event Debugging part > > Mihail. > > 2011/7/28 nillehammer > >> It sounds like this could be achieved by providing two event handlers, one >> for each button code could look like: >> @OnEvent(value="firstEventLink'sEventValue") >> final void/Class/Block/Object displaySpecialValue(final MarkupWriter >> writer) >> { >> . >> } >> >> @OnEvent(value="secondEventLink'sEventValue") >> final void/Class/Block/Object displayAnotherSpecialValue(final MarkupWriter >> writer) { >> . >> } >> >> - >> http://www.winfonet.eu >> -- >> View this message in context: >> http://tapestry.1045711.n5.nabble.com/Triggered-event-check-on-page-tp4642223p4642318.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 >> >> > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Triggered event check on page
Hi! If you want debug event call order read http://tapestry.apache.org/logging.html Component Event Debugging part Mihail. 2011/7/28 nillehammer > It sounds like this could be achieved by providing two event handlers, one > for each button code could look like: > @OnEvent(value="firstEventLink'sEventValue") > final void/Class/Block/Object displaySpecialValue(final MarkupWriter > writer) > { > . > } > > @OnEvent(value="secondEventLink'sEventValue") > final void/Class/Block/Object displayAnotherSpecialValue(final MarkupWriter > writer) { > . > } > > - > http://www.winfonet.eu > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Triggered-event-check-on-page-tp4642223p4642318.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 > >
Re: Triggered event check on page
On Thu, 28 Jul 2011 08:33:12 -0300, tr3pek wrote: Hi, Hi! is there a way to check which event brought me to particular page? Events are always local to a given page. Shortly: I have one page with two buttons. Each one is an EventLink. After clicking on each of them an event is thrown and I stay on the same page, but I want to display some content in case first button was pressed - not in the other case. Is there a way to check which event was triggered withoud adding additional parameters? Your first question makes it seem that you're talking about going from one page to another, now the above paragraph is all about a single page. Quite confusing. If your question is about navigation from one page to another: No, unless you store this information in a session state object. Otherwise: Use the context parameter or give each EventLink a different event name and have two separate event handler methods, one for each. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Triggered event check on page
Hi, is there a way to check which event brought me to particular page? Shortly: I have one page with two buttons. Each one is an EventLink. After clicking on each of them an event is thrown and I stay on the same page, but I want to display some content in case first button was pressed - not in the other case. Is there a way to check which event was triggered withoud adding additional parameters? Regards -- View this message in context: http://tapestry.1045711.n5.nabble.com/Triggered-event-check-on-page-tp4642223p4642223.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
Re: Triggered event check on page
It sounds like this could be achieved by providing two event handlers, one for each button code could look like: @OnEvent(value="firstEventLink'sEventValue") final void/Class/Block/Object displaySpecialValue(final MarkupWriter writer) { . } @OnEvent(value="secondEventLink'sEventValue") final void/Class/Block/Object displayAnotherSpecialValue(final MarkupWriter writer) { . } - http://www.winfonet.eu -- View this message in context: http://tapestry.1045711.n5.nabble.com/Triggered-event-check-on-page-tp4642223p4642318.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