[
https://issues.apache.org/jira/browse/MYFACES-1700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Manfred Geiler resolved MYFACES-1700.
-------------------------------------
Resolution: Fixed
Fix Version/s: 1.1.6-SNAPSHOT
Assignee: Manfred Geiler
This is a spec bug in JSF 1.2:
http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/javax/faces/render/ResponseStateManager.html#VIEW_STATE_PARAM
However, the id is actually not needed (in MyFaces) unless some special (AJAX)
components wanna do some Javascript magic.
Therefore I added a (MyFaces specific) config parameter:
org.apache.myfaces.RENDER_VIEWSTATE_ID
The default value is false for backwards compatibility.
So, adding
<context-param>
<description>
Do not render the "javax.jsf.ViewState" id attribute for
view state hidden inputs. Necessary for valid XHTML on multiple
forms on one page.
</description>
<param-name>org.apache.myfaces.RENDER_VIEWSTATE_ID</param-name>
<param-value>false</param-value>
</context-param>
to your web.xml makes multiple form jsf pages XHTML valid.
--Manfred
> each <h:form> generated an <input> with same id="javax.faces.ViewState"
> ------------------------------------------------------------------------
>
> Key: MYFACES-1700
> URL: https://issues.apache.org/jira/browse/MYFACES-1700
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 1.1.5
> Environment: I am using Tomcat 5.5. inside of JBoss 4.0.2.
> Reporter: Marcus Beyer
> Assignee: Manfred Geiler
> Fix For: 1.1.6-SNAPSHOT
>
>
> On pages with more than one <h:form>, each one generates an element which has
> always the same id, which is invalid HTML.
> Looks like this:
> ...</script><input type="hidden" name="javax.faces.ViewState"
> id="javax.faces.ViewState" value="..." /></form>
> I tried to put it inside <f:subview> as a workaround, but that did not work
> either (the ids did not change).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.