You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Björn T." <bj...@web.de> on 2010/03/26 13:03:28 UTC

AjaxFormComponentUpdatingBehavior

Hello,

 

thanx for wicket!!! it is a joy working with this great framework!

 

I would need some help with an Ajax enabled table. It would be very great if some one could give me a hint on this.

 

I have a DateTextField with a DatePicker, once the content is changed i want the tabelcontent (rows) to be updated.

 

I added a AjaxFormComponentUpdatingBehavior("onchange") to my textfield.

 

...

travelstartDateTextField.add(new AjaxFormComponentUpdatingBehavior("onchange") {
    @Override
    protected void onUpdate(AjaxRequestTarget target) {
       if (target != null) {
         target.addComponent(StartPageForm.this.availableCategoriesContainer);
      }
   }
});

...

 

the availableCategoriesContainer contains the AjaxFallbackDefaultDataTable. A "SortableDataProvider" feeds the data to the table. The method getting the rows for the tabel is sometimes slow...

 

The table contains an action panel to select one of the rows...

 

now: everything work just fine normaly... but...

 

sometimes I get this strange error:

WicketMessage: org.apache.wicket.WicketRuntimeException: component inputForm:availableCategoriesContainer:table:rows:1:cells:4:cell:select not found on page de.rbag.web.reservation.pages.StartPage[id = 23], listener interface = [RequestListenerInterface name=ILinkListener, method=public abstract void org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()]

 

I gues it has something to do with the fact that the ajax hasn't finished yet...

 

what would be a good way to avoid, that users click on the select-button on a table-row before the ajax request is finished?

 

it would be very great to here from you, since i am almost finished with my app but this keeps me from enrolling...   :-(

 

Thanx a lot in advance

Cheers Björn
___________________________________________________________
WEB.DE DSL: Internet, Telefon und Entertainment für nur 19,99 EUR/mtl.!
http://produkte.web.de/go/02/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org