Thanks! That's exactly what I was looking for :jumping:

Jeremy Thomerson-5 wrote:
> 
> Do you mean you're doing this?
>  public class ViewPanel extends Panel {
>     private Object foo;
>     public ViewPanel(String id) {
>         super(id);
>         add(new EditPanel("edit", new PropertyModel(foo, "property")));
>         setFoo(new Foo());
>     }
> 
> }
> If so, you can fix it by replacing the property model with: new
> PropertyModel(this, "foo.property") - that way it will always pull the
> latest from from your ViewPanel.  Otherwise, you passed in a reference to
> an
> object, and then replaced your local reference with a reference to a new
> object - but that wouldn't replace references anywhere else.
> 
> -- 
> Jeremy Thomerson
> http://www.wickettraining.com
> 
> 
> On Fri, Oct 24, 2008 at 8:57 AM, walnutmon
> <[EMAIL PROTECTED]>wrote:
> 
>>
>> I have two panels, a view panel where you can look for news and an edit
>> panel.  The edit panel has a reference to a "news" object and all of it's
>> form elements have property models that use that object.
>>
>> When I pass a news object into the panel on creation all of the form
>> elements fill as expected.  However, if I set that object through a
>> setter
>> in the panel class, the elements do not update.  My theory (which may be
>> wrong) is that the property model makes a defensive copy and therefore is
>> not linked to the object in the class.  If this is true, can I resend the
>> object to the property model?
>>
>> If that's not true, any insight as to what I may be doing wrong?
>> --
>> View this message in context:
>> http://www.nabble.com/Forcing-property-models-to-update-tp20150693p20150693.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Forcing-property-models-to-update-tp20150693p20165705.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to