You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Luis Perez Sanchez (JIRA)" <ji...@apache.org> on 2012/10/19 09:30:12 UTC

[jira] [Created] (WICKET-4823) While trying to update the jquery-datatable via AJAX it gets detached from the JQuery structure

Luis Perez Sanchez created WICKET-4823:
------------------------------------------

             Summary: While trying to update the jquery-datatable via AJAX it gets detached from the JQuery structure
                 Key: WICKET-4823
                 URL: https://issues.apache.org/jira/browse/WICKET-4823
             Project: Wicket
          Issue Type: Bug
          Components: wicket
            Reporter: Luis Perez Sanchez


We are trying to change via AJAX request the content of a jquery-datatable by changing the list of elements inside.

This is done by using the method setList of the ListView<?> object initially added to the datatable, then the datatable is added to the AjaxRequestTarget involved in the Ajax request, for the refreshing of the component.

And indeed the data is actually changed in the page, but the datatable gets detached from JQuery, thus loosing the formatting, the filters, etc. It is like it is not treated as a JQueryDatatable anymore in the client.

Has this happened to you before??

Best Regards,

Luis

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (WICKET-4823) While trying to update the jquery-datatable via AJAX it gets detached from the JQuery structure

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4823?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-4823.
-------------------------------------

    Resolution: Not A Problem

Hi,

Please use users@wicket.apache.org mailing list for questions like this.

The problem is that jQuery DataTables works with something like data source. I.e. you have to feed it with JSON as its new data instead of repainting it.

Wicket Ajax component repainting works by completely replacing the HTML element in the DOM.
If you want to still use the normal Wicket way then you need to add something like:

     target.appendJavaScript("jQuery('#"+tableComponent.getMarkupId()+"').datatable();")

so the new <table> element will be tagged as JQuery DataTables too.
                
> While trying to update the jquery-datatable via AJAX it gets detached from the JQuery structure
> -----------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4823
>                 URL: https://issues.apache.org/jira/browse/WICKET-4823
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>            Reporter: Luis Perez Sanchez
>
> We are trying to change via AJAX request the content of a jquery-datatable by changing the list of elements inside.
> This is done by using the method setList of the ListView<?> object initially added to the datatable, then the datatable is added to the AjaxRequestTarget involved in the Ajax request, for the refreshing of the component.
> And indeed the data is actually changed in the page, but the datatable gets detached from JQuery, thus loosing the formatting, the filters, etc. It is like it is not treated as a JQueryDatatable anymore in the client.
> Has this happened to you before??
> Best Regards,
> Luis

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4823) While trying to update the jquery-datatable via AJAX it gets detached from the JQuery structure

Posted by "Carsten Behring (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13479694#comment-13479694 ] 

Carsten Behring commented on WICKET-4823:
-----------------------------------------

I am currently out of the office. I will deal with your message upon my return on 22.10.12



Kind regards,

Carsten Behring

                
> While trying to update the jquery-datatable via AJAX it gets detached from the JQuery structure
> -----------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4823
>                 URL: https://issues.apache.org/jira/browse/WICKET-4823
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>            Reporter: Luis Perez Sanchez
>
> We are trying to change via AJAX request the content of a jquery-datatable by changing the list of elements inside.
> This is done by using the method setList of the ListView<?> object initially added to the datatable, then the datatable is added to the AjaxRequestTarget involved in the Ajax request, for the refreshing of the component.
> And indeed the data is actually changed in the page, but the datatable gets detached from JQuery, thus loosing the formatting, the filters, etc. It is like it is not treated as a JQueryDatatable anymore in the client.
> Has this happened to you before??
> Best Regards,
> Luis

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira