The model for the formcomponents is not tied to the model of the form and can come from anywhere.

-Igor

 

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nick Heudecker
Sent: Friday, September 09, 2005 3:18 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Dynamic Forwards With Wicket

 

I'll try it tonight. I didn't even know you could do that.

On 9/9/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote:

Class MyPage extends WebPage() {

            Private String myproperty;

 

            Public String getMyProperty() { return myproperty; }

            Public void setMyProperty(String prop) { myproperty=prop; }

 

            Public Mypage() {

                        Form form=new MyForm();

                        Form.add(new HiddenField("myprop", new PropertyModel(MyPage.this, "myproperty"));

                        Add(form);

            }

            …

}

 

 

Wont this do?

 

-Igor

 

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Nick Heudecker
Sent: Friday, September 09, 2005 3:00 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Dynamic Forwards With Wicket

 

The gist is that I want to have a form property that has nothing to do with my model object.  It's a support property to tell me where to send the user next.  There must be a way to do this without having to write a new model object for every business object in my app.

On 9/9/05, Gwyn Evans <[EMAIL PROTECTED]> wrote:

I might well be misunderstanding, but it seems to me that what Eelco's
saying is that if you have your basic "model object" with your data,
then you could derive from it to create a new "model object" with a
superset of the basic objects acessor methods, and then set the new
object as your Model's "model object"...

Personally, I'd be just using a CompoundPropertyModel with empty
defaults for all the acessors, but that might just be that I've not
understood the question...

/Gwyn

On 09/09/05, Nick Heudecker <[EMAIL PROTECTED]> wrote:
> I don't follow you here.  Can you provide some pseudocode?
>
>
> On 9/7/05, Eelco Hillenius <[EMAIL PROTECTED] > wrote:
> > Isn't your second model derivable? If so, just create and set the
> > model just in time/ when you do the navigation or panel replacement.
> >
> >
> > Eelco
> >
> >
> > On 9/7/05, Nick Heudecker < [EMAIL PROTECTED]> wrote:
> > > I want to provide the user with the option of selecting the next screen
> they
> > > go to after a form is processed.  For instance, the user creates object
> A.
> > > There are two likely areas they could go to next: view the summary or
> create
> > > a child object of A.  I would like to provide this as a function of the
> Form
> > > subclass, like adding a Panel with a selection list with available
> targets.
> > >
> > >  My problem is I don't understand how to create this Form subclass that
> > > basically has two models: one for the actual model that's being
> > > created/edit, and a second for the next page the user should see.  Any
> > > suggestions or examples?  Thanks.
> > >


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

 

 

Reply via email to