i dont really understand what you are talking about.

you have a panel that can display a person right? and in an order you have
two instances of person: the order and the invoice, and you want to reuse
your panel?

thats easy, lets say your order looks like this:
class order { person shipto; person billto; }

orderpage extends webpage {
  public orderpage(IModel order) {
        add(new personpanel("shipto", new propertymodel(order, "shipto"));
        add(new personpanel("billto", new propertymodel(order, "bilto"));
   }
}

-igor

On 10/12/07, Per Newgro <[EMAIL PROTECTED]> wrote:
>
> Hello Igor Vaynberg:
> > see sourcecode to this:
> >
> > http://wicketstuff.org/wicket13/echo/
>
> Ok i see in the code that one model can be shared between two components.
> But
> my question was a bit more related to design.
>
> Lets say i build an order and an invoice page. If i read the posts in the
> threads and the wicket book - only the both pages get their models.
> Now both models contain the related person (order page model the OrderGuy
> and
> invoice page model the InvoiceGuy) which indeed will be designed equal in
> person-component (panel based person data presentation).
>
> If i have only one model in the page - how to reuse my person-component?
> Don't
> i have to make assumtions to the parent model design in my "lower"
> component
> because of the path to the related data in the model?
>
> Thanks alot
> Per
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to