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