On 4/30/07, Martin Grotzke <[EMAIL PROTECTED]> wrote:
On Mon, 2007-04-30 at 23:55 +0200, Martin Grotzke wrote:
> hi igor,
>
> i hope i got the idea now. i post my beans here,
aehem, sorry - forgot to include SearchResultsView:
public SearchResultsView(String id, PropertyModel model ) {
super( id, model );
final String query = (String) getModelObject();
final List<? extends Product> products =
((StealthShopApplication)getApplication()).getSearchService().find( query );
setList( products );
the above isnt right because the list is refreshed only when the
searchresultsview is created - which only happens once.
instead
class resultsmodel extends abstractreadonlymodel {
private imodel query;
public resultsmodel(imodel query) { this.query=query; }
public object getobject() {
return
((StealthShopApplication)getApplication()).getSearchService().find(
query.getobject() );
}
public void detach() { query.detach(); }
}
setmodel(new resultsmodel(model));
that way listview will get fresh results every page refresh
-igor
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user