Re: AjaxLink cannot see updated model values

2016-10-13 Thread Iamuser
I have added txtName.setOutputMarkupId(true); and target.add(TestForm.this); But it is still not working. txtName.setOutputMarkupId(true); AjaxLink clearLink = new AjaxLink("clearLink", model) { /** * */ private static final long serialVersionUID = 1L; @Override public void onClick(AjaxRequestTa

Re: AjaxLink cannot see updated model values

2016-10-13 Thread Martin Grigorov
On Thu, Oct 13, 2016 at 3:38 PM, Iamuser wrote: > Hello, > > Yes, adding the behavoiur AjaxFormComponentUpdatingBehavior on the text > field, solved the issue. > > Thank you for solution. > > Now I'm facing following situation. > When another link is clicked I need to clear the input fields (so m

Re: AjaxLink cannot see updated model values

2016-10-13 Thread Ernesto Reinaldo Barreiro
make TextField txtName a field. Call txtName.setOutputMarkupId(true) and add it to the ART on on click On Thu, Oct 13, 2016 at 3:38 PM, Iamuser wrote: > Hello, > > Yes, adding the behavoiur AjaxFormComponentUpdatingBehavior on the text > field, solved the issue. > > Thank you for solution. > >

Re: AjaxLink cannot see updated model values

2016-10-13 Thread Iamuser
Hello, Yes, adding the behavoiur AjaxFormComponentUpdatingBehavior on the text field, solved the issue. Thank you for solution. Now I'm facing following situation. When another link is clicked I need to clear the input fields (so my textfield). I have the following added, but the form just does

Re: AjaxLink cannot see updated model values

2016-10-12 Thread Ernesto Reinaldo Barreiro
Read Martin's comment: you are not submitting the form. On Wed, Oct 12, 2016 at 5:33 PM, Iamuser wrote: > Hello, > > Yes, it is dynamic. > > Here is the complete code (html and java): > > ==My test bean== > > public class TestBean implements Serializable{ > > /** > * >

Re: AjaxLink cannot see updated model values

2016-10-12 Thread Iamuser
Hello, Yes, it is dynamic. Here is the complete code (html and java): ==My test bean== public class TestBean implements Serializable{ /** * */ private static final long serialVersionUID = 1L; private String name; private Stri

Re: AjaxLink cannot see updated model values

2016-10-12 Thread Martin Grigorov
Hi, AjaxLink uses AjaxEventBehavior behind the scenes. This behavior doesn't send any parameters with the request. You need something like AjaxFormComponentUpdatingBehavior to send form elements' value to the server or use dynamic extra parameters by overriding #updateAjaxAttributes(). P.S. Pleas

Re: AjaxLink cannot see updated model values

2016-10-12 Thread Ernesto Reinaldo Barreiro
if you model dynamic? On Wed, Oct 12, 2016 at 5:07 PM, Iamuser wrote: > Hi, > > I have a form backed by a model. > In this form I have and editable textfield and a image. > > When clicking on the image I just need to write the value inserted in the > textfield to the console. > > However, it doe