Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-5247

Related to: [WW-5117] - %{id} evaluates different for data-* and value attribute

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 2.5.30
    • 6.1.1
    • None
    • None
    • Important

    Description

      I upgraded from 2.5.20 to 2.5.30 and the following stopped working:

      <display:table class="table table-sm table-bordered highliterows" id="currentObj" name="${roleEntry.value}" >
                      
                      <display:column class="centerCol" title="Role Name" property="name"    />
                      <display:column class="centerCol " title="View" style="width:1%">
                          <s:form id="getRole%{#attr.currentObj.roleid}" theme="simple" action="getRoleAuthRolesPerms" >    
                              <s:hidden name="authorityRole.roleid" value="%{#attr.currentObj.roleid}" />

                              <sj:submit targets="roleAjaxDiv" effect="highlight" indicator="roleIndicator"  cssClass="tooltipBorderless"  title="View Role" type="image" src="../img/view.gif"  />
                              
                          </s:form>
                      </display:column>

      </display:table>

      Generates:

      <form id="getRole159" name="getRole159" action="/apps/epar/getRoleAuthRolesPerms.action" method="post" class="formstyle">    
                              <input type="hidden" name="authorityRole.roleid" value="159" id="getRole159_authorityRole_roleid">

                              <input type="image" src="../img/view.gif" id="submit_213350257" value="Submit" class="tooltipBorderless" title="View Role">
      <script type="text/javascript">
      jQuery(document).ready(function () { 
          var options_submit_213350257 = {};
          options_submit_213350257.jqueryaction = "button";
          options_submit_213350257.id = "submit_213350257";
          options_submit_213350257.targets = "roleAjaxDiv";
          options_submit_213350257.href = "#";
          options_submit_213350257.formids = "getRole%{#attr.currentObj.roleid}";
          options_submit_213350257.indicatorid = "roleIndicator";
          options_submit_213350257.effect = "highlight";
          options_submit_213350257.effectoptions = {};

      jQuery.struts2_jquery.bind(jQuery('#submit_213350257'),options_submit_213350257);

       });  
      </script>

       </form>

      The JS that it generates does NOT translate: 
      options_submit_213350257.formids = "getRole%{#attr.currentObj.roleid}";

      This works with 2.5.20 but does NOT work with 2.5.29, 2.5.30. 
      Works with 6.0.3, but not ready to upgrade to it, seems very unstable.

      I believe this is related to: 

      • WW-5117 - %{id} evaluates different for data-* and value attribute

       

       

                      

      Attachments

        Activity

          People

            Unassigned Unassigned
            ajant Javier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: