It appears the JSF spec has an oversight where it requires a hidden field embedded in each form with an id="javax.faces.ViewState". This obviously isn't going to be unique if you have more than one form on your page (which is not that uncommon). Of course, ids are supposed to be unique per page.
Mojarra has a context param that allows you to omit the id (com.sun.faces.enableViewStateIdRendering). However, disabling the views state id rendering may have bad consequences if PrimeFaces expects the id to be there. So, I'm hoping PrimeFaces doesn't rely on that id, but I'd appreciate confirmation that it doesn't.
Duplicate view state id
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
PrimeFaces uses name attribute instead of id so it should be safe.
- bumble.bee
- Posts: 723
- Joined: 29 Sep 2010, 21:39
- Location: United States
That's great to hear. Thanks. I hope the spec is updated soon so that implementation specific workarounds won't be necessary in the future.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 39 guests