Yes, you're on your own for this use case : you need to manage a presentation model that encapsulate your "pure" domain model.
Or, you could try to subclass the DataView in order to not remove() the elements but instead just play with their visibility. But I'm not sure it's that easy to do, and also it will depend on the size of the list your displaying, since this will imply to keep a lot of components in session ... On 1/11/06, Johan Compagner <[EMAIL PROTECTED]> wrote: > ahh ok > then you need 1.2 > so that you can use SubmiLinks in a page navigator (you need youre own then) > > Because when you go from one page to another you need to submit the form. So > you can't use regular links but you have to submit the form > the checkboxes are on and then go on. > > But this can be a tricky situation because you have a list that builds up > the components everytime you render it. > So you can't store the state in the component itself you have to push it to > a model when a paging link is clicked. > > > johan > > > > On 1/11/06, karthik Guru <[EMAIL PROTECTED]> wrote: > > > > The html shows this link..for page navigator. So its not a form submit and > hence the model will not get updated when navigating? > > > > <a > href="/WicketWorld/app?path=0:navigator:navigation:0:pageLink&version=3&interface=ILinkListener" > wicket:id="pageLink"> > > <span wicket:id="pageNumber">1</span> > > </a> > > > > page1-> select checkbox ->navigate to page2 through page navigator -> > navigate to page1 again (Now checkbox selection state in page1 is lost since > the model for checkbox never got updated when moving to page2) ? > > > > Is my understanding wrong? > > > > > > On 1/11/06, karthik Guru <[EMAIL PROTECTED] > wrote: > > > > > > Looks like am missing something. I'm holding on to the state in a model > and DataView reads that state when displaying for the first time. But does > wicket update that when navigating across pages? Because I dont see that > happening. > > > > > > For eg , > > > > > > > > > << <1 2 3> >> > > > [id] [name] [select] > > > 1 hello1 checkbox > > > > > > 2 hello2 checkbox > > > > > > 3 hello3 checkbox > > > > > > If user selects the checkbox corresponding to [id] 1, and then moves to > page '2' and comes back to '1', the selection is lost. > > > Please do let me know if am missing something really basic here. I'm > using DataView with PagingNavigator. > > > > > > > > > > > > On 1/11/06, Johan Compagner <[EMAIL PROTECTED] > wrote: > > > > You should hold on to the data in a model. > > > > > > > > johan > > > > > > > > > > > > > > > > > > > > On 1/11/06, karthik Guru <[EMAIL PROTECTED] > wrote: > > > > > > > > > > One of the columns in my table (DataView) is a checkbox. I have > paging enabled through PagingNavigator and it works fine. I had a question > on retaining the checkbox state when paging. Right now if user checks a > checkbox and navigates to other pages using the paging navigator, by the > time he comes back to the first page, his selection is lost. > > > > > Does the underlying model get updated when paging? It looks like a > link and i doubt if it gets updated. Does it come down to how to submit a > html page when a link is clicked? How do i retain the checkbox state while > the user is navigating? > > > > > > > > > > thank you, > > > > > karthik > > > > > > > > > > << <1 2 3> >> > > > > > [id] [name] [select] > > > > > 1 hello1 checkbox > > > > > > > > > > 2 hello2 checkbox > > > > > > > > > > 3 hello3 checkbox > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37&alloc_id865&op=click _______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user
