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

FreeMarker dynamic attributes cannot be boolean

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Not A Problem
    • 2.3.4
    • 2.3.7
    • Core Actions
    • None

    Description

      The code below will produce an exception

      <@s.text type="email" key="user.email" required=true autofocus=true />
      
      Method public java.lang.String org.apache.struts2.util.StrutsUtil.translateVariables(java.lang.String) threw an exception when invoked on org.apache.struts2.util.StrutsUtil@540948a7
      The problematic instruction:
      ----------
      ==> assignment: value=struts.translateVariables(keyValue)!keyValue [on line 27, column 3 in /themes/simple/dynamic-attributes.ftl]
       in include "/${parameters.templateDir}/simple/dynamic-attributes.ftl" [on line 52, column 1 in /themes/simple/text.ftl]
       in include "/${parameters.templateDir}/simple/text.ftl" [on line 25, column 1 in /themes/my-custom-theme/text.ftl]
      ----------
      

      Attachments

        Activity

          People

            lukaszlenart Lukasz Lenart
            lukaszlenart Lukasz Lenart
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: