Hi All
I want to track the order of list items that are re-ordered via
javascript. My proposed solution is to do something like this:
<html jwcid="@Shell" title="literal:Reordering Test Page">
<body jwcid="@Body">
<form jwcid="@Form">
<ul>
<li jwcid="@For" source="ognl:items"
value="ognl:currentItem">
<span jwcid="@Hidden" value="ognl:currentItem.index"
/> <!-- index simply identifies the order -->
//various item data displayed for user
</li>
</ul>
</form>
</body>
</html>
When the items are re-ordered, I'd fire of a javascript function, prior
to submission, that runs over the list and updates the hidden values so
that they again run from 1...n.
Now, on post back, the item.index properties will be updated and the
model thus re-ordered.
The problem with this is that Tapestry groups all hidden fields at the
start of their containing form control. Because they are outside of the
list I cannot (easily) update them based on the new order.
Is there are reason that Tapestry moves these controls? As far as I can
tell, it is perfectly legal to place an input control of type hidden
within any inline or block content.
Thanks
Richard Hoberman
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]