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

Struts2 select tag broken if multiple attribute is used and name attribute is not specified

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.15.1
    • Fix Version/s: 2.3.16
    • Component/s: None
    • Labels:
      None
    • Environment:

      JBoss AS7+ Spring on Ubuntu

      Description

      I'm facing a problem when i don't specify name attribute in struts select tag, where the same tag was working fine in earlier release (2.3.4 *) . My select tag is as follows

      <s:select headerKey="" headerValue="%{getText('sel.dept')}" id="departments"  list="dropdownData.departments"
      listValue="deptName" listKey="id"  theme="simple" tabindex="1"  multiple="true" size="5" cssStyle="min-width:130px"/>
      

      The exception is as follows and it got disappeared when i add name attribute

      ERROR [freemarker.runtime] (http-localhost/127.0.0.1:8080-3) Template processing error: "Expression parameters.name is undefined on line 122, column 85 in template/simple/select.ftl.": freemarker.core.InvalidReferenceException: Expression parameters.name is undefined on line 122, column 85 in template/simple/select.ftl.
      	at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:125) [freemarker-2.3.19.jar:2.3.19]
      	at freemarker.core.Expression.getStringValue(Expression.java:118) [freemarker-2.3.19.jar:2.3.19]
      	at freemarker.core.Expression.getStringValue(Expression.java:93) [freemarker-2.3.19.jar:2.3.19]
      	at freemarker.core.StringBuiltins$StringBuiltIn._getAsTemplateModel(StringBuiltins.java:71) [freemarker-2.3.19.jar:2.3.19]
      	at freemarker.core.Expression.getAsTemplateModel(Expression.java:89) [freemarker-2.3.19.jar:2.3.19]
      	at freemarker.core.Expression.getStringValue(Expression.java:93) [freemarker-2.3.19.jar:2.3.19]
      	at freemarker.core.DollarVariable.accept(DollarVariable.java:76) [freemarker-2.3.19.jar:2.3.19]
      	at freemarker.core.Environment.visit(Environment.java:221) [freemarker-2.3.19.jar:2.3.19]
      	at freemarker.core.MixedContent.accept(MixedContent.java:92) [freemarker-2.3.19.jar:2.3.19]
      	at freemarker.core.Environment.visit(Environment.java:221) [freemarker-2.3.19.jar:2.3.19]
      	at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79) [freemarker-2.3.19.jar:2.3.19]
      	at freemarker.core.Environment.visit(Environment.java:221) [freemarker-2.3.19.jar:2.3.19]
      	at freemarker.core.MixedContent.accept(MixedContent.java:92) [freemarker-2.3.19.jar:2.3.19]
      	at freemarker.core.Environment.visit(Environment.java:221) [freemarker-2.3.19.jar:2.3.19]
      	at freemarker.core.Environment.process(Environment.java:199) [freemarker-2.3.19.jar:2.3.19]
      	at freemarker.template.Template.process(Template.java:259) [freemarker-2.3.19.jar:2.3.19]
      	at org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate(FreemarkerTemplateEngine.java:157) [struts2-core-2.3.15.jar:2.3.15]
      	at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:572) [struts2-core-2.3.15.jar:2.3.15]
      	at org.apache.struts2.components.UIBean.end(UIBean.java:526) [struts2-core-2.3.15.jar:2.3.15]
      	at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42) [struts2-core-2.3.15.jar:2.3.15]
      	at org.apache.jsp.WEB_002dINF.jsp.dms.notificationGroup_jsp._jspx_meth_s_005fselect_005f0(notificationGroup_jsp.java:1171)
      	at org.apache.jsp.WEB_002dINF.jsp.dms.notificationGroup_jsp._jspx_meth_s_005fpush_005f0(notificationGroup_jsp.java:438)
      	at org.apache.jsp.WEB_002dINF.jsp.dms.notificationGroup_jsp._jspx_meth_s_005fform_005f0(notificationGroup_jsp.java:294)
      	at org.apache.jsp.WEB_002dINF.jsp.dms.notificationGroup_jsp._jspService(notificationGroup_jsp.java:157)
      	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:69) [jbossweb-7.2
      

        Attachments

          Activity

            People

            • Assignee:
              bphillips Bruce Phillips
              Reporter:
              nick.sree nick
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: