incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samba <saas...@gmail.com>
Subject Re: Integrating ADF Faces and Tiles, with Tomahawk
Date Thu, 17 Aug 2006 06:47:55 GMT
Hello  Mr. Matthias,

Thankyou verymuch for your quick reply,

My faces-config looks like this.:

<application>
    <default-render-kit-id>oracle.adf.core</default-render-kit-id>

 <view-handler>
org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl
</view-handler>

  </application>

I need to mention that when I remove the viewhandler from faces config, I'm
getting  a single line error showing, Assertion failed at
"SiteLayout.jspx"(which
is my layout page).
So, I think  viewhandler must be mentioned   in faces-config.xml.


And I'm getting the Illegal Stateexceptiion : No ADFRenderingContext  error,
even when I remove or keep viewhandler in web.xml.



Where Might have I been wrong, can you help me,
Thanking you ,
Samb.

On 8/16/06, Matthias Wessendorf <matzew@apache.org> wrote:
>
> what's in you faces-config?
> renderkit for adf?
> viewhandler ?
>
>
> On 8/16/06, Samba <saasira@gmail.com> wrote:
> > Hello Every body,
> >
> > Can any one help me integrating ADF faces and Tiles?
> >
> > I'm using Tomahawk JspTilesViewHandler for the viewhandler.
> >
> > The following is the code:
> >
> > <?xml version='1.0' encoding='UTF-8'?>
> > <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
> > xmlns:h="http://java.sun.com/jsf/html"
> > xmlns:f="http://java.sun.com/jsf/core"
> >
> > xmlns:af="http://xmlns.oracle.com/adf/faces"
> > xmlns:afh="http://xmlns.oracle.com/adf/faces/html"
> >
> > xmlns:c="http://java.sun.com/jstl/core"
> >
> > xmlns:tiles="http://jakarta.apache.org/struts/tags-tiles">
> > <jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
> > doctype-system="http://www.w3.org/TR/html4/loose.dtd"
> > doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
> > <jsp:directive.page contentType="text/html;charset=UTF-8"/>
> > <f:view>
> > <af:document>
> > <html>
> > <head>
> > <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
> > <title>SiteLayout</title>
> > </head>
> > <body>
> > <h:form binding="#{backing_SiteLayout.form1}" id="form1">
> > <af:table id="PageLayout" width="100%" >
> >
> > <!-- <tiles:getAsString name="title" /> -->
> >
> > <f:subview id="siteview">
> > <tiles:insert definition="siteLayoutDef">
> >
> > <af:table id="headertable" width="100%">
> > <tr>
> > <td width="100%" colspan="2">
> > <f:subview id="header">
> > <tiles:insert attribute="header"/>
> > </f:subview>
> > </td>
> > </tr>
> >
> > <tr>
> > <td width="100%" colspan="2">
> > <f:subview id="topview">
> > <tiles:insert attribute="topmenu"/>
> > </f:subview>
> > </td>
> > </tr>
> >
> > <tr>
> > <td width="100%" colspan="2">
> > <f:subview id="navigationview">
> > <tiles:insert attribute="navigationbar"/>
> > </f:subview>
> > </td>
> > </tr>
> >
> > <tr>
> > <td width="30%">
> > <f:subview id="leftview">
> > <tiles:insert attribute="leftmenu"/>
> > </f:subview>
> > </td>
> > <td width="70%">
> > <f:subview id="contentview">
> > </f:subview>
> > <tiles:insert attribute="content"/>
> > </td>
> > </tr>
> >
> > <tr>
> > <td width="100%" colspan="2">
> > <f:subview id="footerview">
> > <tiles:insert attribute="footer"/>
> > </f:subview>
> > </td>
> > </tr>
> > </af:table>
> > </tiles:insert>
> > </f:subview>
> >
> >
> >
> >
> >
> >
> > </af:table>
> > </h:form></body>
> > </html>
> > </af:document>
> > </f:view>
> >
> <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_SiteLayout-->
> > </jsp:root>
> >
> >
> > My SiteLayout.jspx defines the layout of the pages on my Web
> application.
> >
> > My Home page is this:
> >
> > <?xml version='1.0' encoding='UTF-8'?>
> > <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
> > xmlns:h="http://java.sun.com/jsf/html"
> > xmlns:f="http://java.sun.com/jsf/core"
> > xmlns:afc="http://xmlns.oracle.com/adf/faces/webcache"
> > xmlns:af="http://xmlns.oracle.com/adf/faces"
> > xmlns:afh="http://xmlns.oracle.com/adf/faces/html"
> > xmlns:afi="http://xmlns.oracle.com/adf/industrial/faces"
> > xmlns:graph="/webapp/graph.tld"
> > xmlns:c="http://java.sun.com/jstl/core"
> > xmlns:tiles="http://jakarta.apache.org/struts/tags-tiles">
> > <jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
> > doctype-system="http://www.w3.org/TR/html4/loose.dtd"
> > doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
> > <jsp:directive.page contentType="text/html;charset=UTF-8"/>
> >
> > <f:view>
> > <af:document>
> >
> > <html>
> > <head>
> > <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
> > <title>Home</title>
> > </head>
> > <body>
> > <!-- <tiles:getAsString name="title" ignore="true" /> -->
> > <h:form binding="#{backing_Home.form1}" id="form1">
> > <tiles:insert definition="siteLayoutDef" flush="false">
> >
> > <tiles:put name="header" value="/Header.jspx" />
> > <tiles:put name="footer" value="/Footer.jspx" />
> > <tiles:put name="leftmenu" value="/LeftMenu.jspx" />
> > <tiles:put name="content" value="/Content.jspx" />
> >
> > <tiles:put name="header" value="/TopMenu.jspx" />
> > <tiles:put name="footer" value="/NavigationBar.jspx" />
> >
> >
> > </tiles:insert>
> > </h:form>
> > </body>
> > </html>
> > </af:document>
> > </f:view>
> > <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_Home-->
> > </jsp:root>
> >
> >
> > My <tiles-defs> page is this:
> >
> > <?xml version="1.0" encoding="UTF-8" ?>
> > <!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD
> Tiles
> > Configuration 1.1//EN" "
> > http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
> > <tiles-definitions>
> > <definition name="tiles-defs"/>
> >
> >
> >
> > <definition name="siteLayoutDef" path="/SiteLayout.jspx">
> > <!--<put name="title" value="SiteBean.getQuoteofDay()" /> -->
> > <put name="header" value="/header.jspx" />
> > <put name="footer" value="/footer.jspx" />
> > <put name="content" value=""/>
> > <put name="topmenu" value="/TopMenu.jspx"/>
> > <put name= "leftmenu" value="/LeftMenu.jspx"/>
> > <put name="navigationbar" value="/NavigationBar.jspx"/>
> >
> > </definition>
> >
> >
> > </tiles-definitions>
> >
> > My Web.xml is this:
> >
> > <?xml version = '1.0' encoding = 'UTF-8'?>
> >
> > <web-app 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" xmlns="
> > http://java.sun.com/xml/ns/j2ee">
> > <description>Empty web.xml file for Web Application</description>
> >
> >
> > <context-param>
> > <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
> > <param-value>server</param-value>
> > </context-param>
> >
> > <!-- Tiles ViewHandler config file -->
> > <context-param>
> > <description>Tiles configuration
> > definition files and a listener need to be defined.
> > the listener will initialize JspTilesViewHandlerImpl with tiles
> definitions.
> >
> > </description>
> >
> > <param-name>tiles-definitions</param-name>
> > <param-value>/WEB-INF/tiles-defs.xml</param-value>
> > </context-param>
> >
> >
> >
> > <context-param>
> > <param-name>javax.faces.CONFIG_FILES</param-name>
> > <param-value>/WEB-INF/faces-config.xml, /WEB-INF/tiles-defs.xml
> > </param-value>
> > </context-param>
> >
> > <context-param>
> > <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
> > <param-value>.jspx</param-value>
> > </context-param>
> >
> >
> > <context-param>
> > <param-name>oracle.adf.view.faces.ALTERNATE_VIEW_HANDLER</param-name>
> > <param-value>
> > org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl
> > </param-value>
> > </context-param>
> >
> >
> > <filter>
> > <filter-name>adfFaces</filter-name>
> > <filter-class>oracle.adf.view.faces.webapp.AdfFacesFilter</filter-class>
> > </filter>
> > <filter-mapping>
> > <filter-name>adfFaces</filter-name>
> > <servlet-name>Faces Servlet</servlet-name>
> > </filter-mapping>
> >
> > <servlet>
> > <servlet-name>Faces Servlet</servlet-name>
> > <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
> > <load-on-startup>1</load-on-startup>
> > </servlet>
> >
> > <servlet>
> > <servlet-name>resources</servlet-name>
> > <servlet-class>oracle.adf.view.faces.webapp.ResourceServlet
> </servlet-class>
> > </servlet>
> >
> > <servlet-mapping>
> > <servlet-name>Faces Servlet</servlet-name>
> > <url-pattern>/faces/*</url-pattern>
> > </servlet-mapping>
> >
> > <servlet-mapping>
> > <servlet-name>resources</servlet-name>
> > <url-pattern>/adf/*</url-pattern>
> > </servlet-mapping>
> >
> > <session-config>
> > <session-timeout>35</session-timeout>
> > </session-config>
> >
> > <servlet>
> > <servlet-name>Tiles Servlet</servlet-name>
> > <servlet-class>
> > org.apache.struts.tiles.TilesServlet
> > </servlet-class>
> >
> >
> > <init-param>
> > <param-name>definitions-config</param-name>
> > <param-value>/WEB-INF/tiles-defs.xml</param-value>
> > </init-param>
> > <load-on-startup>2</load-on-startup>
> > </servlet>
> >
> >
> >
> >
> >
> >
> > <mime-mapping>
> > <extension>html</extension>
> > <mime-type>text/html</mime-type>
> > </mime-mapping>
> > <mime-mapping>
> > <extension>txt</extension>
> > <mime-type>text/plain</mime-type>
> > </mime-mapping>
> >
> >
> >
> > </web-app>
> >
> >
> >
> >
> >
> > The Error I'm getting is :
> >
> > java.lang.IllegalStateException: No AdfRenderingContext
> >         at
> oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeEnd(
> CoreRenderer.java:154)
> >         at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(
> UIXComponentBase.java:624)
> >         at javax.faces.webapp.UIComponentTag.encodeEnd(
> UIComponentTag.java:623)
> >         at javax.faces.webapp.UIComponentTag.doEndTag(
> UIComponentTag.java:546)
> >         at oracle.adf.view.faces.webapp.UIXComponentTag.doEndTag(
> UIXComponentTag.java:100)
> >         at _Home_jspx._jspService(_Home_jspx.java:106)
> >         [/Home.jspx]
> >         at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.0.0)
> > ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
> >         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java
> :416)
> >         at oracle.jsp.runtimev2.JspServlet.internalService(
> JspServlet.java:478)
> >         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> >         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
> > ].server.http.ServletRequestDispatcher.invoke(
> ServletRequestDispatcher.java:719)
> >         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
> > ].server.http.ServletRequestDispatcher.forwardInternal(
> ServletRequestDispatcher.java:376)
> >         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
> > ].server.http.ServletRequestDispatcher.unprivileged_forward(
> ServletRequestDispatcher.java:298)
> >         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
> > ].server.http.ServletRequestDispatcher.access$100(
> ServletRequestDispatcher.java:42)
> >         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
> > ].server.http.ServletRequestDispatcher$2.oc4jRun(
> ServletRequestDispatcher.java:204)
> >         at oracle.oc4j.security.OC4JSecurity.doPrivileged(
> OC4JSecurity.java:283)
> >         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
> > ].server.http.ServletRequestDispatcher.forward(
> ServletRequestDispatcher.java:209)
> >         at com.sun.faces.context.ExternalContextImpl.dispatch(
> ExternalContextImpl.java:322)
> >         at
> org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl.dispatch
> (JspTilesViewHandlerImpl.java:233)
> >         at
> org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl.renderView
> (JspTilesViewHandlerImpl.java:219)
> >         at com.sun.faces.lifecycle.RenderResponsePhase.execute(
> RenderResponsePhase.java:87)
> >         at com.sun.faces.lifecycle.LifecycleImpl.phase(
> LifecycleImpl.java:200)
> >         at com.sun.faces.lifecycle.LifecycleImpl.render(
> LifecycleImpl.java:117)
> >         at javax.faces.webapp.FacesServlet.service(FacesServlet.java
> :198)
> >         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
> > ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
> >         at
> oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(
> AdfFacesFilterImpl.java:367)
> >         at
> oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(
> AdfFacesFilterImpl.java:336)
> >         at
> oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(
> AdfFacesFilterImpl.java:196)
> >         at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(
> AdfFacesFilter.java:87)
> >         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
> > ].server.http.ServletRequestDispatcher.invoke(
> ServletRequestDispatcher.java:629)
> >         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
> > ].server.http.ServletRequestDispatcher.forwardInternal(
> ServletRequestDispatcher.java:376)
> >         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
> > ].server.http.HttpRequestHandler.doProcessRequest(
> HttpRequestHandler.java:870)
> >         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
> > ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java
> :451)
> >         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
> > ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java
> :218)
> >         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
> > ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
> >         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
> > ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
> >         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(
> ServerSocketReadHandler.java:260)
> >         at
> oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(
> ServerSocketAcceptHandler.java:230)
> >         at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(
> ServerSocketAcceptHandler.java:33)
> >         at
> oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(
> ServerSocketAcceptHandler.java:831)
> >         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0)
> > ].util.ReleasableResourcePooledExecutor$MyWorker.run(
> ReleasableResourcePooledExecutor.java:298)
> >         at java.lang.Thread.run(Thread.java:595)
> >
> >
> >
> >
> >
> > What happened?
> > Where did I go wrong?
> >
> > could you please help me?
> > Thanking you in advance,
> > Waiting for your response,
> > Samba.
> >
> > --
> > Regards,
> > Samba.
> >
> >
>
>
> --
> Matthias Wessendorf
>
> further stuff:
> blog: http://jroller.com/page/mwessendorf
> mail: mwessendorf-at-gmail-dot-com
>



-- 
Vuntaanu...
Samba.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message