You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Guy Bashan <gu...@gmail.com> on 2008/05/06 10:29:48 UTC

Postback

Hi,

 

Is this a legitimate way of checking postback request?

 

  public static boolean isPostBack()

  {

    return
FacesUtil.getFacesContext().getRenderKit().getResponseStateManager().isPostb
ack(getFacesContext());

  }

 

Thanks,

Guy.


RE: tobago problems with Websphere 6.1

Posted by "Nutulapati, Krishna" <KN...@ussco.com>.
 
Hi Salvador,
Can you please send me the sample from tobago, that is working fine with
websphere 6.1?
It would really helpful for me..I appreciate your help.
Thanks
Krishna. 

-----Original Message-----
From: Bravo Villegas Salvador Francisco [mailto:SBRAVO@sigmatao.com] 
Sent: Thursday, May 08, 2008 12:50 PM
To: MyFaces Discussion
Subject: RE: tobago problems with Websphere 6.1

Hi,

Thanks, it Works
But my RAD still having the Warning of Unknown tag (jsp:body) and
Unknown tag (layout:overview).

Any ideas?

Regards
Salvador B.


-----Mensaje original-----
De: Stojan Peshov [mailto:goodusername@gmail.com] Enviado el: Jueves, 08
de Mayo de 2008 12:35 p.m.
Para: MyFaces Discussion
Asunto: Re: tobago problems with Websphere 6.1

You'll have to start every jsp with f:subview

ex:
<layout:somelayout>
    <f:subview id="sub">
        <jsp:body>
            <tc:panel>
....

Don't ask me why :)


On Thu, May 8, 2008 at 5:39 PM, Bravo Villegas Salvador Francisco
<SB...@sigmatao.com> wrote:
> Hi,
>
>  I check the WAR and take it off the myfaces-impl and myfaces-api from
it, and send the same errors.
>  What else can I do?
>
>  Regards,
>  Salvador B.

RE: tobago problems with Websphere 6.1

Posted by "Nutulapati, Krishna" <KN...@ussco.com>.
 Hello All,
Thanks for sending me the sample. It is working fine with websphere6.1,
after changing the loading process. 
However,while integrating few features into my application, as I'm using
LDAP Security in my application, when I change the loading process I end
up with exceptions. 
The taglibraries are not working without changing the load process. 
In factI tried to integrated tomahawk taglibrarary in my application by
changing the load process but failed. Please look into detailed
description.
Your help would be highly appreciated. 
Here is the information regarding websphere problem 

Aim:- Sort the columns of datatable using jsf

Environment: - JSF,Spring,Hibernate with websphere6.1

I tried to solve this problem with 2 alternative solutions.,but end up
with exceptions. 

Solution 1:-Integrated Tomahawk 1.1.6 TagLibraries, in my application 

JAR Files in the project are as follows. 

antlr-2.7.7.jarcglib-2.2_beta1.jar,cglib-nodep-2.2_beta1.jar,commons-bea
nutils.jar, commons-collections-3.2.jar, 

commons-digester.jar commons-lang-2.4.jar,dom4j-1.6.1.jar
ehcache-1.3.0.jar, el-api-1.0.jar el-impl-1.0.jar, hibernate3.jar, 

jcifs-1.2.18.jar, jsf-api-1.2_04-p02.jar , jsf-facelets.jar,
myfaces-all.jar, servlet-api-2.4.jar,

spring-ldap-1.2.1.jar, spring.jar and tomahawk-1.1.6.jar

I did n't change the loading process, but when I click on datatable
page, where exactly tomahawk taglibraries are integrated,I end up with
following excpetions. 

Exceptions in brief in the console are as follows. :- 

 

Uncaught exception thrown in one of the service methods of the servlet:
Faces Servlet. Exception thrown: java.lang.ExceptionInInitializerError

 

Caused by: java.util.MissingResourceException: Can't find bundle for
base name com.sun.el.Messages, locale en_US

at
java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.ja
va:853)

at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:822)

at java.util.ResourceBundle.getBundle(ResourceBundle.java:566)

at com.sun.el.util.MessageFactory.<clinit>(Unknown Source)

at java.lang.J9VMInternals.initializeImpl(Native Method)

at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)

 

 

Understanding over the problem:- Seems lik2 2 implementations of JSF is
providing ambiguity, and need to Remove RI from websphere. 

Solution2:- Alter the module classloader policy to application first.

Click on Enterprise Applications > My application > Manage Modules > My
war file > Change Class loader order to "Classes loaded with application
class loader first" 

Environment:- Same as solution1

Exception in brief:- 

[5/7/08 16:29:23:986 CDT] 00000023 WebApp E [Servlet Error]-[Filter
[NtlmHttpFilter]: not a filter class]: java.lang.ClassCastException:
jcifs.http.NtlmHttpFilter incompatible with javax.servlet.Filter

 

 

Understanding over the problem:- Though 2 implementations of JSF is
providing ambiguity, alter the module class loader policy is not
helping, as LDAP Security implemented in the application needs websphere
RI Classes to be 

Loaded first. 

 

 

Please help me with appropriate solution. 

Thanks

Krishna 

 

 

 

 




------------------------------------------------------------------------
--------
From: Bravo Villegas Salvador Francisco [mailto:SBRAVO@sigmatao.com] 
Sent: Thursday, May 08, 2008 1:20 PM
To: Nutulapati, Krishna
Subject: TOBAGO.war working in WAS 6.1


Krishna,

 

This is the war with the example running.

Anything else that you need, please let me know it.

 

Regards,

Salvador B.

-----Original Message-----
From: Bravo Villegas Salvador Francisco [mailto:SBRAVO@sigmatao.com] 
Sent: Thursday, May 08, 2008 12:50 PM
To: MyFaces Discussion
Subject: RE: tobago problems with Websphere 6.1

Hi,

Thanks, it Works
But my RAD still having the Warning of Unknown tag (jsp:body) and
Unknown tag (layout:overview).

Any ideas?

Regards
Salvador B.


-----Mensaje original-----
De: Stojan Peshov [mailto:goodusername@gmail.com] Enviado el: Jueves, 08
de Mayo de 2008 12:35 p.m.
Para: MyFaces Discussion
Asunto: Re: tobago problems with Websphere 6.1

You'll have to start every jsp with f:subview

ex:
<layout:somelayout>
    <f:subview id="sub">
        <jsp:body>
            <tc:panel>
....

Don't ask me why :)


On Thu, May 8, 2008 at 5:39 PM, Bravo Villegas Salvador Francisco
<SB...@sigmatao.com> wrote:
> Hi,
>
>  I check the WAR and take it off the myfaces-impl and myfaces-api from
it, and send the same errors.
>  What else can I do?
>
>  Regards,
>  Salvador B.

RE: tobago problems with Websphere 6.1

Posted by Bravo Villegas Salvador Francisco <SB...@sigmatao.com>.
Hi,

Thanks, it Works
But my RAD still having the Warning of Unknown tag (jsp:body) and
Unknown tag (layout:overview).

Any ideas?

Regards
Salvador B.


-----Mensaje original-----
De: Stojan Peshov [mailto:goodusername@gmail.com] 
Enviado el: Jueves, 08 de Mayo de 2008 12:35 p.m.
Para: MyFaces Discussion
Asunto: Re: tobago problems with Websphere 6.1

You'll have to start every jsp with f:subview

ex:
<layout:somelayout>
    <f:subview id="sub">
        <jsp:body>
            <tc:panel>
....

Don't ask me why :)


On Thu, May 8, 2008 at 5:39 PM, Bravo Villegas Salvador Francisco
<SB...@sigmatao.com> wrote:
> Hi,
>
>  I check the WAR and take it off the myfaces-impl and myfaces-api from
it, and send the same errors.
>  What else can I do?
>
>  Regards,
>  Salvador B.

Re: tobago problems with Websphere 6.1

Posted by Stojan Peshov <go...@gmail.com>.
You'll have to start every jsp with f:subview

ex:
<layout:somelayout>
    <f:subview id="sub">
        <jsp:body>
            <tc:panel>
....

Don't ask me why :)


On Thu, May 8, 2008 at 5:39 PM, Bravo Villegas Salvador Francisco
<SB...@sigmatao.com> wrote:
> Hi,
>
>  I check the WAR and take it off the myfaces-impl and myfaces-api from it, and send the same errors.
>  What else can I do?
>
>  Regards,
>  Salvador B.

RE: tobago problems with Websphere 6.1

Posted by Bravo Villegas Salvador Francisco <SB...@sigmatao.com>.
Hi,

I check the WAR and take it off the myfaces-impl and myfaces-api from it, and send the same errors.
What else can I do?

Regards,
Salvador B.

-----Mensaje original-----
De: Arvid Hülsebus [mailto:arvid.huelsebus@atanion.com] 
Enviado el: Jueves, 08 de Mayo de 2008 02:42 a.m.
Para: MyFaces Discussion
Asunto: Re: tobago problems with Websphere 6.1

Hello

I know of 2 productive Tobago applications running on WebSphere 6.1. 
WebSphere 6.1 provides its own JSF implementation -- a variant of the 
Sun RI. Can you check if the WAR you are deploying contains a JSF 
implementation (myfaces-impl + myfaces-api or jsf-impl + jsf-api) and 
remove it?

If this doesn't work we will try reproduce the problem -- but our 
current download of WebSphere will last at least 60 more minutes.

Best regards
Arvid

Bravo Villegas Salvador Francisco wrote:
> Hi all,
>
> I'm trying to use the tobago example in a Websphere 6.1
> But I having troubles with the followings tags
> <layout:overview>
>   <jsp:body>
>
> That ones are not recognized by the server
> Generating the following error.
> Error Stack: 
> java.lang.NullPointerException 
>      at
> com.ibm.ws.jsp.translator.visitor.validator.ValidateVisitor.visitJspBody
> Start(ValidateVisitor.java:810) 
>      at
> com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisito
> r.java:243) 
>      at
> com.ibm.ws.jsp.translator.visitor.JspVisitor.processChildren(JspVisitor.
> java:309) 
>      at
> com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisito
> r.java:268) 
>      at
> com.ibm.ws.jsp.translator.visitor.JspVisitor.processChildren(JspVisitor.
> java:309) 
>      at
> com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisito
> r.java:139) 
>      at
> com.ibm.ws.jsp.translator.visitor.JspVisitor.visit(JspVisitor.java:121) 
>      at
> com.ibm.ws.jsp.translator.JspTranslator.processVisitors(JspTranslator.ja
> va:121) 
>      at
> com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJsp(JspTransl
> atorUtil.java:181) 
>      at
> com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJspAndCompile
> (JspTranslatorUtil.java:83) 
>      at
> com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.transl
> ateJsp(AbstractJSPExtensionServletWrapper.java:349) 
>      at
> com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper._check
> ForTranslation(AbstractJSPExtensionServletWrapper.java:317) 
>      at
> com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.checkF
> orTranslation(AbstractJSPExtensionServletWrapper.java:226) 
>      at
> com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handle
> Request(AbstractJSPExtensionServletWrapper.java:131) 
>      at
> com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleReque
> st(AbstractJSPExtensionProcessor.java:270) 
>      at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq
> uestDispatcher.java:308) 
>      at
> org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(S
> ervletExternalContextImpl.java:419) 
>      at
> org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspView
> HandlerImpl.java:211) 
>      at
> org.apache.myfaces.tobago.application.ViewHandlerImpl.renderView(ViewHan
> dlerImpl.java:98) 
>      at
> org.apache.myfaces.tobago.lifecycle.RenderResponseExecutor.execute(Rende
> rResponseExecutor.java:56) 
>      at
> org.apache.myfaces.tobago.lifecycle.TobagoLifecycle.render(TobagoLifecyc
> le.java:141) 
>      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140) 
>      at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja
> va:966) 
>      at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja
> va:907) 
>      at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
> ain.java:118) 
>      at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterC
> hain.java:87) 
>      at
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter
> Manager.java:701) 
>      at
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter
> Manager.java:646) 
>      at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrap
> per.java:475) 
>      at
> com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWr
> apper.java:463) 
>      at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq
> uestDispatcher.java:308) 
>      at
> org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:5
> 18) 
>      at com.ibm._jsp._index._jspService(_index.java:65) 
>      at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:85) 
>      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) 
>      at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja
> va:966) 
>      at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja
> va:907) 
>      at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
> ain.java:118) 
>      at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterC
> hain.java:87) 
>      at
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter
> Manager.java:701) 
>      at
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter
> Manager.java:646) 
>      at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrap
> per.java:475) 
>      at
> com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWr
> apper.java:463) 
>      at
> com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(G
> enericServletWrapper.java:115) 
>      at
> com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handle
> Request(AbstractJSPExtensionServletWrapper.java:168) 
>      at
> com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleReque
> st(AbstractJSPExtensionProcessor.java:270) 
>      at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq
> uestDispatcher.java:308) 
>      at
> com.ibm.ws.webcontainer.servlet.FilterProxyServlet.dispatch(FilterProxyS
> ervlet.java:61) 
>      at
> com.ibm.ws.webcontainer.servlet.FilterProxyServlet.service(FilterProxySe
> rvlet.java:41) 
>      at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja
> va:966) 
>      at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja
> va:907) 
>      at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
> ain.java:118) 
>      at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterC
> hain.java:87) 
>      at
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter
> Manager.java:701) 
>      at
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter
> Manager.java:646) 
>      at
> com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.invokeFilter
> s(DefaultExtensionProcessor.java:628) 
>      at
> com.ibm.ws.wswebcontainer.extension.DefaultExtensionProcessor.invokeFilt
> ers(DefaultExtensionProcessor.java:145) 
>      at
> com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleReques
> t(DefaultExtensionProcessor.java:467) 
>      at
> com.ibm.ws.wswebcontainer.extension.DefaultExtensionProcessor.handleRequ
> est(DefaultExtensionProcessor.java:111) 
>      at
> com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3129) 
>      at
> com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238)
>
>      at
> com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811
> ) 
>      at
> com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1
> 433) 
>      at
> com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:9
> 3) 
>      at
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscriminatio
> n(HttpInboundLink.java:465) 
>      at
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformatio
> n(HttpInboundLink.java:394) 
>      at
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLi
> nk.java:274) 
>      at
> com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscr
> iminators(NewConnectionInitialReadCallback.java:214) 
>      at
> com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(Ne
> wConnectionInitialReadCallback.java:113) 
>      at
> com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(Ai
> oReadCompletionListener.java:152) 
>      at
> com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.
> java:213) 
>      at
> com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsync
> Future.java:195) 
>      at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) 
>      at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194) 
>      at
> com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java
> :741) 
>      at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863) 
>      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
>
>   

Re: tobago problems with Websphere 6.1

Posted by Arvid Hülsebus <ar...@atanion.com>.
Hello

I know of 2 productive Tobago applications running on WebSphere 6.1. 
WebSphere 6.1 provides its own JSF implementation -- a variant of the 
Sun RI. Can you check if the WAR you are deploying contains a JSF 
implementation (myfaces-impl + myfaces-api or jsf-impl + jsf-api) and 
remove it?

If this doesn't work we will try reproduce the problem -- but our 
current download of WebSphere will last at least 60 more minutes.

Best regards
Arvid

Bravo Villegas Salvador Francisco wrote:
> Hi all,
>
> I'm trying to use the tobago example in a Websphere 6.1
> But I having troubles with the followings tags
> <layout:overview>
>   <jsp:body>
>
> That ones are not recognized by the server
> Generating the following error.
> Error Stack: 
> java.lang.NullPointerException 
>      at
> com.ibm.ws.jsp.translator.visitor.validator.ValidateVisitor.visitJspBody
> Start(ValidateVisitor.java:810) 
>      at
> com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisito
> r.java:243) 
>      at
> com.ibm.ws.jsp.translator.visitor.JspVisitor.processChildren(JspVisitor.
> java:309) 
>      at
> com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisito
> r.java:268) 
>      at
> com.ibm.ws.jsp.translator.visitor.JspVisitor.processChildren(JspVisitor.
> java:309) 
>      at
> com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisito
> r.java:139) 
>      at
> com.ibm.ws.jsp.translator.visitor.JspVisitor.visit(JspVisitor.java:121) 
>      at
> com.ibm.ws.jsp.translator.JspTranslator.processVisitors(JspTranslator.ja
> va:121) 
>      at
> com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJsp(JspTransl
> atorUtil.java:181) 
>      at
> com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJspAndCompile
> (JspTranslatorUtil.java:83) 
>      at
> com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.transl
> ateJsp(AbstractJSPExtensionServletWrapper.java:349) 
>      at
> com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper._check
> ForTranslation(AbstractJSPExtensionServletWrapper.java:317) 
>      at
> com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.checkF
> orTranslation(AbstractJSPExtensionServletWrapper.java:226) 
>      at
> com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handle
> Request(AbstractJSPExtensionServletWrapper.java:131) 
>      at
> com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleReque
> st(AbstractJSPExtensionProcessor.java:270) 
>      at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq
> uestDispatcher.java:308) 
>      at
> org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(S
> ervletExternalContextImpl.java:419) 
>      at
> org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspView
> HandlerImpl.java:211) 
>      at
> org.apache.myfaces.tobago.application.ViewHandlerImpl.renderView(ViewHan
> dlerImpl.java:98) 
>      at
> org.apache.myfaces.tobago.lifecycle.RenderResponseExecutor.execute(Rende
> rResponseExecutor.java:56) 
>      at
> org.apache.myfaces.tobago.lifecycle.TobagoLifecycle.render(TobagoLifecyc
> le.java:141) 
>      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140) 
>      at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja
> va:966) 
>      at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja
> va:907) 
>      at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
> ain.java:118) 
>      at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterC
> hain.java:87) 
>      at
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter
> Manager.java:701) 
>      at
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter
> Manager.java:646) 
>      at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrap
> per.java:475) 
>      at
> com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWr
> apper.java:463) 
>      at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq
> uestDispatcher.java:308) 
>      at
> org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:5
> 18) 
>      at com.ibm._jsp._index._jspService(_index.java:65) 
>      at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:85) 
>      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) 
>      at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja
> va:966) 
>      at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja
> va:907) 
>      at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
> ain.java:118) 
>      at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterC
> hain.java:87) 
>      at
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter
> Manager.java:701) 
>      at
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter
> Manager.java:646) 
>      at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrap
> per.java:475) 
>      at
> com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWr
> apper.java:463) 
>      at
> com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(G
> enericServletWrapper.java:115) 
>      at
> com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handle
> Request(AbstractJSPExtensionServletWrapper.java:168) 
>      at
> com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleReque
> st(AbstractJSPExtensionProcessor.java:270) 
>      at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq
> uestDispatcher.java:308) 
>      at
> com.ibm.ws.webcontainer.servlet.FilterProxyServlet.dispatch(FilterProxyS
> ervlet.java:61) 
>      at
> com.ibm.ws.webcontainer.servlet.FilterProxyServlet.service(FilterProxySe
> rvlet.java:41) 
>      at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja
> va:966) 
>      at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja
> va:907) 
>      at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
> ain.java:118) 
>      at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterC
> hain.java:87) 
>      at
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter
> Manager.java:701) 
>      at
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter
> Manager.java:646) 
>      at
> com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.invokeFilter
> s(DefaultExtensionProcessor.java:628) 
>      at
> com.ibm.ws.wswebcontainer.extension.DefaultExtensionProcessor.invokeFilt
> ers(DefaultExtensionProcessor.java:145) 
>      at
> com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleReques
> t(DefaultExtensionProcessor.java:467) 
>      at
> com.ibm.ws.wswebcontainer.extension.DefaultExtensionProcessor.handleRequ
> est(DefaultExtensionProcessor.java:111) 
>      at
> com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3129) 
>      at
> com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238)
>
>      at
> com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811
> ) 
>      at
> com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1
> 433) 
>      at
> com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:9
> 3) 
>      at
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscriminatio
> n(HttpInboundLink.java:465) 
>      at
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformatio
> n(HttpInboundLink.java:394) 
>      at
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLi
> nk.java:274) 
>      at
> com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscr
> iminators(NewConnectionInitialReadCallback.java:214) 
>      at
> com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(Ne
> wConnectionInitialReadCallback.java:113) 
>      at
> com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(Ai
> oReadCompletionListener.java:152) 
>      at
> com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.
> java:213) 
>      at
> com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsync
> Future.java:195) 
>      at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) 
>      at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194) 
>      at
> com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java
> :741) 
>      at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863) 
>      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
>
>   

tobago problems with Websphere 6.1

Posted by Bravo Villegas Salvador Francisco <SB...@sigmatao.com>.
Hi all,

I'm trying to use the tobago example in a Websphere 6.1
But I having troubles with the followings tags
<layout:overview>
  <jsp:body>

That ones are not recognized by the server
Generating the following error.
Error Stack: 
java.lang.NullPointerException 
     at
com.ibm.ws.jsp.translator.visitor.validator.ValidateVisitor.visitJspBody
Start(ValidateVisitor.java:810) 
     at
com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisito
r.java:243) 
     at
com.ibm.ws.jsp.translator.visitor.JspVisitor.processChildren(JspVisitor.
java:309) 
     at
com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisito
r.java:268) 
     at
com.ibm.ws.jsp.translator.visitor.JspVisitor.processChildren(JspVisitor.
java:309) 
     at
com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisito
r.java:139) 
     at
com.ibm.ws.jsp.translator.visitor.JspVisitor.visit(JspVisitor.java:121) 
     at
com.ibm.ws.jsp.translator.JspTranslator.processVisitors(JspTranslator.ja
va:121) 
     at
com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJsp(JspTransl
atorUtil.java:181) 
     at
com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJspAndCompile
(JspTranslatorUtil.java:83) 
     at
com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.transl
ateJsp(AbstractJSPExtensionServletWrapper.java:349) 
     at
com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper._check
ForTranslation(AbstractJSPExtensionServletWrapper.java:317) 
     at
com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.checkF
orTranslation(AbstractJSPExtensionServletWrapper.java:226) 
     at
com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handle
Request(AbstractJSPExtensionServletWrapper.java:131) 
     at
com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleReque
st(AbstractJSPExtensionProcessor.java:270) 
     at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq
uestDispatcher.java:308) 
     at
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(S
ervletExternalContextImpl.java:419) 
     at
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspView
HandlerImpl.java:211) 
     at
org.apache.myfaces.tobago.application.ViewHandlerImpl.renderView(ViewHan
dlerImpl.java:98) 
     at
org.apache.myfaces.tobago.lifecycle.RenderResponseExecutor.execute(Rende
rResponseExecutor.java:56) 
     at
org.apache.myfaces.tobago.lifecycle.TobagoLifecycle.render(TobagoLifecyc
le.java:141) 
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140) 
     at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja
va:966) 
     at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja
va:907) 
     at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:118) 
     at
com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterC
hain.java:87) 
     at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter
Manager.java:701) 
     at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter
Manager.java:646) 
     at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrap
per.java:475) 
     at
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWr
apper.java:463) 
     at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq
uestDispatcher.java:308) 
     at
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:5
18) 
     at com.ibm._jsp._index._jspService(_index.java:65) 
     at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:85) 
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) 
     at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja
va:966) 
     at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja
va:907) 
     at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:118) 
     at
com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterC
hain.java:87) 
     at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter
Manager.java:701) 
     at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter
Manager.java:646) 
     at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrap
per.java:475) 
     at
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWr
apper.java:463) 
     at
com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(G
enericServletWrapper.java:115) 
     at
com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handle
Request(AbstractJSPExtensionServletWrapper.java:168) 
     at
com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleReque
st(AbstractJSPExtensionProcessor.java:270) 
     at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq
uestDispatcher.java:308) 
     at
com.ibm.ws.webcontainer.servlet.FilterProxyServlet.dispatch(FilterProxyS
ervlet.java:61) 
     at
com.ibm.ws.webcontainer.servlet.FilterProxyServlet.service(FilterProxySe
rvlet.java:41) 
     at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja
va:966) 
     at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja
va:907) 
     at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:118) 
     at
com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterC
hain.java:87) 
     at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter
Manager.java:701) 
     at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilter
Manager.java:646) 
     at
com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.invokeFilter
s(DefaultExtensionProcessor.java:628) 
     at
com.ibm.ws.wswebcontainer.extension.DefaultExtensionProcessor.invokeFilt
ers(DefaultExtensionProcessor.java:145) 
     at
com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleReques
t(DefaultExtensionProcessor.java:467) 
     at
com.ibm.ws.wswebcontainer.extension.DefaultExtensionProcessor.handleRequ
est(DefaultExtensionProcessor.java:111) 
     at
com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3129) 
     at
com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238)

     at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811
) 
     at
com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1
433) 
     at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:9
3) 
     at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscriminatio
n(HttpInboundLink.java:465) 
     at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformatio
n(HttpInboundLink.java:394) 
     at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLi
nk.java:274) 
     at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscr
iminators(NewConnectionInitialReadCallback.java:214) 
     at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(Ne
wConnectionInitialReadCallback.java:113) 
     at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(Ai
oReadCompletionListener.java:152) 
     at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.
java:213) 
     at
com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsync
Future.java:195) 
     at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) 
     at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194) 
     at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java
:741) 
     at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863) 
     at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)

Re: Postback

Posted by arne anka <do...@ginguppin.de>.
hi guy,
oh well, then i did get it completely wrong -- i automatically connected  
your "pretty url"-problem with "postback" ...


On Thu, 08 May 2008 01:48:38 +0200, Guy Bashan <gu...@gmail.com>  
wrote:

> Hi Arne,
>
> Sorry for replying a bit late...
> It seems like I didn't get you right. The "on-load" was meant to solve  
> the
> "postback" problem.
> I was getting a "null" renderer kit while querying the postback  
> indication
> in the bean constructor.
> The "onload" solution solves this null problem.
>
> Regarding the fact that url query parameters are "getting lost" after the
> first posback (which I believe is your real problem) of a page. Well...  
> This
> is a bit harder... As far as I understand "Seam" framework gives an  
> elegant
> solution to this problem, but I have never had the chance of trying it:
> http://tinyurl.com/4qfr26
> Another solution is to use the "pretty urls" which overcomes this  
> problem by
> allowing you to define parameters as part of the url path. I do not know  
> a
> direct link to the "pretty url" solution.
>
> Hope it helps,
> Guy.
>
>
> -----Original Message-----
> From: arne anka [mailto:dojo@ginguppin.de]
> Sent: Wednesday, May 07, 2008 5:21 PM
> To: MyFaces Discussion
> Subject: Re: Postback
>
> Hi Guy,
>
> thanks. maybe i am too stupid -- but i still don't see how you realize
> your bookmarkable urls ...
>



RE: Postback

Posted by Guy Bashan <gu...@gmail.com>.
Hi Arne,

Sorry for replying a bit late...
It seems like I didn't get you right. The "on-load" was meant to solve the
"postback" problem.
I was getting a "null" renderer kit while querying the postback indication
in the bean constructor.
The "onload" solution solves this null problem.

Regarding the fact that url query parameters are "getting lost" after the
first posback (which I believe is your real problem) of a page. Well... This
is a bit harder... As far as I understand "Seam" framework gives an elegant
solution to this problem, but I have never had the chance of trying it:
http://tinyurl.com/4qfr26
Another solution is to use the "pretty urls" which overcomes this problem by
allowing you to define parameters as part of the url path. I do not know a
direct link to the "pretty url" solution.

Hope it helps,
Guy.


-----Original Message-----
From: arne anka [mailto:dojo@ginguppin.de] 
Sent: Wednesday, May 07, 2008 5:21 PM
To: MyFaces Discussion
Subject: Re: Postback

Hi Guy,

thanks. maybe i am too stupid -- but i still don't see how you realize  
your bookmarkable urls ...


Re: Postback

Posted by arne anka <do...@ginguppin.de>.
Hi Guy,

thanks. maybe i am too stupid -- but i still don't see how you realize  
your bookmarkable urls ...

RE: Postback

Posted by Guy Bashan <gu...@gmail.com>.
Hi Arne,

Take a look at this url:
http://jsf-comp.sourceforge.net/components/onload/index.html

Follow the simple installation instructions.
After installation you can simply add to your bean a method that does the
initialization.
The isPostback should work there fine.

Guy.

-----Original Message-----
From: arne anka [mailto:dojo@ginguppin.de] 
Sent: Tuesday, May 06, 2008 8:03 PM
To: MyFaces Discussion
Subject: Re: Postback

hi,
could you post your solution? i'm struggling with a similar problem.

thx

On Tue, 06 May 2008 18:54:42 +0200, Guy Bashan <gu...@gmail.com>  
wrote:

> Hi Simon,
>
> I was trying Andrew's "on-load" phase listener and it seems to be working
> fine.
>
> Thanks.
>
> -----Original Message-----
> From: simon.kitching@chello.at [mailto:simon.kitching@chello.at]
> Sent: Tuesday, May 06, 2008 2:30 PM
> To: MyFaces Discussion
> Subject: Re: Postback
>
> Where are you calling getRenderKit from? You don't show it anywhere in
> this piece of code.
>
> It might not work when called from a bean constructor, because that is
> being implicitly called when processing the component bindings.
> Component bindings are initialized very early in a request cycle, and I
> would guess that at that time no renderKit has yet been selected to
> handle this request.
>
> The renderKit might be the html renderkit, the xhtml renderkit, the pdf
> render kit, etc. And that is specified (in JSF1.2) as a property of the
> UIViewRoot - which only exists *after* the restore-view process has
> completed. But bindings are processed during restore-view.
>
> Solution: don't call it from a backing bean constructor.
>
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Yes
> Q: Is top-posting bad
>
>
> Guy Bashan schrieb:
>> I am currently using 1.2.3.
>>
>> It seems like there may be a problem when using hidden field binding and
>> trying to get postback indication.
>> Example code:
>> -------------
>> <html>
>> <head><title>Simple jsp page</title></head>
>> <body>
>> <f:view>
>>   <h:form>
>>     <h:inputHidden value="#{testBean.xx}"
>> binding="#{testBean.htmlInputHidden}"/>
>>     <h:commandButton value="Ok" action="#{testBean.someAction}"  />
>>   </h:form>
>> </f:view>
>> </body>
>> </html>
>>
>> Bean code:
>> ----------
>> public class TestBean
>> {
>>   private String xx;
>>
>>   public TestBean()
>>   {
>>     xx = "5";
>>
>>     System.out.println(FacesUtil.isPostBack());
>>   }
>>
>>   public String someAction()
>>   {
>>     return null;
>>   }
>>
>>   public String getXx()
>>   {
>>     return xx;
>>   }
>>
>>   public void setXx(String xx)
>>   {
>>     this.xx = xx;
>>   }
>>
>>   private HtmlInputHidden htmlInputHidden;
>>
>>   public HtmlInputHidden getHtmlInputHidden()
>>   {
>>     return htmlInputHidden;
>>   }
>>
>>   public void setHtmlInputHidden(HtmlInputHidden htmlInputHidden)
>>   {
>>     this.htmlInputHidden = htmlInputHidden;
>>   }
>> }
>>
>> Page loads ok. After pressing the "Ok" button, there is a null pointer
>> exception, because:
>> FacesUtil.getFacesContext().getRenderKit() returns "null".
>> When binding is removed, all works ok.
>>
>> Guy.
>>
>>
>>
>> -----Original Message-----
>> From: simon.kitching@chello.at [mailto:simon.kitching@chello.at]
>> Sent: Tuesday, May 06, 2008 12:01 PM
>> To: MyFaces Discussion
>> Subject: Re: Postback
>>
>> Guy Bashan schrieb:
>>
>>> Hi,
>>>
>>>
>>>
>>> Is this a legitimate way of checking postback request?
>>>
>>>
>>>
>>>   public static boolean isPostBack()
>>>
>>>   {
>>>
>>>     return
>>>
>>>
>>
>
FacesUtil.getFacesContext().getRenderKit().getResponseStateManager().isPostb
>> ack(getFacesContext());
>>
>>>   }
>>>
>>>
>>
>> Yep, that's the correct public API as far as I know (btw, it is JSF1.2
>> or later).
>>
>>
>>
>



Re: Postback

Posted by arne anka <do...@ginguppin.de>.
hi,
could you post your solution? i'm struggling with a similar problem.

thx

On Tue, 06 May 2008 18:54:42 +0200, Guy Bashan <gu...@gmail.com>  
wrote:

> Hi Simon,
>
> I was trying Andrew's "on-load" phase listener and it seems to be working
> fine.
>
> Thanks.
>
> -----Original Message-----
> From: simon.kitching@chello.at [mailto:simon.kitching@chello.at]
> Sent: Tuesday, May 06, 2008 2:30 PM
> To: MyFaces Discussion
> Subject: Re: Postback
>
> Where are you calling getRenderKit from? You don't show it anywhere in
> this piece of code.
>
> It might not work when called from a bean constructor, because that is
> being implicitly called when processing the component bindings.
> Component bindings are initialized very early in a request cycle, and I
> would guess that at that time no renderKit has yet been selected to
> handle this request.
>
> The renderKit might be the html renderkit, the xhtml renderkit, the pdf
> render kit, etc. And that is specified (in JSF1.2) as a property of the
> UIViewRoot - which only exists *after* the restore-view process has
> completed. But bindings are processed during restore-view.
>
> Solution: don't call it from a backing bean constructor.
>
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Yes
> Q: Is top-posting bad
>
>
> Guy Bashan schrieb:
>> I am currently using 1.2.3.
>>
>> It seems like there may be a problem when using hidden field binding and
>> trying to get postback indication.
>> Example code:
>> -------------
>> <html>
>> <head><title>Simple jsp page</title></head>
>> <body>
>> <f:view>
>>   <h:form>
>>     <h:inputHidden value="#{testBean.xx}"
>> binding="#{testBean.htmlInputHidden}"/>
>>     <h:commandButton value="Ok" action="#{testBean.someAction}"  />
>>   </h:form>
>> </f:view>
>> </body>
>> </html>
>>
>> Bean code:
>> ----------
>> public class TestBean
>> {
>>   private String xx;
>>
>>   public TestBean()
>>   {
>>     xx = "5";
>>
>>     System.out.println(FacesUtil.isPostBack());
>>   }
>>
>>   public String someAction()
>>   {
>>     return null;
>>   }
>>
>>   public String getXx()
>>   {
>>     return xx;
>>   }
>>
>>   public void setXx(String xx)
>>   {
>>     this.xx = xx;
>>   }
>>
>>   private HtmlInputHidden htmlInputHidden;
>>
>>   public HtmlInputHidden getHtmlInputHidden()
>>   {
>>     return htmlInputHidden;
>>   }
>>
>>   public void setHtmlInputHidden(HtmlInputHidden htmlInputHidden)
>>   {
>>     this.htmlInputHidden = htmlInputHidden;
>>   }
>> }
>>
>> Page loads ok. After pressing the "Ok" button, there is a null pointer
>> exception, because:
>> FacesUtil.getFacesContext().getRenderKit() returns "null".
>> When binding is removed, all works ok.
>>
>> Guy.
>>
>>
>>
>> -----Original Message-----
>> From: simon.kitching@chello.at [mailto:simon.kitching@chello.at]
>> Sent: Tuesday, May 06, 2008 12:01 PM
>> To: MyFaces Discussion
>> Subject: Re: Postback
>>
>> Guy Bashan schrieb:
>>
>>> Hi,
>>>
>>>
>>>
>>> Is this a legitimate way of checking postback request?
>>>
>>>
>>>
>>>   public static boolean isPostBack()
>>>
>>>   {
>>>
>>>     return
>>>
>>>
>>
> FacesUtil.getFacesContext().getRenderKit().getResponseStateManager().isPostb
>> ack(getFacesContext());
>>
>>>   }
>>>
>>>
>>
>> Yep, that's the correct public API as far as I know (btw, it is JSF1.2
>> or later).
>>
>>
>>
>



RE: Postback

Posted by Guy Bashan <gu...@gmail.com>.
Hi Simon,

I was trying Andrew's "on-load" phase listener and it seems to be working
fine.

Thanks.

-----Original Message-----
From: simon.kitching@chello.at [mailto:simon.kitching@chello.at] 
Sent: Tuesday, May 06, 2008 2:30 PM
To: MyFaces Discussion
Subject: Re: Postback

Where are you calling getRenderKit from? You don't show it anywhere in
this piece of code.

It might not work when called from a bean constructor, because that is
being implicitly called when processing the component bindings.
Component bindings are initialized very early in a request cycle, and I
would guess that at that time no renderKit has yet been selected to
handle this request.

The renderKit might be the html renderkit, the xhtml renderkit, the pdf
render kit, etc. And that is specified (in JSF1.2) as a property of the
UIViewRoot - which only exists *after* the restore-view process has
completed. But bindings are processed during restore-view.

Solution: don't call it from a backing bean constructor.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Yes
Q: Is top-posting bad


Guy Bashan schrieb:
> I am currently using 1.2.3.
>
> It seems like there may be a problem when using hidden field binding and
> trying to get postback indication.
> Example code:
> -------------
> <html>
> <head><title>Simple jsp page</title></head>
> <body>
> <f:view>
>   <h:form>
>     <h:inputHidden value="#{testBean.xx}"
> binding="#{testBean.htmlInputHidden}"/>
>     <h:commandButton value="Ok" action="#{testBean.someAction}"  />
>   </h:form>
> </f:view>
> </body>
> </html>
>
> Bean code:
> ----------
> public class TestBean
> {
>   private String xx;
>
>   public TestBean()
>   {
>     xx = "5";
>
>     System.out.println(FacesUtil.isPostBack());
>   }
>
>   public String someAction()
>   {
>     return null;
>   }
>
>   public String getXx()
>   {
>     return xx;
>   }
>
>   public void setXx(String xx)
>   {
>     this.xx = xx;
>   }
>
>   private HtmlInputHidden htmlInputHidden;
>
>   public HtmlInputHidden getHtmlInputHidden()
>   {
>     return htmlInputHidden;
>   }
>
>   public void setHtmlInputHidden(HtmlInputHidden htmlInputHidden)
>   {
>     this.htmlInputHidden = htmlInputHidden;
>   }  
> }
>
> Page loads ok. After pressing the "Ok" button, there is a null pointer
> exception, because:
> FacesUtil.getFacesContext().getRenderKit() returns "null".
> When binding is removed, all works ok.
>
> Guy.
>
>
>
> -----Original Message-----
> From: simon.kitching@chello.at [mailto:simon.kitching@chello.at] 
> Sent: Tuesday, May 06, 2008 12:01 PM
> To: MyFaces Discussion
> Subject: Re: Postback
>
> Guy Bashan schrieb:
>   
>> Hi,
>>
>>  
>>
>> Is this a legitimate way of checking postback request?
>>
>>  
>>
>>   public static boolean isPostBack()
>>
>>   {
>>
>>     return
>>
>>     
>
FacesUtil.getFacesContext().getRenderKit().getResponseStateManager().isPostb
> ack(getFacesContext());
>   
>>   }
>>
>>     
>
> Yep, that's the correct public API as far as I know (btw, it is JSF1.2
> or later).
>
>
>   


Re: Postback

Posted by "simon.kitching@chello.at" <si...@chello.at>.
Where are you calling getRenderKit from? You don't show it anywhere in
this piece of code.

It might not work when called from a bean constructor, because that is
being implicitly called when processing the component bindings.
Component bindings are initialized very early in a request cycle, and I
would guess that at that time no renderKit has yet been selected to
handle this request.

The renderKit might be the html renderkit, the xhtml renderkit, the pdf
render kit, etc. And that is specified (in JSF1.2) as a property of the
UIViewRoot - which only exists *after* the restore-view process has
completed. But bindings are processed during restore-view.

Solution: don't call it from a backing bean constructor.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Yes
Q: Is top-posting bad


Guy Bashan schrieb:
> I am currently using 1.2.3.
>
> It seems like there may be a problem when using hidden field binding and
> trying to get postback indication.
> Example code:
> -------------
> <html>
> <head><title>Simple jsp page</title></head>
> <body>
> <f:view>
>   <h:form>
>     <h:inputHidden value="#{testBean.xx}"
> binding="#{testBean.htmlInputHidden}"/>
>     <h:commandButton value="Ok" action="#{testBean.someAction}"  />
>   </h:form>
> </f:view>
> </body>
> </html>
>
> Bean code:
> ----------
> public class TestBean
> {
>   private String xx;
>
>   public TestBean()
>   {
>     xx = "5";
>
>     System.out.println(FacesUtil.isPostBack());
>   }
>
>   public String someAction()
>   {
>     return null;
>   }
>
>   public String getXx()
>   {
>     return xx;
>   }
>
>   public void setXx(String xx)
>   {
>     this.xx = xx;
>   }
>
>   private HtmlInputHidden htmlInputHidden;
>
>   public HtmlInputHidden getHtmlInputHidden()
>   {
>     return htmlInputHidden;
>   }
>
>   public void setHtmlInputHidden(HtmlInputHidden htmlInputHidden)
>   {
>     this.htmlInputHidden = htmlInputHidden;
>   }  
> }
>
> Page loads ok. After pressing the "Ok" button, there is a null pointer
> exception, because:
> FacesUtil.getFacesContext().getRenderKit() returns "null".
> When binding is removed, all works ok.
>
> Guy.
>
>
>
> -----Original Message-----
> From: simon.kitching@chello.at [mailto:simon.kitching@chello.at] 
> Sent: Tuesday, May 06, 2008 12:01 PM
> To: MyFaces Discussion
> Subject: Re: Postback
>
> Guy Bashan schrieb:
>   
>> Hi,
>>
>>  
>>
>> Is this a legitimate way of checking postback request?
>>
>>  
>>
>>   public static boolean isPostBack()
>>
>>   {
>>
>>     return
>>
>>     
> FacesUtil.getFacesContext().getRenderKit().getResponseStateManager().isPostb
> ack(getFacesContext());
>   
>>   }
>>
>>     
>
> Yep, that's the correct public API as far as I know (btw, it is JSF1.2
> or later).
>
>
>   


RE: Postback

Posted by Guy Bashan <gu...@gmail.com>.
I am currently using 1.2.3.

It seems like there may be a problem when using hidden field binding and
trying to get postback indication.
Example code:
-------------
<html>
<head><title>Simple jsp page</title></head>
<body>
<f:view>
  <h:form>
    <h:inputHidden value="#{testBean.xx}"
binding="#{testBean.htmlInputHidden}"/>
    <h:commandButton value="Ok" action="#{testBean.someAction}"  />
  </h:form>
</f:view>
</body>
</html>

Bean code:
----------
public class TestBean
{
  private String xx;

  public TestBean()
  {
    xx = "5";

    System.out.println(FacesUtil.isPostBack());
  }

  public String someAction()
  {
    return null;
  }

  public String getXx()
  {
    return xx;
  }

  public void setXx(String xx)
  {
    this.xx = xx;
  }

  private HtmlInputHidden htmlInputHidden;

  public HtmlInputHidden getHtmlInputHidden()
  {
    return htmlInputHidden;
  }

  public void setHtmlInputHidden(HtmlInputHidden htmlInputHidden)
  {
    this.htmlInputHidden = htmlInputHidden;
  }  
}

Page loads ok. After pressing the "Ok" button, there is a null pointer
exception, because:
FacesUtil.getFacesContext().getRenderKit() returns "null".
When binding is removed, all works ok.

Guy.



-----Original Message-----
From: simon.kitching@chello.at [mailto:simon.kitching@chello.at] 
Sent: Tuesday, May 06, 2008 12:01 PM
To: MyFaces Discussion
Subject: Re: Postback

Guy Bashan schrieb:
>
> Hi,
>
>  
>
> Is this a legitimate way of checking postback request?
>
>  
>
>   public static boolean isPostBack()
>
>   {
>
>     return
>
FacesUtil.getFacesContext().getRenderKit().getResponseStateManager().isPostb
ack(getFacesContext());
>
>   }
>

Yep, that's the correct public API as far as I know (btw, it is JSF1.2
or later).


Re: Postback

Posted by "simon.kitching@chello.at" <si...@chello.at>.
Guy Bashan schrieb:
>
> Hi,
>
>  
>
> Is this a legitimate way of checking postback request?
>
>  
>
>   public static boolean isPostBack()
>
>   {
>
>     return
> FacesUtil.getFacesContext().getRenderKit().getResponseStateManager().isPostback(getFacesContext());
>
>   }
>

Yep, that's the correct public API as far as I know (btw, it is JSF1.2
or later).