Re: A question about partial form updates with AJAX
but that wont work ofcourse you are replacing components.. wicket generates then the html on the server with the data it then haves. johan On Thu, May 8, 2008 at 8:04 PM, nate roe <[EMAIL PROTECTED]> wrote: > Hrm. I've only added the AjaxFormComponentUpdatingBehavior to the > components that cause the visibility of other components to change. The > idea -- and I'm new to Wicket so it may not have been a very good one -- > was > to limit server round-trips until a rendering change is required. > > I'll add the behavior to all of the elements and see how that goes. > > On Thu, May 8, 2008 at 1:09 AM, Johan Compagner <[EMAIL PROTECTED]> > wrote: > > > are you sure that all the form elements that are in that div that you > > replace have the AjaxFormComponentUpdatingBehavior attached? > > > > On Thu, May 8, 2008 at 1:22 AM, nate roe <[EMAIL PROTECTED]> wrote: > > > > > I have a form with several items. About half of the form is wrapped in > a > > > named div attached to a WebMarkupContainer. When a drop-down value > > > changes, > > > the div is updated via AJAX, re-rendering that part of the form. > > However, > > > the components in that part of the form are not updated and so this > > > re-rendering causes their values to revert to the initial value. > > > > > > I've used an AjaxFormComponentUpdatingBehavior to accomplish the AJAX > > > update. Is there a more appropriate behavior that I should use? When > I > > > use > > > no AJAX, then the form maintains its values rather than resetting (but > > the > > > whole page is refreshed.) > > > > > > How can I prevent a form reset? > > > > > > Thanks, > > > Nate Roe > > > > > >
Re: A question about partial form updates with AJAX
Hrm. I've only added the AjaxFormComponentUpdatingBehavior to the components that cause the visibility of other components to change. The idea -- and I'm new to Wicket so it may not have been a very good one -- was to limit server round-trips until a rendering change is required. I'll add the behavior to all of the elements and see how that goes. On Thu, May 8, 2008 at 1:09 AM, Johan Compagner <[EMAIL PROTECTED]> wrote: > are you sure that all the form elements that are in that div that you > replace have the AjaxFormComponentUpdatingBehavior attached? > > On Thu, May 8, 2008 at 1:22 AM, nate roe <[EMAIL PROTECTED]> wrote: > > > I have a form with several items. About half of the form is wrapped in a > > named div attached to a WebMarkupContainer. When a drop-down value > > changes, > > the div is updated via AJAX, re-rendering that part of the form. > However, > > the components in that part of the form are not updated and so this > > re-rendering causes their values to revert to the initial value. > > > > I've used an AjaxFormComponentUpdatingBehavior to accomplish the AJAX > > update. Is there a more appropriate behavior that I should use? When I > > use > > no AJAX, then the form maintains its values rather than resetting (but > the > > whole page is refreshed.) > > > > How can I prevent a form reset? > > > > Thanks, > > Nate Roe > > >
Re: A question about partial form updates with AJAX
are you sure that all the form elements that are in that div that you replace have the AjaxFormComponentUpdatingBehavior attached? On Thu, May 8, 2008 at 1:22 AM, nate roe <[EMAIL PROTECTED]> wrote: > I have a form with several items. About half of the form is wrapped in a > named div attached to a WebMarkupContainer. When a drop-down value > changes, > the div is updated via AJAX, re-rendering that part of the form. However, > the components in that part of the form are not updated and so this > re-rendering causes their values to revert to the initial value. > > I've used an AjaxFormComponentUpdatingBehavior to accomplish the AJAX > update. Is there a more appropriate behavior that I should use? When I > use > no AJAX, then the form maintains its values rather than resetting (but the > whole page is refreshed.) > > How can I prevent a form reset? > > Thanks, > Nate Roe >
Re: A question about partial form updates with AJAX
Can you show us some code? This should work as long as the component models are updated. Maurice On Thu, May 8, 2008 at 1:22 AM, nate roe <[EMAIL PROTECTED]> wrote: > I have a form with several items. About half of the form is wrapped in a > named div attached to a WebMarkupContainer. When a drop-down value changes, > the div is updated via AJAX, re-rendering that part of the form. However, > the components in that part of the form are not updated and so this > re-rendering causes their values to revert to the initial value. > > I've used an AjaxFormComponentUpdatingBehavior to accomplish the AJAX > update. Is there a more appropriate behavior that I should use? When I use > no AJAX, then the form maintains its values rather than resetting (but the > whole page is refreshed.) > > How can I prevent a form reset? > > Thanks, > Nate Roe > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
A question about partial form updates with AJAX
I have a form with several items. About half of the form is wrapped in a named div attached to a WebMarkupContainer. When a drop-down value changes, the div is updated via AJAX, re-rendering that part of the form. However, the components in that part of the form are not updated and so this re-rendering causes their values to revert to the initial value. I've used an AjaxFormComponentUpdatingBehavior to accomplish the AJAX update. Is there a more appropriate behavior that I should use? When I use no AJAX, then the form maintains its values rather than resetting (but the whole page is refreshed.) How can I prevent a form reset? Thanks, Nate Roe