Javier created WW-5247:
--------------------------

             Summary: Related to: [WW-5117] - %{id} evaluates different for 
data-* and value attribute
                 Key: WW-5247
                 URL: https://issues.apache.org/jira/browse/WW-5247
             Project: Struts 2
          Issue Type: Bug
    Affects Versions: 2.5.30
            Reporter: Javier


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

 

 


                



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to