Alright, I suppose can add a context. But I find that it's not only the
"Product" that's null, but also stuff like zones.
What I have, is a component inside a loop. Now within the component, I
have a zone that I want to update as follows:
<t:loop ...>
<t:zone t:id="overviewOfStuff">
<t:actionLink t:id="refreshMe" t:context="product.id"
zone="overviewOfStuff"> ... </t:actionLink>
</t:zone>
</t:loop>
Because it's in a loop, the zone id changes every iteration.
The above piece of code would not actually refresh the zone, but only
the first zone in the loop. I can change it to:
<t:loop ...>
<t:zone t:id="overviewOfStuff">
<t:actionLink t:id="refreshMe" t:context="product.id"
zone="${overviewOfStuff.clientId}"> ... </t:actionLink>
... a list of stuff ...
</t:zone>
</t:loop>
Obviously I need property bindings to @InjectComponent @Property Zone
overviewOfStuff;
This works, but when I press refresh, the event handler of the component
is called and obviously, Zone is null. There is also no way to retrieve
the client Id.
Right, how do I do it?
Regards,
Tom.
Op 15-12-2010 13:18, Igor Drobiazko schreef:
Because the product set inside the loop is lost, when the user clicks on the
ActionLink. You need to provide a context for your ActionLink in order to
restore the state.
On Wed, Dec 15, 2010 at 1:13 PM, Tom van Dijk<t...@tvandijk.nl> wrote:
Hi,
In an application, I'm making an editor for products in a group and my
client wants everything in one page. So, there are product groups, with
products in each group and every product has a number of subproperties, and
so on (4 levels deep). So what I get is a loop inside a loop inside a loop.
I have a loop with a custom component in it:
<tr t:type="loop" source="group.products" value="productInLoop"
<t:productEditor product="productInLoop"/>
</tr>
The Product Editor has
@Parameter (required=true) Product product;
Now the Product Editor component has an actionLink, and in
onActionFromActionLink, product is null.
Why?
Sincerely,
Tom.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.or
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org