why not just

class searchpage extends webpage {
  private PageParameters params;

  private criteria crit=new criteria();

  public searchpage(pageparameters params) {
    this.params=params;

  add(new dataview("results", new dataprovider()) {... });

  form form=new form("form", new compoundproperty(new
propertymodel(this, "crit"))) {
   onsubmit() {
      setresponsepage(searchpage.class, crit.topageparameterrs());
  };
  add(form);
   form.add(new textfield("name")); ....


  }



  private class dataprovider implements idataprovider {
    public iterator iterator(...) {
       return dao.search(params);
   } public int size() { return dao.size(params); }
  }


done

-igor


On Nov 28, 2007 12:34 PM, Gabor Szokoli <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> I'd like to have a search form, which keeps the last submitted search
> parameters in PageParameters in a bookmarkable fashion.
> I am wondering about the "wicket way" of doing this, and I keep coming
> back to an imaginary LoadableDetachableModel variant which would store
> a unique key, and load/store its object value from/to the
> PageParameters.
> I'd appreciate some advice: What would be the nicest way to get hold
> of the pageparameters in the current request from a model, and to set
> one in the next response?
> Or Is there some better way to achieve bookmarkable (partial) form state?
>
>
> Thanks in advance:
>
> Gabor Szokoli
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to