[JBoss JIRA] (JBSEAM-4947) <s:decorate /> tag breaks JSF2 f:ajax functionality
by Marek Novotny (JIRA)
[ https://issues.jboss.org/browse/JBSEAM-4947?page=com.atlassian.jira.plugi... ]
Marek Novotny closed JBSEAM-4947.
---------------------------------
Assignee: Marek Novotny
Resolution: Won't Fix
I am closing this issue as the explanation why UIDecorate implements NamingContainer was given and this issue is more like issue in JSF2. Look at http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-573 and that won't be fixed as it is closed as Won't fix
> <s:decorate /> tag breaks JSF2 f:ajax functionality
> ---------------------------------------------------
>
> Key: JBSEAM-4947
> URL: https://issues.jboss.org/browse/JBSEAM-4947
> Project: Seam 2
> Issue Type: Bug
> Components: JSF Integration
> Affects Versions: 2.3.0.BETA1, 2.3.0.Final
> Environment: JBOSS 7.1.1 Final + RichFaces 4.2.0.Final + Seam 2.3.0.Beta1
> Reporter: Andrea Martino
> Assignee: Marek Novotny
> Labels: jsf21, starter, taglib
> Fix For: 2.3.1.CR1
>
>
> The following XHTML page in JSF2 works fine with no issues. Everything the value in the input field is modified, the page is refreshed with AJAX and the value entered in the input field is displayed in the page.
> {code:xml:title=Working JSF}
> <h:form id="frm">
> <s:div id="enclosingDiv">
> <h:inputText id="myInput" value="#{testtest.text}" styleClass="#{invalid?'error':''}"
> required="true" autocomplete="off" maxlength="20">
> <f:ajax render="enclosingDiv"/>
> </h:inputText>
> <div>
> <h2>The entered value is</h2>
> <h:outputText value="#{testtest.text}" />
> </div>
> </s:div>
> </h:form>
> {code}
> This works fine and it is the expected behavior.
> If the input field is enclosed by a <s:decorate /> tag as following, and exception is thrown and the page is not rendered.
> {code:xml:title=Not working JSF}
> <h:form id="frm">
> <s:div id="enclosingDiv">
> <s:decorate id="myDecorator">
> <h:inputText id="myInput" value="#{testtest.text}" styleClass="#{invalid?'error':''}"
> required="true" autocomplete="off" maxlength="20">
> <f:ajax render="enclosingDiv"/>
> </h:inputText>
> </s:decorate>
> <div>
> <h2>The entered value is</h2>
> <h:outputText value="#{testtest.text}" />
> </div>
> </s:div>
> </h:form>
> {code}
> The output is:
> {noformat}
> Caused by javax.faces.FacesException with message: "<f:ajax> contains an unknown id 'enclosingDiv' - cannot locate it in the context of the component myInput"
> com.sun.faces.renderkit.html_basic.AjaxBehaviorRenderer.getResolvedId(AjaxBehaviorRenderer.java:285)
> com.sun.faces.renderkit.html_basic.AjaxBehaviorRenderer.appendIds(AjaxBehaviorRenderer.java:272)
> com.sun.faces.renderkit.html_basic.AjaxBehaviorRenderer.buildAjaxCommand(AjaxBehaviorRenderer.java:214)
> com.sun.faces.renderkit.html_basic.AjaxBehaviorRenderer.getScript(AjaxBehaviorRenderer.java:86)
> javax.faces.component.behavior.ClientBehaviorBase.getScript(ClientBehaviorBase.java:103)
> com.sun.faces.renderkit.RenderKitUtils.getSingleBehaviorHandler(RenderKitUtils.java:1607)
> com.sun.faces.renderkit.RenderKitUtils.renderHandler(RenderKitUtils.java:1700)
> com.sun.faces.renderkit.RenderKitUtils.renderOnchange(RenderKitUtils.java:388)
> com.sun.faces.renderkit.html_basic.TextRenderer.getEndTextToRender(TextRenderer.java:134)
> com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:170)
> javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
> org.jboss.seam.ui.util.cdk.RendererBase.renderChild(RendererBase.java:190)
> org.jboss.seam.ui.util.cdk.RendererBase.renderChildren(RendererBase.java:166)
> org.jboss.seam.ui.renderkit.DecorateRendererBase.doEncodeChildren(DecorateRendererBase.java:152)
> org.jboss.seam.ui.util.cdk.RendererBase.encodeChildren(RendererBase.java:92)
> javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
> javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)
> javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
> javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
> javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
> javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)
> javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
> javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
> javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
> com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:402)
> com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125)
> org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:88)
> javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)
> javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)
> org.apache.myfaces.tomahawk.application.ResourceViewHandlerWrapper.renderView(ResourceViewHandlerWrapper.java:93)
> com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
> com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
> com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
> {noformat}
> The addition of the <s:decorate /> tag breaks the AJAX functionality.j
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 8 months
[JBoss JIRA] (JBSEAM-5080) Seam2.3 NPE in Interpolator.interpolate if pages.xml exception http-error no message set
by Marek Novotny (JIRA)
[ https://issues.jboss.org/browse/JBSEAM-5080?page=com.atlassian.jira.plugi... ]
Marek Novotny resolved JBSEAM-5080.
-----------------------------------
Resolution: Done
> Seam2.3 NPE in Interpolator.interpolate if pages.xml exception http-error no message set
> ----------------------------------------------------------------------------------------
>
> Key: JBSEAM-5080
> URL: https://issues.jboss.org/browse/JBSEAM-5080
> Project: Seam 2
> Issue Type: Bug
> Affects Versions: 2.3.0.Final
> Reporter: Marek Schmidt
> Assignee: Marek Novotny
> Fix For: 2.3.1.CR1
>
>
> Having a exception handler with no message, e.g.
> <exception
> class="org.jboss.seam.example.tasks.ResourceNotFoundException"
> log-level="debug">
> <http-error error-code="404"/>
> </exception>
> in pages.xml
> will cause an HTTP error 500 instead with a NPE exception:
> java.lang.NullPointerException
> org.jboss.seam.core.Interpolator.interpolate(Interpolator.java:64)
> org.jboss.seam.faces.Navigator.getDisplayMessage(Navigator.java:87)
> org.jboss.seam.exception.ErrorHandler.handle(ErrorHandler.java:27)
> org.jboss.seam.exception.Exceptions.handle(Exceptions.java:76)
> org.jboss.seam.web.ExceptionFilter.endWebRequestAfterException(ExceptionFilter.java:114)
> org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:70)
> org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
> org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
> org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
> org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
>
> Actual results:
> Error 500 with NPE
> Expected results:
> Error 404 with an empty or some default message should appear.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 8 months
[JBoss JIRA] (JBSEAM-5080) Seam2.3 NPE in Interpolator.interpolate if pages.xml exception http-error no message set
by Marek Novotny (JIRA)
[ https://issues.jboss.org/browse/JBSEAM-5080?page=com.atlassian.jira.plugi... ]
Marek Novotny reassigned JBSEAM-5080:
-------------------------------------
Assignee: Marek Novotny
> Seam2.3 NPE in Interpolator.interpolate if pages.xml exception http-error no message set
> ----------------------------------------------------------------------------------------
>
> Key: JBSEAM-5080
> URL: https://issues.jboss.org/browse/JBSEAM-5080
> Project: Seam 2
> Issue Type: Bug
> Affects Versions: 2.3.0.Final
> Reporter: Marek Schmidt
> Assignee: Marek Novotny
> Fix For: 2.3.1.CR1
>
>
> Having a exception handler with no message, e.g.
> <exception
> class="org.jboss.seam.example.tasks.ResourceNotFoundException"
> log-level="debug">
> <http-error error-code="404"/>
> </exception>
> in pages.xml
> will cause an HTTP error 500 instead with a NPE exception:
> java.lang.NullPointerException
> org.jboss.seam.core.Interpolator.interpolate(Interpolator.java:64)
> org.jboss.seam.faces.Navigator.getDisplayMessage(Navigator.java:87)
> org.jboss.seam.exception.ErrorHandler.handle(ErrorHandler.java:27)
> org.jboss.seam.exception.Exceptions.handle(Exceptions.java:76)
> org.jboss.seam.web.ExceptionFilter.endWebRequestAfterException(ExceptionFilter.java:114)
> org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:70)
> org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
> org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
> org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
> org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
>
> Actual results:
> Error 500 with NPE
> Expected results:
> Error 404 with an empty or some default message should appear.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 8 months
[JBoss JIRA] (JBSEAM-5080) Seam2.3 NPE in Interpolator.interpolate if pages.xml exception http-error no message set
by Marek Novotny (JIRA)
Marek Novotny created JBSEAM-5080:
-------------------------------------
Summary: Seam2.3 NPE in Interpolator.interpolate if pages.xml exception http-error no message set
Key: JBSEAM-5080
URL: https://issues.jboss.org/browse/JBSEAM-5080
Project: Seam 2
Issue Type: Bug
Affects Versions: 2.3.0.Final
Reporter: Marek Schmidt
Fix For: 2.3.1.CR1
Having a exception handler with no message, e.g.
<exception
class="org.jboss.seam.example.tasks.ResourceNotFoundException"
log-level="debug">
<http-error error-code="404"/>
</exception>
in pages.xml
will cause an HTTP error 500 instead with a NPE exception:
java.lang.NullPointerException
org.jboss.seam.core.Interpolator.interpolate(Interpolator.java:64)
org.jboss.seam.faces.Navigator.getDisplayMessage(Navigator.java:87)
org.jboss.seam.exception.ErrorHandler.handle(ErrorHandler.java:27)
org.jboss.seam.exception.Exceptions.handle(Exceptions.java:76)
org.jboss.seam.web.ExceptionFilter.endWebRequestAfterException(ExceptionFilter.java:114)
org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:70)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
Actual results:
Error 500 with NPE
Expected results:
Error 404 with an empty or some default message should appear.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 8 months