aspose file tools*
The moose likes Other Application Frameworks and the fly likes use of checkboxes and tapestry 5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "use of checkboxes and tapestry 5" Watch "use of checkboxes and tapestry 5" New topic
Author

use of checkboxes and tapestry 5

robert polidort
Greenhorn

Joined: Apr 09, 2010
Posts: 11
Hello,

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)

Can you help me resolve this case ?

Regards,
Blured.
Nick Thomas
Greenhorn

Joined: May 26, 2010
Posts: 4
Maybe you're making it too complicated?

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: use of checkboxes and tapestry 5
 
Similar Threads
Retaining value of checkbox when returning back from a servlet
Tapestry 5.1 and multivalued parameters
Accessing a Hashtable by key from template
Newbie: Need help with checkbox post parameters
Multibox reset method ?