You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Zeldor <pg...@gmail.com> on 2011/10/06 10:17:05 UTC
PropertyModel not refreshing
Hi,
I have a form with labels that use PropertyModel. They work fine when I test
them locally - when I click on submit button I get proper refreshed values
in labels. But when I deploy my app it does not work, I still get old
values. Where can be the problem? I am using Wicket 1.4.17 and deploying on
Google AppEngine.
My code:
Form<String> buildHousesForm = new Form<String>("buildHousesForm", new
Model<String>())
...
...
add(new Label("houses_amount", new PropertyModel(MySession.get().getUser(),
"village")));
...
...
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/PropertyModel-not-refreshing-tp3877389p3877389.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: PropertyModel not refreshing
Posted by Zeldor <pg...@gmail.com>.
Thanks, I will give it a try :)
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/PropertyModel-not-refreshing-tp3877389p3877636.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: PropertyModel not refreshing
Posted by Sven Meier <sv...@meiers.net>.
Might have something to do with when the session is created and/or
serialized.
> And won't it negatively affect performance?
I'm not sure what you mean by "it", but the AbstractReadOnlyModel is
faster than a PropertyModel (no reflection involved).
HTH
Sven
On 10/06/2011 12:02 PM, Zeldor wrote:
> Why would there be a difference between local and deployed versions?
>
> And won't it negatively affect performance?
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/PropertyModel-not-refreshing-tp3877389p3877621.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: PropertyModel not refreshing
Posted by Zeldor <pg...@gmail.com>.
Why would there be a difference between local and deployed versions?
And won't it negatively affect performance?
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/PropertyModel-not-refreshing-tp3877389p3877621.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: PropertyModel not refreshing
Posted by Sven Meier <sv...@meiers.net>.
Hi,
you're probably holding on an outdated user object, use this instead:
add(new Label("houses_amount",
new AbstractReadOnlyModel<String>() {
public String getObject() {
return MySession.get().getUser().getVillage();
}
}));
Sven
On 10/06/2011 10:17 AM, Zeldor wrote:
> Hi,
>
> I have a form with labels that use PropertyModel. They work fine when I test
> them locally - when I click on submit button I get proper refreshed values
> in labels. But when I deploy my app it does not work, I still get old
> values. Where can be the problem? I am using Wicket 1.4.17 and deploying on
> Google AppEngine.
>
> My code:
>
> Form<String> buildHousesForm = new Form<String>("buildHousesForm", new
> Model<String>())
> ...
> ...
> add(new Label("houses_amount", new PropertyModel(MySession.get().getUser(),
> "village")));
> ...
> ...
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/PropertyModel-not-refreshing-tp3877389p3877389.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org