You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Bruno Moura <br...@gmail.com> on 2013/04/26 20:54:28 UTC
Example for saving value edited in Text Box on exit event
Hi someone please could give me an example for saving value edited in Text
Box, inside a listview, via ajax on exit event.
I need a example of this implementation for wicket 1.4 and if its possible
in scala.
Thanks
Bruno Moura
Re: Example for saving value edited in Text Box on exit event
Posted by Martin Grigorov <mg...@apache.org>.
Hi Bruno,
What is the current problem ?
I think your code should work.
But you may either change the event to 'change', 'blur' or 'input' or at
least add throttling (I don't remember the syntax for 1.4) because now it
will fire Ajax event for every typed character.
Ah, and Wicket 1.4/1.5 work with inline attributes so you need the 'on'
prefix -> onkeyup.
On Fri, Apr 26, 2013 at 11:10 PM, Bruno Moura <br...@gmail.com> wrote:
> Hi Martin
>
> I trying to add a TextField in a list view as is showed bellow:
>
> val detail = new TextField("detail", new PropertyModel(objItem,
> "description"))
> detail.add(new AjaxFormComponentUpdatingBehavior(("keyup")) {
> protected def onUpdate(target: AjaxRequestTarget) {
> objItemDAO.saveObjItem(objItem)
> }
> })
> item.add(detail)
>
> I need to save the object objItem immediately after the user finishes
> editing this. Maybe this component
> coulb be changed by a inline label, but I need to some example that could
> works with wicket 1.4.
>
> Thanks again Martin for your help.
>
>
>
>
> Bruno Moura
>
>
> 2013/4/26 Martin Grigorov <mg...@apache.org>
>
> > Hi,
> >
> > There is no 'exit' event.
> > Please give us more details. And show us what you have so far.
> >
> >
> > On Fri, Apr 26, 2013 at 8:54 PM, Bruno Moura <br...@gmail.com>
> > wrote:
> >
> > > Hi someone please could give me an example for saving value edited in
> > Text
> > > Box, inside a listview, via ajax on exit event.
> > >
> > > I need a example of this implementation for wicket 1.4 and if its
> > possible
> > > in scala.
> > >
> > > Thanks
> > >
> > >
> > >
> > > Bruno Moura
> > >
> >
> >
> >
> > --
> > Martin Grigorov
> > jWeekend
> > Training, Consulting, Development
> > http://jWeekend.com <http://jweekend.com/>
> >
>
--
Martin Grigorov
Wicket Training & Consulting
http://jWeekend.com <http://jweekend.com/>
Re: Example for saving value edited in Text Box on exit event
Posted by Bruno Moura <br...@gmail.com>.
Hi Martin
I trying to add a TextField in a list view as is showed bellow:
val detail = new TextField("detail", new PropertyModel(objItem,
"description"))
detail.add(new AjaxFormComponentUpdatingBehavior(("keyup")) {
protected def onUpdate(target: AjaxRequestTarget) {
objItemDAO.saveObjItem(objItem)
}
})
item.add(detail)
I need to save the object objItem immediately after the user finishes
editing this. Maybe this component
coulb be changed by a inline label, but I need to some example that could
works with wicket 1.4.
Thanks again Martin for your help.
Bruno Moura
2013/4/26 Martin Grigorov <mg...@apache.org>
> Hi,
>
> There is no 'exit' event.
> Please give us more details. And show us what you have so far.
>
>
> On Fri, Apr 26, 2013 at 8:54 PM, Bruno Moura <br...@gmail.com>
> wrote:
>
> > Hi someone please could give me an example for saving value edited in
> Text
> > Box, inside a listview, via ajax on exit event.
> >
> > I need a example of this implementation for wicket 1.4 and if its
> possible
> > in scala.
> >
> > Thanks
> >
> >
> >
> > Bruno Moura
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com <http://jweekend.com/>
>
Re: Example for saving value edited in Text Box on exit event
Posted by Martin Grigorov <mg...@apache.org>.
Hi,
There is no 'exit' event.
Please give us more details. And show us what you have so far.
On Fri, Apr 26, 2013 at 8:54 PM, Bruno Moura <br...@gmail.com> wrote:
> Hi someone please could give me an example for saving value edited in Text
> Box, inside a listview, via ajax on exit event.
>
> I need a example of this implementation for wicket 1.4 and if its possible
> in scala.
>
> Thanks
>
>
>
> Bruno Moura
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>