Re: A question about partial form updates with AJAX

2008-05-09 Thread Johan Compagner
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

2008-05-08 Thread Maurice Marrink
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]



Re: A question about partial form updates with AJAX

2008-05-08 Thread Johan Compagner
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

2008-05-08 Thread nate roe
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
 



A question about partial form updates with AJAX

2008-05-07 Thread nate roe
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