On 9/9/06, Erik Brakkee <[EMAIL PROTECTED]> wrote:
Igor Vaynberg wrote:
> that is an inelegant approach imho, this is how i would do it
>
> [...]
>
Ok that approach is clear. Although it would also be nice just to have
an API call for just accessing the items shown on the page.

in wicket we use models to glue components to properties just so we dont have to go through components and see their values. in this example the components drop off their selection in a set for you so you can just traverse the set.

what you want is already there, see MarkupContainer.visitChildren() - but in order for this to work you will need to know what entity the checkbox is tied to. this is much less elegant imho because the likely scenario is that you will build the set yourself by visiting these components anyways.

>
> then after the form submit read the selected set for selected ids. if
> you have paging you need to write your own navigator that uses
> submitlink instead of link....or use an ajax checkbox
I don't understand this why does this have anything to do with paging?

checkboxes are form components in html - in order for you to get their value on serverside the form has to be submitted. the paging navigator by default uses regular anchor links, when pressed they will not submit the form and so you will lose your selection from that page.

-Igor


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to