struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Benedict (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (WW-4364) Form @id and @name are not actually unique
Date Wed, 25 Jun 2014 06:13:24 GMT

     [ https://issues.apache.org/jira/browse/WW-4364?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Paul Benedict updated WW-4364:
------------------------------

    Description: 
I am placing a form to the same action multiple time each with different hidden attributes:
{code}
<s:form action="myAction">
  <s:hidden name="enabled" value="true"/>
  <s:submit value="Enable" />
</s:form>
<s:form action="myAction">
  <s:hidden name="enabled" value="false"/>
  <s:submit value="Disable" />
</s:form>
{code}

Conceptually there should be no problem with this. However, the form's @id and @name attributes
are not rendered unique. Struts should use a global counter to append a counter to the names
of each attribute automatically. If the user wants to override these attributes explicitly,
that should be allowed.

  was:
I am placing a form to the same action multiple time each with different hidden attributes:
{code}
<s:form action="myAction">
  <s:hidden name="enabled" value="true"/>
  <s:submit value="Enable" />
</s:form>
<s:form action="myAction">
  <s:hidden name="enabled" value="false"/>
  <s:submit value="Disable" />
</s:form>
{code}

Conceptually there should be no problem with this. However, the form's @id and @name attributes
are not rendered unique. Struts should use a global counter to append a counter at the name
of each automatically. If the user wants to override these attributes explicitly, that should
be allowed.


> Form @id and @name are not actually unique
> ------------------------------------------
>
>                 Key: WW-4364
>                 URL: https://issues.apache.org/jira/browse/WW-4364
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.3.16.3
>            Reporter: Paul Benedict
>
> I am placing a form to the same action multiple time each with different hidden attributes:
> {code}
> <s:form action="myAction">
>   <s:hidden name="enabled" value="true"/>
>   <s:submit value="Enable" />
> </s:form>
> <s:form action="myAction">
>   <s:hidden name="enabled" value="false"/>
>   <s:submit value="Disable" />
> </s:form>
> {code}
> Conceptually there should be no problem with this. However, the form's @id and @name
attributes are not rendered unique. Struts should use a global counter to append a counter
to the names of each attribute automatically. If the user wants to override these attributes
explicitly, that should be allowed.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message