[
https://jira.jboss.org/browse/JBSEAM-4717?page=com.atlassian.jira.plugin....
]
Valeriy Molyakov updated JBSEAM-4717:
-------------------------------------
Description:
NPE raised during double submit when use s:token
Caused by java.lang.NullPointerException with message: ""
org.jboss.seam.ui.renderkit.TokenRendererBase.generateViewSignature(TokenRendererBase.java:177)
org.jboss.seam.ui.renderkit.TokenRendererBase.doDecode(TokenRendererBase.java:108)
org.jboss.seam.ui.util.cdk.RendererBase.decode(RendererBase.java:59)
javax.faces.component.UIComponentBase.decode(UIComponentBase.java:789)
javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1031)
javax.faces.component.UIForm.processDecodes(UIForm.java:209)
org.ajax4jsf.component.AjaxViewRoot$1.invokeContextCallback(AjaxViewRoot.java:400)
line 177
String renderStamp = form.getAttributes().get(RENDER_STAMP_ATTR).toString();
RENDER_STAMP_ATTR is removed during first form submit.
When you submit the same form second time NPE is raised becuse attribute is not in the map
anymore.
was:
NPE raised when use s:token
Caused by java.lang.NullPointerException with message: ""
org.jboss.seam.ui.renderkit.TokenRendererBase.generateViewSignature(TokenRendererBase.java:177)
org.jboss.seam.ui.renderkit.TokenRendererBase.doDecode(TokenRendererBase.java:108)
org.jboss.seam.ui.util.cdk.RendererBase.decode(RendererBase.java:59)
javax.faces.component.UIComponentBase.decode(UIComponentBase.java:789)
javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1031)
javax.faces.component.UIForm.processDecodes(UIForm.java:209)
org.ajax4jsf.component.AjaxViewRoot$1.invokeContextCallback(AjaxViewRoot.java:400)
line 177
String renderStamp = form.getAttributes().get(RENDER_STAMP_ATTR).toString();
RENDER_STAMP_ATTR is removed during form submit. If you try to make double submit
attribute is missing in the map and NPE raised.
Steps to Reproduce:
1. Create test.xhml view which contains following form definition:
<h:form>
<s:token/>
<h:inputText id="name" value="#{test.name}" />
<h:commandButton value="Submit"
action="/page/test1.seam" />
</h:form>
2. Create test1.xhtml view (used to navigate from test.xhtml)
3. Open test.xhtml view in browser (IE, Firefox etc.)
4. Press form submit button, test1.xhtml should be opened in browser
5. Press browser's BACK button, test.view should be displayed in browser
6. Press submit button once again (this is a double submit)
7. NPE is raised (seam debug page is opened)
Test views are attached to the defect.
was:
1. create test.xhml view which contains form definition:
<h:form>
<s:token/>
<h:inputText id="name" value="#{test.name}" />
<h:commandButton value="Submit"
action="/page/test1.seam" />
</h:form>
2. Create test1.xhtml
3. Open test.seam
4. Press submit button on form
5. When test1 view is displayed press browser BACK button
6. On test view press submit button again (double submit)
7. NPE is raised
5.
NPE in s:token
--------------
Key: JBSEAM-4717
URL:
https://jira.jboss.org/browse/JBSEAM-4717
Project: Seam
Issue Type: Bug
Components: JSF Controls
Affects Versions: 2.2.0.GA
Environment: JBOSS 5.1.0.GA JETTY 6.1.25 Seam 2.2.0.GA + Sun RI JSF 1.2_13
Reporter: Valeriy Molyakov
Attachments: reproduce.7z
NPE raised during double submit when use s:token
Caused by java.lang.NullPointerException with message: ""
org.jboss.seam.ui.renderkit.TokenRendererBase.generateViewSignature(TokenRendererBase.java:177)
org.jboss.seam.ui.renderkit.TokenRendererBase.doDecode(TokenRendererBase.java:108)
org.jboss.seam.ui.util.cdk.RendererBase.decode(RendererBase.java:59)
javax.faces.component.UIComponentBase.decode(UIComponentBase.java:789)
javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1031)
javax.faces.component.UIForm.processDecodes(UIForm.java:209)
org.ajax4jsf.component.AjaxViewRoot$1.invokeContextCallback(AjaxViewRoot.java:400)
line 177
String renderStamp = form.getAttributes().get(RENDER_STAMP_ATTR).toString();
RENDER_STAMP_ATTR is removed during first form submit.
When you submit the same form second time NPE is raised becuse attribute is not in the
map anymore.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira