You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Mai (JIRA)" <ji...@apache.org> on 2015/09/15 12:18:46 UTC

[jira] [Created] (TAP5-2502) Tapestry5: jQuery.dialog not work with DataTables

Mai created TAP5-2502:
-------------------------

             Summary: Tapestry5: jQuery.dialog not work with DataTables
                 Key: TAP5-2502
                 URL: https://issues.apache.org/jira/browse/TAP5-2502
             Project: Tapestry 5
          Issue Type: Bug
    Affects Versions: 5.3.8
            Reporter: Mai


Now we are using DataTable for showing the finder result. In one cell there is a Actionlink delete-button. But if we click on the delete button, no jQuery.dialog is displayed. The code for that I have posted at below.
Thanks for analyzing...
Template:

<t:jquery.datatable t:id="finderResultGrid" t:source="finderCallback.finderGridDataSource" 
				t:rowsPerPage="prop:rowsPerPageInitial" t:include="prop:colsToInclude" t:exclude="prop:colsToExclude" 
				t:model="finderResultGridModel" t:options="finderResultGridOptions" 
				t:mode="false" t:row="finderResultRow" t:tableInformation="finderResultGridInformation" t:add="action">
....

 <p:actionCell><t:modcommon.actionLinkBuilder....

-------------------------------------------------------------------------------
Code behind the delete button:

jQuery(document).ready(function($) { $('#delete_mtmmtm').click(function (e) { e.preventDefault();$('#form_delete_popup').dialog('open');$( '#delete_pkTargetField' ).val('bXRtbXRt');$( '#delete_pkTargetField_hash' ).val('974AF96FBBCCD2FF103DABF6EB5CF3D5F66EB8179CFF73A2AA629633F5B2B425');});});

----------------------------------------------------------------------------------------------
Calling function:

<script type="text/javascript">
             // due to use of jQuery data table we have to add the class "k-actions"
             // to each last td of each tr in table with id "finderResultGrid"
                   
             jQuery(document).ready(function() {

                    jQuery( "#finderResultGrid tr td:last-of-type" ).addClass( "k-actions" );
                       
                    $(function() {
                           var dialog1 = $("#form_delete_popup").dialog({
                                  autoOpen: false,
                                  height: 150,
                                  width: 350,
                                  modal: true,
                                  title: 'Delete user',
                           });
                    });   
             });
       </script>





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)