Re: Avoid getObject on Model if component not rendered

2010-10-21 Thread Jeremy Thomerson
f I recall correctly this was done to remove the > > "callOnBeforeRenderIfInvisble()" method and switching visibility in > > onBeforeRender(). > > > > Bas > > > > - Original Message - From: "Jeremy Thomerson" > > > > To: > > Sent: Th

Re: Avoid getObject on Model if component not rendered

2010-10-21 Thread Igor Vaynberg
remove the > "callOnBeforeRenderIfInvisble()" method and switching visibility in > onBeforeRender(). > > Bas > > - Original Message - From: "Jeremy Thomerson" > > To: > Sent: Thursday, October 21, 2010 9:56 PM > Subject: Re: Avoid getObjec

Re: Avoid getObject on Model if component not rendered

2010-10-21 Thread Bas Gooren
To: Sent: Thursday, October 21, 2010 9:56 PM Subject: Re: Avoid getObject on Model if component not rendered Or, just set the default value in onConfigure of the dropdownchoice itself, which will not be called if the ddc is not visible. On Thu, Oct 21, 2010 at 2:52 PM, Hans Lesmeister wro

Re: Avoid getObject on Model if component not rendered

2010-10-21 Thread hans.lesmeis...@lessy.net
Am 21.10.10 21:07 schrieb "meduolis" unter : final DropDownChoice usersChoice = new DropDownChoice("usersList", customUserModel, usersListModel, new ChoiceRenderer("username")); usersChoice.setNullValid(false); usersChoice.setModelObject(usersChoice.getChoices().

Re: Avoid getObject on Model if component not rendered

2010-10-21 Thread Jeremy Thomerson
Or, just set the default value in onConfigure of the dropdownchoice itself, which will not be called if the ddc is not visible. On Thu, Oct 21, 2010 at 2:52 PM, Hans Lesmeister wrote: > Create and add the DropDownChoice in onInitialize(). If the component is > not rendered then that method will

Re: Avoid getObject on Model if component not rendered

2010-10-21 Thread Hans Lesmeister
Create and add the DropDownChoice in onInitialize(). If the component is not rendered then that method will not be called (untested) @Override protected void onInitialize() { super.onInitialize(); final DropDownChoice usersChoice = new DropDownChoice("usersList", customUserModel, usersLis

Re: Avoid getObject on Model if component not rendered

2010-10-21 Thread meduolis
Oh, ..., thanks for a sharp eye ;)..Then I will need to find another way how to get rid of that default drop down value "Choose one". Thank you -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Avoid-getObject-on-Model-if-component-not-rendered-tp3006125p30

Re: Avoid getObject on Model if component not rendered

2010-10-21 Thread Jeremy Thomerson
On Thu, Oct 21, 2010 at 2:07 PM, meduolis wrote: >usersChoice.setModelObject(usersChoice.getChoices().get(0)); > You're calling it yourself. The line above is the culprit. -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org*

Avoid getObject on Model if component not rendered

2010-10-21 Thread meduolis
make it unsecured to solve the problem, and call this service always, but maby there is a way to stop calling the service? :D Any ideas? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Avoid-getObject-on-Model-if-component-not-rendered-tp3006125p3006125.html Sent fro