I haven't followed the whole discussion (lousy connectivity here in my
hotel), but I'd like to give a note on one thing. While I started out
using 'pull' models all the time, and letting all dynamic parts of the
page - also heavily depending on the visible flag - I came back from
that a bit. Sometimes it is just easier to have less flexibility/ more
static models, and just replace components (like your panels) when
something changes. This means you have to push changes more, but I
found out that it kept things clearer for me; having very dynamic
pages all working with pull models can in some cases get pretty
complex due to all the model inter-dependencies.

Just my 2c,

Eelco



On 8/23/05, Anders Peterson <[EMAIL PROTECTED]> wrote:
> Juergen Donnerstag wrote:
> 
> >>What do you normally do? Having a panel that, in the same page, should
> >>display different things depending on what the user does must be a
> >>common design pattern.
> >>
> >
> >
> > create different panels and enable/disable them.
> 
> Say you have a list of Client objects displayed in one part of your
> page. Beside that list there is an "Edit Client" panel (preferably
> always visible). When the user selects a client from the list the edit
> panel should get populated with the corresponding details. The user can
> then edit the client data, save the changes and select a different client.
> 
> Surely you would do this with one panel?
> 
> Currently I have the Form inside the "Edit Client" panel set to not
> visible until have set the model object (and actually created the
> correct model) but I still get this error:
> 
> The form is still being rendered!
> 
> wicket.WicketRuntimeException: OGNL Exception: expression='code';
> path='1:edit:form:code'
>        at
> wicket.model.AbstractPropertyModel.onGetObject(AbstractPropertyModel.java:150)
>        at
> wicket.model.AbstractDetachableModel.getObject(AbstractDetachableModel.java:100)
>        at wicket.Component.getModelObjectAsString(Component.java:666)
>        at
> wicket.markup.html.form.FormComponent.getModelValue(FormComponent.java:317)
>        at 
> wicket.markup.html.form.FormComponent.getValue(FormComponent.java:202)
>        at wicket.markup.html.form.TextField.onComponentTag(TextField.java:94)
>        at wicket.Component.renderComponent(Component.java:1782)
>        at
> wicket.markup.html.WebMarkupContainer.onRender(WebMarkupContainer.java:78)
>        at wicket.Component.render(Component.java:1119)
>        at wicket.MarkupContainer.renderNext(MarkupContainer.java:1106)
>        at 
> wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:781)
>        at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:723)
>        at wicket.Component.renderComponent(Component.java:1805)
>        at
> wicket.markup.html.WebMarkupContainer.onRender(WebMarkupContainer.java:78)
>        at wicket.markup.html.form.Form.onRender(Form.java:482)
>        at wicket.Component.render(Component.java:1119)
> 
> 
> >>I do not know your application,
> >>
> >>>but I guess I would go for a single model which contains all form
> >>>component, whether set visible or not. And on submit propagate the
> >>>information into proper businsess object if applicable. But of course
> >>>that is only a suggestion and there are possible more approaches to
> >>>it.
> >>
> >>Why not have the business object itself in the CompoundPropertyModel?
> >>
> >
> >
> > CompoundPropertyModel is fine and meets many requirements, but
> > sometimes one of the other model is the better choice. There no single
> > "this cover 100% of all requirements".
> >
> > Juergen
> >
> >
> > -------------------------------------------------------
> > 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
> 
> 
> --
> http://ojalgo.org/
> 
> Mathematics, Linear Algebra and Optimisation with Java
> 
> 
> 
> -------------------------------------------------------
> 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
>


-------------------------------------------------------
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