On Mon, 15 Feb 2010 03:51:08 -0200, Nathan Kopp
<nathan0...@nathankopp.com> wrote:
This looks like a bug in your code, most probably by working in a T4-ish
way in T5.
Well, it's certainly a "bug" in that I'm trying to do something that T5
doesn't seem to handle out-of-the-box.
I disagree. A bug is something that doesn't work like it should. In this
case, it could be the lack of a feature, not a bug. Or just lack of T5
experience. :)
First, I need to rely on a loop variable. Period. The component exists
in the context of one iteration of the loop. Without the loop variable,
the
component wouldn't need to exist.
I didn't meant to remove the loop variable, just not using it when
handling events.
I'll rephrase my problem like this: "I
need to rely on the loop variable, but it is null when tapestry processes
the click from the eventlink, so I need to find a way to make it not null
while tapestry processes that eventlink click... and specifically make it
equal the a value for a specific iteration through the loop... the
iteration that was occurring at the time the eventlink was being
rendered."
You'll won't have a nice solution for that because, in an event request,
the loop is not rerendered, so the loop variable is not set. That's how T5
works. You need to find the solution in another way, most probably using
the context of an EventLink.
3) context for eventlink, actionlink, and form;
#3 wont' work because my loop is not happening at the evenlink level, but
rather at an intermediate level
There's no such thing as an EventLink level. Events bubble from inside to
outside. Just pass all the needed info in the context. Inside your
component, create an event handler method for the event.
And don't forget that the EventLink context is independent from the page
activation context. ComponentEventRequestParameters has two contexts: the
page one (getPageActivationContext) and the event one ().
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, software architect and developer, 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