wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlock <dl...@gmacsoftware.com>
Subject Re: AjaxFallbackDefaultDataTable: cell not receiving event after sorting
Date Sat, 08 Jun 2013 10:37:00 GMT
Hi Sven.
Thanks for taking a look at my question.

I have been trying to debug the issue (Ajax is new to me so please be
patient).  It looks like the issue is more fundamental than what I first
thought.  I added a simple row listener like so...

            protected Item<T> newRowItem(String id, int index, IModel<T>
                Item<T> item = super.newRowItem(id, index, model);
                item.add(new RowBehavior<T>("onclick", model)
                    private static final long serialVersionUID = 1L;
                    protected void onEvent(IModel<T> model,
AjaxRequestTarget target)
                        m_logger.info("row clicked: {}", model.getObject());
                return item;

Prior to sorting, the content of the row is printed when clicked.  After
sorting nothing is printed, sorting again to revert back to the original
state will print the contents on a row click.

Every other sort (the one that results in the failure scenario) results in
the following errors being logged in the Wicket Ajax Debug Window

ERROR: Cannot find element with id: iconc2
ERROR: Cannot find element with id: id21c3
ERROR: Cannot find element with id: iconc4
ERROR: Cannot find element with id: id22c5
ERROR: Cannot find element with id: orderByLinkc6
ERROR: Cannot find element with id: orderByLinkc7
ERROR: Cannot find element with id: orderByLinkc8

The ids obviously change with each sort.  From what I can tell the
orderByLink ones are the header links that result in a sort when clicked and
the icon and id ones relate to the label/icon described in the original

There is JavaScript created that links the above ids to their behaviours.... 
Something like this


When everything is working the markup and javascript ids align.  When it
fails, it looks like the previous javascript remains (hence why the row
listener is failing)

So, the (new) question I have is, where/how does the JavaScript and markup
get associated and why can't the newly generated ids be found (yet on a
resort they can).

Some possibly (not) important points.  The table resides in an extension to
Panel which is added to a page.
I am using Wicket 6.8.0

Any help/pointers would be appreciated.


View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxFallbackDefaultDataTable-cell-not-receiving-event-after-sorting-tp4659277p4659294.html
Sent from the Users forum mailing list archive at Nabble.com.

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

View raw message