Me: >> However, at any time the user can re-set the options and re-submit, >> causing a completely different DataTable based on a new DataProvider.
Eelco Hillenius: > First of all, ask yourself whether it is a completely different > datatable, or whether the it's just a different model. Suppose it's just a different model. DataTable seems to have no constructor that takes a PropertyModel so that the IDataProvider can change dynamically, nor a method in DataTable to replace the IDataProvider manually. In this case, would you recommend simply to changing the state of my IDataProvider so that "IDataProvider.iterator(first, count)" method returns the new data, and call "DataTable.setCurrentPage(1)"? Me: >> How do I code a page to replace one component with a new one >> in response to user input? (I see plenty of examples of adding >> a component to a page, but only in the constructor -- and no >> examples of removing/replacing a component.) Eelco Hillenius: > If it *is* a completely different datatable and you want to > replace it with something completely different, use panels. > Put your different options in different panels, and use > 'replace' to replace one component with the other. Would that be the "MarkupContainer.replace(component)" method? This method returns a MarkupContainer -- is the return value merely "self" -- a convenience in case you want to replace several components in one line? I can see the motivation for putting my replaceable components in a Panel if the HTML requirements differ. Likewise, if I have enough components to replace that I'd rather not have to replace them one at a time. But if it's just a single component that I'm replacing, is there really any need to put it in its own panel? ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user