Buttons? <h:commandButton/> ?
There was/is an issue with myfaces. but solved in 1.1.4-SNAPSHOT. the viewhandler should only be defined in web.xml, not in facesc-onfig.xml On 8/9/06, Mikhail Grushinskiy <[EMAIL PROTECTED]> wrote:
Removing facelets viewhandler from faces-config.xml solved the problem. Now I can get to the first page. But buttons on it do not work. I will try with latest code next On 8/10/06, Matthias Wessendorf <[EMAIL PROTECTED]> wrote: > > do you have defined the facelets viewhandler twice? > > web.xml > <web-app xmlns="http://java.sun.com/xml/ns/j2ee" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee > http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" > version="2.4"> > > <!-- Trinidad has its own ViewHandler, which is a "decorating" > view handler - for example, it needs to wrap methods like > renderView() > to perform some extra pre- and post-handling. Facelets, on the > other > hand, is more of a true ViewHandler - it actually implements > renderView() (yeah, it decorates too, but forget about that > for a second). As a result, the world is a better place if > the Trinidad ViewHandler runs around the Facelets ViewHandler. > But since Facelets is registered in WEB-INF/faces-config.xml, > and Trinidad's is registered from META-INF/faces-config.xml in its > JAR, exactly the opposite happens as per the JSF spec. > > Hence, the following config parameter, which Trinidad > exposes to allow pushing a ViewHandler inside > of ours. FWIW, you retain the entire delegation stack - > just flipped around a bit - so that Facelets still decorates > the standard ViewHandler, and therefore you've still got > JSP support. > --> > <context-param> > <param-name>org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER > </param-name> > <param-value>com.sun.facelets.FaceletViewHandler</param-value> > </context-param> > > <!-- Use Documents Saved as *.xhtml --> > <context-param> > <param-name>javax.faces.DEFAULT_SUFFIX</param-name> > <param-value>.xhtml</param-value> > </context-param> > > <context-param> > <param-name>facelets.LIBRARIES</param-name> > <param-value>/WEB-INF/tomahawk.taglib.xml</param-value> > </context-param> > > <!-- Use client-side state saving. In Trinidad, it is an > optimized, token-based mechanism that is almost always a > better choice than the standard JSF server-side state saving. --> > <context-param> > <param-name>javax.faces.STATE_SAVING_METHOD</param-name> > <param-value>client</param-value> > <!--param-value>server</param-value--> > </context-param> > > <!-- Trinidad by default uses an optimized client-side state saving > mechanism. To disable that, uncomment the following --> > <!--context-param> > <param-name>org.apache.myfaces.trinidad.CLIENT_STATE_METHOD > </param-name> > <param-value>all</param-value> > </context-param--> > > <!-- Trinidad also supports an optimized strategy for caching some > view state at an application level, which significantly improves > scalability. However, it makes it harder to develop (updates to > pages will not be noticed until the server is restarted), and in > some rare cases cannot be used for some pages (see Trinidad > documentation for more information) --> > <context-param> > <param-name>org.apache.myfaces.trinidad.USE_APPLICATION_VIEW_CACHE > </param-name> > <param-value>false</param-value> > </context-param> > > <!-- If this parameter is enabled, Trinidad will automatically > check the modification date of your JSPs, and discard saved > state when they change; this makes development easier, > but adds overhead that should be avoided when your application > is deployed --> > <context-param> > <param-name>org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION > </param-name> > <param-value>true</param-value> > </context-param> > > <!-- Enables Change Persistence at a session scope. By default, > Change Persistence is entirely disabled. The ChangeManager is > an API, which can persist component modifications (like, > is a showDetail or tree expanded or collapsed). For providing > a custom Change Persistence implementation inherit from the > Trinidad API's ChangeManager class. As the value you have > to use the fullqualified class name. --> > <context-param> > <param-name>org.apache.myfaces.trinidad.CHANGE_PERSISTENCE > </param-name> > <param-value>session</param-value> > </context-param> > > <filter> > <filter-name>trinidad</filter-name> > <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter > </filter-class> > </filter> > > <filter> > <filter-name>MyFacesExtensionsFilter</filter-name> > <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter > </filter-class> > <init-param> > <param-name>maxFileSize</param-name> > <param-value>20m</param-value> > </init-param> > </filter> > > <filter-mapping> > <filter-name>trinidad</filter-name> > <servlet-name>faces</servlet-name> > </filter-mapping> > > <!-- extension mapping for adding <script/>, <link/>, and other > resource tags to JSF-pages --> > <filter-mapping> > <filter-name>MyFacesExtensionsFilter</filter-name> > <!-- servlet-name must match the name of your > javax.faces.webapp.FacesServlet entry --> > <servlet-name>faces</servlet-name> > </filter-mapping> > > <!-- extension mapping for serving page-independent resources > (javascript, stylesheets, images, etc.) --> > <filter-mapping> > <filter-name>MyFacesExtensionsFilter</filter-name> > <url-pattern>/faces/myFacesExtensionResource/*</url-pattern> > </filter-mapping> > > > <!-- Faces Servlet --> > <servlet> > <servlet-name>faces</servlet-name> > <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> > </servlet> > > <!-- resource loader servlet --> > <servlet> > <servlet-name>resources</servlet-name> > <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet > </servlet-class> > </servlet> > > <!-- Faces Servlet Mappings --> > <servlet-mapping> > <servlet-name>faces</servlet-name> > <url-pattern>/faces/*</url-pattern> > </servlet-mapping> > > <servlet-mapping> > <servlet-name>resources</servlet-name> > <url-pattern>/adf/*</url-pattern> > </servlet-mapping> > > > <!-- Welcome Files --> > <welcome-file-list> > <welcome-file>index.xhtml</welcome-file> > </welcome-file-list> > > </web-app> > > facesconfig.xml > > <!DOCTYPE faces-config PUBLIC > "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN" > "http://java.sun.com/dtd/web-facesconfig_1_0.dtd" > > <faces-config> > > <application> > <!-- Use the Trinidad RenderKit --> > <default-render-kit-id> > org.apache.myfaces.trinidad.core > </default-render-kit-id> > </application> > > ... > </faces-config> > > btw. the code you are using is old :) > I changed that log message on sunday to "RenderingContext" ;) > > -Matthias > > On 8/9/06, Mikhail Grushinskiy <[EMAIL PROTECTED]> wrote: > > Now I'm getting facelets exception > > > > No AdfRenderingContext > > > > > > java.lang.IllegalStateException: No AdfRenderingContext > > at > org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderer.encodeBegin > (CoreRenderer.java:155) > > at > org.apache.myfaces.trinidadinternal.renderkit.htmlBasic.HtmlFormRenderer.encodeBegin > (HtmlFormRenderer.java:54) > > at javax.faces.component.UIComponentBase.encodeBegin( > UIComponentBase.java:512) > > at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive( > ComponentSupport.java:232) > > at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive( > ComponentSupport.java:239) > > > > > > > > On 8/10/06, Mikhail Grushinskiy <[EMAIL PROTECTED]> wrote: > > > > > > Ok, I've passed via this error by adding el-api.jar and el-ri.jar from > > > facelets distro. Thanks > > > > > > > > > On 8/10/06, Matthias Wessendorf < [EMAIL PROTECTED]> wrote: > > > > > > > > do you have javax.el ? > > > > > > > > ava.lang.NoClassDefFoundError : javax/el/ELException > > > > > > > > when you are using maven, it's easy to add it. > > > > > > > > <dependency> > > > > <groupId>javax.el</groupId> > > > > <artifactId>el-api</artifactId> > > > > <version> 1.0alpha</version> > > > > </dependency> > > > > > > > > <dependency> > > > > <groupId>javax.el</groupId> > > > > <artifactId>el-ri</artifactId> > > > > <version>1.0alpha </version> > > > > </dependency> > > > > > > > > > > > > On 8/9/06, Mikhail Grushinskiy <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > > > > > > > > I can't get this combination to work. Do you have any examples of > > > > working > > > > > configuration with this combo? > > > > > The exception I'm getting: > > > > > > > > > > 23:18:02,906 ERROR [[faces]] Servlet.service() for servlet faces > threw > > > > > exception > > > > > java.lang.NoClassDefFoundError: javax/el/ELException > > > > > at com.sun.facelets.tag.AbstractTagLibrary.addTagHandler( > > > > > AbstractTagLibrary.java:469) > > > > > at > > > > > > > > > > com.sun.facelets.compiler.TagLibraryConfig$TagLibraryImpl.putTagHandler( > > > > > TagLibraryConfig.java :90) > > > > > at > > > > com.sun.facelets.compiler.TagLibraryConfig$LibraryHandler.endElement > ( > > > > > TagLibraryConfig.java:200) > > > > > at org.apache.xerces.parsers.AbstractSAXParser.endElement > (Unknown > > > > > Source) > > > > > at > org.apache.xerces.impl.dtd.XMLDTDValidator.endNamespaceScope > > > > (Unknown > > > > > Source) > > > > > at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement > > > > (Unknown > > > > > Source) > > > > > at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown > > > > Source) > > > > > at > > > > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement > > > > (Unknown > > > > > Source) > > > > > at > > > > > > > > > > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch > (Unknown > > > > > Source) > > > > > at > > > > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument > > > > (Unknown > > > > > Source) > > > > > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > > > > Source) > > > > > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > > > > Source) > > > > > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > > > > > at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown > > > > Source) > > > > > at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse > > > > (Unknown > > > > > Source) > > > > > at javax.xml.parsers.SAXParser.parse(SAXParser.java:375) > > > > > at javax.xml.parsers.SAXParser.parse(SAXParser.java :176) > > > > > at com.sun.facelets.compiler.TagLibraryConfig.create( > > > > > TagLibraryConfig.java:394) > > > > > at com.sun.facelets.compiler.TagLibraryConfig.loadImplicit( > > > > > TagLibraryConfig.java:418) > > > > > at com.sun.facelets.compiler.Compiler.initialize(Compiler.java > :86) > > > > > at com.sun.facelets.compiler.Compiler.compile(Compiler.java > :103) > > > > > at com.sun.facelets.impl.DefaultFaceletFactory.createFacelet( > > > > > DefaultFaceletFactory.java:192) > > > > > at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet( > > > > > DefaultFaceletFactory.java:141) > > > > > at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet( > > > > > DefaultFaceletFactory.java:93) > > > > > at com.sun.facelets.FaceletViewHandler.buildView( > > > > FaceletViewHandler.java > > > > > :539) > > > > > at com.sun.facelets.FaceletViewHandler.renderView( > > > > > FaceletViewHandler.java :589) > > > > > at org.apache.myfaces.lifecycle.LifecycleImpl.render( > > > > LifecycleImpl.java > > > > > :384) > > > > > at javax.faces.webapp.FacesServlet.service(FacesServlet.java > :138) > > > > > at > > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter ( > > > > > ApplicationFilterChain.java:252) > > > > > at org.apache.catalina.core.ApplicationFilterChain.doFilter( > > > > > ApplicationFilterChain.java:173) > > > > > at > > > > > > > > > > org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter > > > > > (TrinidadFilterImpl.java:320) > > > > > at > > > > > > > > > > org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl > > > > ( > > > > > TrinidadFilterImpl.java:289) > > > > > at > > > > > > org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter( > > > > > TrinidadFilterImpl.java:213) > > > > > at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter( > > > > > TrinidadFilter.java:90) > > > > > at > > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter ( > > > > > ApplicationFilterChain.java:202) > > > > > at org.apache.catalina.core.ApplicationFilterChain.doFilter( > > > > > ApplicationFilterChain.java:173) > > > > > at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter ( > > > > > ReplyHeaderFilter.java:81) > > > > > at > > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( > > > > > ApplicationFilterChain.java:202) > > > > > at org.apache.catalina.core.ApplicationFilterChain.doFilter ( > > > > > ApplicationFilterChain.java:173) > > > > > at org.apache.catalina.core.StandardWrapperValve.invoke( > > > > > StandardWrapperValve.java:213) > > > > > at org.apache.catalina.core.StandardContextValve.invoke( > > > > > StandardContextValve.java:178) > > > > > at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke( > > > > > CustomPrincipalValve.java:39) > > > > > at > org.jboss.web.tomcat.security.SecurityAssociationValve.invoke ( > > > > > SecurityAssociationValve.java:159) > > > > > at org.jboss.web.tomcat.security.JaccContextValve.invoke( > > > > > JaccContextValve.java:59) > > > > > at org.apache.catalina.core.StandardHostValve.invoke( > > > > > StandardHostValve.java:126) > > > > > at org.apache.catalina.valves.ErrorReportValve.invoke( > > > > > ErrorReportValve.java:105) > > > > > at org.apache.catalina.core.StandardEngineValve.invoke( > > > > > StandardEngineValve.java :107) > > > > > at org.apache.catalina.connector.CoyoteAdapter.service( > > > > > CoyoteAdapter.java:148) > > > > > at org.apache.coyote.http11.Http11Processor.process( > > > > Http11Processor.java > > > > > :856) > > > > > at > > > > > > > > > > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection > > > > > (Http11Protocol.java:744) > > > > > at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket( > > > > > PoolTcpEndpoint.java :527) > > > > > at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run( > > > > > MasterSlaveWorkerThread.java:112) > > > > > at java.lang.Thread.run(Thread.java:595) > > > > > > > > > > Thanks, > > > > > --MG > > > > > > > > > > > > > > > > > > > > > > -- > > > > Matthias Wessendorf > > > > > > > > further stuff: > > > > blog: http://jroller.com/page/mwessendorf > > > > mail: mwessendorf-at-gmail-dot-com > > > > > > > > > > > > > > > > > -- > Matthias Wessendorf > > further stuff: > blog: http://jroller.com/page/mwessendorf > mail: mwessendorf-at-gmail-dot-com >
-- Matthias Wessendorf further stuff: blog: http://jroller.com/page/mwessendorf mail: mwessendorf-at-gmail-dot-com
