Okay, now I understand it. I'd better replace the ModelObject than the
Model.
thanks a lot,
Pieter
2007/6/28, Martijn Dashorst <[EMAIL PROTECTED]>:
The problem lies in the references. In your first version, you kept a
direct reference to the model object passed in at construction time.
At tha
The problem lies in the references. In your first version, you kept a
direct reference to the model object passed in at construction time.
At that moment, the property model keeps a reference to that object.
When you changed the Model of the panel, the property model was not
notified: there is no
Thanks, that works. I really didn't know what I did wrong, nut I understand
the reasoning behind it.
2007/6/28, Martijn Dashorst <[EMAIL PROTECTED]>:
On 6/28/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
> new PropertyModel(model, "foo")
erhm...
not quite there yet... You should also notify
On 6/28/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
> new PropertyModel(model, "foo")
erhm...
not quite there yet... You should also notify the property model in
the setModel of your panel.
In this case you have a push type of model binding. It usually is a
better model to adopt a pull type
On 6/28/07, Pieter Cogghe <[EMAIL PROTECTED]> wrote:
> public class SectionPanel extends Panel {
> public SectionPanel(String id, IModel model) throws ApplicationException
> {
> super(id,model);
> //title
> this.title = new Label("title", new PropertyModel(model.getO
It seems that the error is in the Panel. Can you post that code too?
Martijn
--
Wicket joins the Apache Software Foundation as Apache Wicket
Join the wicket community at irc.freenode.net: ##wicket
Wicket 1.2.6 contains a very important fix. Download Wicket now!
http://wicketframework.org
--
I've put this method in my SectionPanel
@Override
public Component setModel(IModel arg0) {
SectionModel s = (SectionModel) arg0.getObject(this);
System.out.println(s.getResource().getText().get(language.toString
()).get(InstrumentContentType.PHRASE_TYPE));
Component tes
I' m trying to do something very simple. When I click a link, I change the
Model of a panel, but the Panel doesn't show the content of the new Model. I
tried to do this with a simple Label and that works. It has got to be
something very stupid, but I've been looking at it all morning and I just
do