Tip: don't double post or some people will jump on you - it doesn't help you
get a good answer.

Anyway, for completely stateless page transitions, etc, and how to put data
into the URL rather than session, you need to use BookmarkablePageLink,
which will invoke the YourPage(PageParameters) constructor.  Give those a
shot.   For forms that put their data in the URL, search the list on nabble
- there's been two threads this week dealing with it.  Basically, mount a
bookmarkable page, don't use a Wicket form, just use an HTML form, and make
it do a "GET" to the bookmarkable page URL.  You can then use the
YourPage(PageParameters) constructor again.

-- 
Jeremy Thomerson
http://www.wickettraining.com

On Wed, Nov 19, 2008 at 6:30 AM, <[EMAIL PROTECTED]> wrote:

> Pardon the (possible stupid) question, I'm new to Wicket but is quite
> excited about the simplicity it seems to promote over JSF.
>
> What's the usual way of pushing context on to a website and have it passed
> along, such as to remain stateless? In JSF you would typically create a
> request scoped backing bean and create some hidden inputs on the webpages
> which can hold relevant id's or even base64 encoded and encrypted model
> data. I thought perhaps Wicket were able to do this transparantly, as
> suggested by the following example:
>
> // LetterChoice.java
> final List<String> someLetters = Arrays.asList("A", "D", "C");
> final DropDownChoice letter = new DropDownChoice("letter", new
> Model<String>(), someLetters);
>
> StatelessForm form = new StatelessForm("keyForm") {
>   @Override
>   protected void onSubmit() {
>          setResponsePage( new LetterResult( someLetters,
> Integer.parseInt( letter.getValue() ) ) );
>   }
> };
>
> // LetterResult.java
> public LetterResult(List<String> someLetters, int letterId) {
>   String selectedLetter = someLetters.get( letterId );
> }
>
> It appears you can pass both the model as well as the selection on to a
> new page, but there's no special/hidden content in the generated
> LetterChoice webpage. Does this simply mean what I am doing i tied to my
> session by Wicket? Is there a way ensure there's no (or just a bare
> minimum) of session state between each request? In general, what is the
> mission goal when it comes to statefullness/statelessness of Wicket?
>
> Thanks in advance,
> Casper
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to