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...

            @Override
            protected Item<T> newRowItem(String id, int index, IModel<T>
model)
            {
                Item<T> item = super.newRowItem(id, index, model);
                item.add(new RowBehavior<T>("onclick", model)
                {
                    private static final long serialVersionUID = 1L;
                    @Override
                    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
problem.

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

Wicket.Ajax.ajax({"u":"./users?2-5.IBehaviorListener.1-usersTable-table-body-rows-25-cells-3-cell-icon","e":"click","c":"iconc6"});;
Wicket.Ajax.ajax({"u":"./users?2-5.IBehaviorListener.0-usersTable-table-body-rows-25","e":"click","c":"id25c7"});;
Wicket.Ajax.ajax({"u":"./users?2-5.IBehaviorListener.1-usersTable-table-body-rows-26-cells-3-cell-icon","e":"click","c":"iconc8"});;
Wicket.Ajax.ajax({"u":"./users?2-5.IBehaviorListener.0-usersTable-table-body-rows-26","e":"click","c":"id26c9"});;
Wicket.Ajax.ajax({"u":"./users?2-5.IBehaviorListener.1-usersTable-table-topToolbars-toolbars-1-headers-49-header-orderByLink","e":"click","c":"orderByLinkca"});;
Wicket.Ajax.ajax({"u":"./users?2-5.IBehaviorListener.1-usersTable-table-topToolbars-toolbars-1-headers-50-header-orderByLink","e":"click","c":"orderByLinkcb"});;
Wicket.Ajax.ajax({"u":"./users?2-5.IBehaviorListener.1-usersTable-table-topToolbars-toolbars-1-headers-52-header-orderByLink","e":"click","c":"orderByLinkcc"});;
Wicket.Ajax.ajax({"u":"./users?2-5.IBehaviorLis


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.

dl










--
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-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to