You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by cosmindumy <co...@yahoo.com> on 2012/10/01 09:23:25 UTC

Re: get new value of drop down inside vieworedit on onchange

Thanks. It worked. 
But I have another question. 
I want the drop down inside vieworedit in some cases to be disabled. If I
disable it is automatically replaced with label. I want to be replaced with
label only when my condition is true. Is there any possibility? 
Thanks. 



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/get-new-value-of-drop-down-inside-vieworedit-on-onchange-tp4652479p4652557.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: get new value of drop down inside vieworedit on onchange

Posted by Sven Meier <sv...@meiers.net>.
overwrite AjaxFormComponentUpdatingBehavior#getUpdateModel() to return 
false, then update the model for yourself in #onUpdate().

Sven

On 10/02/2012 02:47 PM, vineet semwal wrote:
> no you can't but if your use case is just to retain old value,you can
> retain it in
> a field ,you can even set the old value back or just write your own
> behavior that does that
>
> On Tue, Oct 2, 2012 at 2:08 PM, cosmindumy <co...@yahoo.com> wrote:
>> Another question, hope the last at this topic.
>> May I get the value before the update in AjaxFormComponentUpdatingBehavior?
>> Now on update the new model is already setted.
>> Thanks.
>>
>>
>>
>> --
>> View this message in context: http://apache-wicket.1842946.n4.nabble.com/get-new-value-of-drop-down-inside-vieworedit-on-onchange-tp4652479p4652596.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: get new value of drop down inside vieworedit on onchange

Posted by vineet semwal <vi...@gmail.com>.
no you can't but if your use case is just to retain old value,you can
retain it in
a field ,you can even set the old value back or just write your own
behavior that does that

On Tue, Oct 2, 2012 at 2:08 PM, cosmindumy <co...@yahoo.com> wrote:
> Another question, hope the last at this topic.
> May I get the value before the update in AjaxFormComponentUpdatingBehavior?
> Now on update the new model is already setted.
> Thanks.
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/get-new-value-of-drop-down-inside-vieworedit-on-onchange-tp4652479p4652596.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
>



-- 
regards,

Vineet Semwal

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: get new value of drop down inside vieworedit on onchange

Posted by cosmindumy <co...@yahoo.com>.
Another question, hope the last at this topic. 
May I get the value before the update in AjaxFormComponentUpdatingBehavior? 
Now on update the new model is already setted. 
Thanks. 



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/get-new-value-of-drop-down-inside-vieworedit-on-onchange-tp4652479p4652596.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: get new value of drop down inside vieworedit on onchange

Posted by vineet semwal <vi...@gmail.com>.
you can add in constructor/onintialize()/onconfigure()/onbeforerender
but not in onafterender(),the exception is self explanatory  "Cannot
> modify component hierarchy after render phase has started (page version cant
> change then anymore)"


On Mon, Oct 1, 2012 at 3:11 PM, cosmindumy <co...@yahoo.com> wrote:
> Thanks for advice.
> When it should it be added?
> I tried both beforeRender and also onRender but I get the exceptin "Cannot
> modify component hierarchy after render phase has started (page version cant
> change then anymore)" It must be added somehow after the editorview was
> rendered, otherwise it will make it label.
> wouldn't be better to call a js that disabled it after the page was
> rendered?
> Thanks.
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/get-new-value-of-drop-down-inside-vieworedit-on-onchange-tp4652479p4652571.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
>



-- 
regards,

Vineet Semwal

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: get new value of drop down inside vieworedit on onchange

Posted by cosmindumy <co...@yahoo.com>.
Thanks for advice. 
When it should it be added? 
I tried both beforeRender and also onRender but I get the exceptin "Cannot
modify component hierarchy after render phase has started (page version cant
change then anymore)" It must be added somehow after the editorview was
rendered, otherwise it will make it label. 
wouldn't be better to call a js that disabled it after the page was
rendered? 
Thanks. 



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/get-new-value-of-drop-down-inside-vieworedit-on-onchange-tp4652479p4652571.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: get new value of drop down inside vieworedit on onchange

Posted by vineet semwal <vi...@gmail.com>.
you can also do a css disable
 dropdown.add(new AttributeModifier("disabled", "true"))

On Mon, Oct 1, 2012 at 12:53 PM, cosmindumy <co...@yahoo.com> wrote:
>
> Thanks. It worked.
> But I have another question.
> I want the drop down inside vieworedit in some cases to be disabled. If I
> disable it is automatically replaced with label. I want to be replaced with
> label only when my condition is true. Is there any possibility?
> Thanks.
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/get-new-value-of-drop-down-inside-vieworedit-on-onchange-tp4652479p4652557.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
>



-- 
regards,

Vineet Semwal

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org