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

please change reset.ftl so html id is not lost

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 2.3.8
    • 2.5.8
    • Plugin - Tags
    • Struts 2 and spring using freemarker

    • Patch

    Description

      Using this two lines in JSP:

      <s:submit id="advsearchsubmit" value="Search" cssClass="tinput" title="Search" />
      <s:reset id="advsearchreset" value="Clear" cssClass="tinput" title="Clear" />
      

      will generate

      <s:submit id="submit_id" value="Search" cssClass="tinput" title="Search" />
      <s:reset id="reset_id" value="Clear" cssClass="tinput" title="Clear" />
      

      will generate

      <input type="submit" id="submit_id" value="Search" class="tinput" title="Search"/>
      <input type="reset" name="Clear" value="Clear" class="tinput" title="Clear"/>
      

      The reset.ftl file should be modified:
      add

      <#if parameters.id??>
       id="${parameters.id?html}"<#rt/>
      </#if>
      

      after

      <button type="reset"<#rt/>
      

      and also

      <#if parameters.id??>
       id="${parameters.id?html}"<#rt/>
      </#if>
      

      after

      <input type="reset"<#rt/>
      

      Attachments

        Activity

          People

            lukaszlenart Lukasz Lenart
            saman1000 Saman Moshafi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: