[ 
https://issues.apache.org/jira/browse/TAP5-1412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12981621#action_12981621
 ] 

Mark Shead commented on TAP5-1412:
----------------------------------

I did find a way to do this by using a multi-zone update and adding the client 
side ID of the zone to update, but instead of using the java side reference to 
the zone to render using a string with the text desired.

I'd still like to suggest putting a context parameter on the zone if it is 
something that would be possible.

> Update Multiple Individual Zones Within A Loop
> ----------------------------------------------
>
>                 Key: TAP5-1412
>                 URL: https://issues.apache.org/jira/browse/TAP5-1412
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.2.4
>            Reporter: Mark Shead
>            Priority: Minor
>
> This is a use case that I cannot seem to find a way to do with Tapestry.  I 
> have asked on the list and there haven't been any suggested work arounds so 
> it might be a use case worth considering as an improvement.
> Given a form that contains a list that contains a zone there does not appear 
> to be anyway to update specific zones (from the loop) using the context at 
> which the zone was rendered.  For example:
> |__QTY__|_ITEM__|__PRICE___|
> |__1_____|_soup__|____$1____|
> |__3_____|_peas__|____$3____|
> Assume that the price  for each item is in a zone and the qty is in a text 
> box.  As the user changes the qty, the price should change to reflect the 
> correct price for that number of items.  This works fine.  However, if there 
> is some type of qty discount (buy 5 items get 10% of normal pricing) we can't 
> have a change from the soup qty text box update both the soup price and the 
> peas price without sticking the entire loop in a zone. (Sticking everything 
> in the zone will work in some cases, but there are others where you'd want to 
> build a multizone update to update the sections that need to be changed.)
> The ideal situation would seem to be to give the zone a context parameter--in 
> this case item.  When the zone is updated, it would make sure that the 
> property used as the context was set back to whatever value was used when the 
> zone was originally rendered. I'm not sure this would be possible because we 
> are talking about a context that is present on the target of the update--not 
> the trigger.
> Is something like this possible or is there another approach that will let 
> you update specific zones that are rendered within a loop?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to