Re: Wizard and confirmation screens

2009-12-02 Thread John Armstrong
Found my problem. I needed to be using a DynamicWizardModel, not a
WizardModel. This lets me add the steps as required and therefore get
access to the version of the model at that stage of the process.

I'd done this before, just had to paw through my personal svn to find
how I implemented it.

Yes, it was a 'Doh!' moment.

Tx-
John-

On Mon, Nov 30, 2009 at 7:21 AM, John Armstrong siber...@siberian.org wrote:
 I believe my models are dynamic and self-contained. For example one is
 a Serviceorder that lives in the net.pnc.model.Serviceorder class. I
 have one instance of this in my wizard that is shared between all
 screens. All properties of Serviceorder are private to Serviceorder
 and accessed via getters/setters. So for example:

 add(new TextField(email, new PropertyModel(theOrder, email)));

 where 'theOrder' is the wizard scoped instance of a Serviceorder.

 That seems correct to me, can you confirm?

 I see in the wicket examples project there is a Wizard that uses a
 StaticContentStep for just this case. This leads me to believe that
 the only way to accomplish this task is to do the same and basically
 wrap that entire last step into the properties file and feed it the
 model? Feels wrong to me..

 John-

 On Mon, Nov 30, 2009 at 3:07 AM, bgooren b...@iswd.nl wrote:

 Sounds like you are using static models instead of dynamic models.

 E.g. if you use Model.of(test), the model is essentialy self-contained.
 Whereas if you have a property called value in your wizard and you use
 new PropertyModel( Wizard.this, value )
 , the model will depend on the value of the value property.

 Bas


 John Armstrong-3 wrote:

 It may just be late and I am missing the obvious but..

 I have a wizard. The last step needs to be a confirmation step however
 it is constructed when added to the WizardModel in the Wizard
 constructor and at this stage all of the backing models are empty
 since, well, the user hasn't done anything.

 This means when I access models on the confirmation step all of the
 model data is empty (it was built by wicket earlier in the process).

 What am I missing? This is a common use pattern so I am doing
 something wrong since obviously the form has the data as back/forth
 show it just fine. The only work-around I can think of is to not add
 this step and then insert this step at the end myself (once the
 objects are populated). Seems hacky though.

 Tx
 John-

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




 --
 View this message in context: 
 http://old.nabble.com/Wizard-and-confirmation-screens-tp26570806p26572871.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wizard and confirmation screens

2009-12-02 Thread Eyal Golan
 on the confirmation step all of the
  model data is empty (it was built by wicket earlier in the process).
 
  What am I missing? This is a common use pattern so I am doing
  something wrong since obviously the form has the data as back/forth
  show it just fine. The only work-around I can think of is to not add
  this step and then insert this step at the end myself (once the
  objects are populated). Seems hacky though.
 
  Tx
  John-
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  --
  View this message in context:
 http://old.nabble.com/Wizard-and-confirmation-screens-tp26570806p26572871.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Wizard and confirmation screens

2009-11-30 Thread John Armstrong
It may just be late and I am missing the obvious but..

I have a wizard. The last step needs to be a confirmation step however
it is constructed when added to the WizardModel in the Wizard
constructor and at this stage all of the backing models are empty
since, well, the user hasn't done anything.

This means when I access models on the confirmation step all of the
model data is empty (it was built by wicket earlier in the process).

What am I missing? This is a common use pattern so I am doing
something wrong since obviously the form has the data as back/forth
show it just fine. The only work-around I can think of is to not add
this step and then insert this step at the end myself (once the
objects are populated). Seems hacky though.

Tx
John-

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wizard and confirmation screens

2009-11-30 Thread bgooren

Sounds like you are using static models instead of dynamic models.

E.g. if you use Model.of(test), the model is essentialy self-contained.
Whereas if you have a property called value in your wizard and you use 
new PropertyModel( Wizard.this, value )
, the model will depend on the value of the value property.

Bas


John Armstrong-3 wrote:
 
 It may just be late and I am missing the obvious but..
 
 I have a wizard. The last step needs to be a confirmation step however
 it is constructed when added to the WizardModel in the Wizard
 constructor and at this stage all of the backing models are empty
 since, well, the user hasn't done anything.
 
 This means when I access models on the confirmation step all of the
 model data is empty (it was built by wicket earlier in the process).
 
 What am I missing? This is a common use pattern so I am doing
 something wrong since obviously the form has the data as back/forth
 show it just fine. The only work-around I can think of is to not add
 this step and then insert this step at the end myself (once the
 objects are populated). Seems hacky though.
 
 Tx
 John-
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Wizard-and-confirmation-screens-tp26570806p26572871.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wizard and confirmation screens

2009-11-30 Thread John Armstrong
I believe my models are dynamic and self-contained. For example one is
a Serviceorder that lives in the net.pnc.model.Serviceorder class. I
have one instance of this in my wizard that is shared between all
screens. All properties of Serviceorder are private to Serviceorder
and accessed via getters/setters. So for example:

add(new TextField(email, new PropertyModel(theOrder, email)));

where 'theOrder' is the wizard scoped instance of a Serviceorder.

That seems correct to me, can you confirm?

I see in the wicket examples project there is a Wizard that uses a
StaticContentStep for just this case. This leads me to believe that
the only way to accomplish this task is to do the same and basically
wrap that entire last step into the properties file and feed it the
model? Feels wrong to me..

John-

On Mon, Nov 30, 2009 at 3:07 AM, bgooren b...@iswd.nl wrote:

 Sounds like you are using static models instead of dynamic models.

 E.g. if you use Model.of(test), the model is essentialy self-contained.
 Whereas if you have a property called value in your wizard and you use
 new PropertyModel( Wizard.this, value )
 , the model will depend on the value of the value property.

 Bas


 John Armstrong-3 wrote:

 It may just be late and I am missing the obvious but..

 I have a wizard. The last step needs to be a confirmation step however
 it is constructed when added to the WizardModel in the Wizard
 constructor and at this stage all of the backing models are empty
 since, well, the user hasn't done anything.

 This means when I access models on the confirmation step all of the
 model data is empty (it was built by wicket earlier in the process).

 What am I missing? This is a common use pattern so I am doing
 something wrong since obviously the form has the data as back/forth
 show it just fine. The only work-around I can think of is to not add
 this step and then insert this step at the end myself (once the
 objects are populated). Seems hacky though.

 Tx
 John-

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




 --
 View this message in context: 
 http://old.nabble.com/Wizard-and-confirmation-screens-tp26570806p26572871.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org