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

please change reset.ftl so html id is not lost

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 2.3.8
    • Fix Version/s: 2.5.8
    • Component/s: Plugin - Tags
    • Labels:
    • Environment:

      Struts 2 and spring using freemarker

    • Flags:
      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/>
      

        Activity

        Hide
        lukaszlenart Lukasz Lenart added a comment -

        reset.ftl already contains support for id parameter

        <#if parameters.id??>
            id="wwctrl_${parameters.id}"<#rt/>
        </#if>
        
        Show
        lukaszlenart Lukasz Lenart added a comment - reset.ftl already contains support for id parameter <#if parameters.id??> id= "wwctrl_${parameters.id}" <#rt/> </#if>
        Hide
        lukaszlenart Lukasz Lenart added a comment -

        The change you are propose will basically break css_xhtml theme as with this theme id is used as you want to.

        Show
        lukaszlenart Lukasz Lenart added a comment - The change you are propose will basically break css_xhtml theme as with this theme id is used as you want to.
        Hide
        pluppens Philip Luppens added a comment -

        This report is incomprehensible: are you saying that the id attribute on the reset component is not kept?

        Please structure & review your ticket. There is a question marker below that explains how to format your content so code block are properly displayed. I didn't touch your comment because I have no idea what you're actually trying to say.

        Show
        pluppens Philip Luppens added a comment - This report is incomprehensible: are you saying that the id attribute on the reset component is not kept? Please structure & review your ticket. There is a question marker below that explains how to format your content so code block are properly displayed. I didn't touch your comment because I have no idea what you're actually trying to say.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development