Re: get new value of drop down inside vieworedit on onchange
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 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-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: get new value of drop down inside vieworedit on onchange
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 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-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- regards, Vineet Semwal - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: get new value of drop down inside vieworedit on onchange
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 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-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- regards, Vineet Semwal - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: get new value of drop down inside vieworedit on onchange
you can also do a css disable dropdown.add(new AttributeModifier("disabled", "true")) On Mon, Oct 1, 2012 at 12:53 PM, cosmindumy 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-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- regards, Vineet Semwal - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
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-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: get new value of drop down inside vieworedit on onchange
try ajaxformcomponentupdatingbehvior with change event On Fri, Sep 28, 2012 at 1:15 PM, cosmindumy wrote: > Hi, > I want to get the new selected of a dropdown wich is inside a vieworedit > component. > Attached an ajax behaviour on onchange event, but cannot get the new vale. > Do not need model object. drop down value is enough, but it is still the old > valuel. > I setted on selection changed notification. > > Thanks. > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/get-new-value-of-drop-down-inside-vieworedit-on-onchange-tp4652479.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- regards, Vineet Semwal - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
get new value of drop down inside vieworedit on onchange
Hi, I want to get the new selected of a dropdown wich is inside a vieworedit component. Attached an ajax behaviour on onchange event, but cannot get the new vale. Do not need model object. drop down value is enough, but it is still the old valuel. I setted on selection changed notification. Thanks. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/get-new-value-of-drop-down-inside-vieworedit-on-onchange-tp4652479.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org