This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I've got some problemes with checkbox & t5 for a while. I'd just like to display a page which could contains some checkbox, then submit this page in order to treat the various item corresponding to the ticked checkbox then redirect to the same page with the same checkbox ticked. It is simple with JSP however seems complicated to me to realize with T5
Howard Lewis Ship advise to use the http request without using t5 component in this cas. That was I've done. However for the display when returning to this page after submission documentField.checked is always to false
Perhaps I'm missing something moreover I think I'm making a "usine à gaz".
On the onActivate() I've got :
on the onSuccess() :
on the getDocumentField()
It sux cause getDocumentField() is called much more times than the item displayed. Is it the good way to go ?
If I use a t:checkbox component I see that there isn't a selected property as in T3 for knowing which one is selected.http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/Checkbox.html)
You might try changing all the other loops to formState="values" or just volatile="true". When checked="documentField.checked", Tapestry sets documentField.checked to true, is this all you're trying to do? Then in onSuccess():
If you want the changes to show up the next time the page is refreshed, you have to persist them in a database and load them again in setupRender(), or mark them with @Persist.