On 4/30/07, Martin Grotzke <[EMAIL PROTECTED]> wrote:

On Mon, 2007-04-30 at 15:23 -0700, Igor Vaynberg wrote:
> if you want to maintain the bookmarkable url then no. but this is
> atypical of how wicket lifecycle usually works.
ok. do I have to take anything in acount if i use wicket in this
atypical way?


noep, nothing special to watch out for.


however, until now it feels very good to work with wicket, even
with this more action/mvc like (stateless) aproach... :)


it feels even better once you use the normal lifecycle :)

-igor


the model i showed is better because if you reuse the
> searchresultsview outside of this lifecycle you are creating it will
> still work properly, but if you have no plans on reusing it then i
> guess what you do will work too.
ok, i'll keep that in mind.

thanx a lot for your help,
cheers,
martin


>
> -igor
>
>
> On 4/30/07, Martin Grotzke <[EMAIL PROTECTED]> wrote:
>         On Mon, 2007-04-30 at 15:07 -0700, Igor Vaynberg wrote:
>         > 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.
>         hmm, but the SearchPage is created for each request, that
>         shows a
>         LOG.debug( "Creating new SearchPage with params " +
>         parameters );
>         that I added to the constructor of the SearchPage.
>
>         this should be caused by the onSubmit implementation of the
>         SearchForm:
>
>             protected void onSubmit() {
>                 // set response page with page params for bookmarkable
>         urls
>                 final PageParameters params = new PageParameters();
>                 params.add( "query", (String) getModelObject() );
>                 setResponsePage( SearchPage.class, params );
>             }
>
>         which I implemented like this to have bookmarkable urls.
>         therefore the SearchResultsView is created for each request.
>
>         is this wrong in terms of lifecycle of wicket pages?
>         would there be another possibility to achieve bookmarkable
>         pages with a form submit?
>
>         cheers,
>         martin
>
>
>         >
>         > 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
>         --
>         Martin Grotzke
>         http://www.javakaffee.de/blog/
>
>
-------------------------------------------------------------------------
>         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
>
>
>
>
-------------------------------------------------------------------------
> 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
--
Martin Grotzke
http://www.javakaffee.de/blog/

-------------------------------------------------------------------------
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



-------------------------------------------------------------------------
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

Reply via email to