Tree2 in Tomahawk  and JSF Tiles Implementation

hi All,
right now i mfacing one problem. which arise due to tiles implementation in JSF with Tree2 component of Tomahawk. i had created one tree menu using Tree2.
its working fine, but i was not able to highlight selected child node of tree menu as i m using tiles implementation so all pages gets reloaded on every click on jsp. thus color of that selected node becomes as it is.
please note that i m using myfaces implementation.
what i have written is as below:
<t:tree2 id="wrapTree" value="#{frontPage.catTree}" var="node" clientSideToggle="true"
                         showRootNode="false" varNodeToggler="t">
                              <f:facet name="parent-one">
                              <h:panelGrid id="parentOne" columns="1" cellpadding="0" cellspacing="0" border="0">
                                        <h:commandLink styleClass="textorg" immediate="true" action="#{categoryListBean.showCategoryDetail}">
                              <h:outputText escape="false" value="#{node.description} "/>
                                   <f:param name="categoreId" value="#{node.identifier}"/>
                         </h:commandLink>
                              </h:panelGrid>
               </f:facet>
               <f:facet name="top-parent">
               <h:panelGrid id="topParent" columns="1" cellpadding="2" cellspacing="0" border="0" align="left">
               <h:commandLink styleClass="txtbold" immediate="true" action="#{categoryListBean.showCategoryDetail}">
               <h:outputText escape="false" value="#{node.description} "/>
               <f:param name="categoreId" value="#{node.identifier}"/>
               </h:commandLink>
               </h:panelGrid>
               </f:facet>
               <f:facet name="child">
               <h:panelGroup id="Child">
                         <h:commandLink styleClass="#{t.nodeSelected ? 'headerRedText':'txt1'}" actionListener="#{t.setNodeSelected}" immediate="true">
               <h:outputText value="#{node.description}"/>
                    <f:param name="categoreId" value="#{node.identifier}"/>
               </h:commandLink>
               </h:panelGroup>
               </f:facet>
                         </t:tree2>
please help me if u have solution of this problem.
thank you.

hi,
in MyFaces there is an example using JSF and Tiles.
MyFaces provides a custom ViewHandler faciltity.
see http://sourceforge.net/projects/myfaces
hope that helps.
Regards,
Matthias

Similar Messages

  • Strange Problem using tomahawk and JSF 1.1

    Hi,
    my JSF Project (Tomcat 5.5.17 as Server; jre 1.6) works fine until I add the tomahawk .jar (1.1.3) to the lib folfder. When I add the jar file I get the following exception:
    SCHWERWIEGEND: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
    javax.faces.FacesException: java.lang.ClassNotFoundException: [Ljava.lang.String;
         at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:336)
         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
         at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:608)
    The exception appear even when I dont use any content of the archive.
    Please help.
    Thank you
    Arndt

    Yep, as you found, there were some changes in how the 1.6 handles the loading of array classes. This issue has been corrected in the 1.2 version of the RI. We still need to backport said fixes to 1.1.

  • JSF, tiles, xml and xsl

    Good days people, I am employed at an app that wants to integrate JSF, tiles, xml and xsl.
    Basically the app receives information of the user's interfaz, builds an url with the above mentioned information and invokes to a service web that a xml returns with the information. The idea is to generate the exit in format html or wml with an insole(staff) xsl and to send the result in this format to every jsp that is going to form a part of the page that it will generate tiles. at first I understand that it is feasible, i�d like to know if someone already has done it and since it has done it.
    Just now what I have is a managed bean that receives the parameters of the altar frontal and invokes a method of a service, like this:
    public String encuentra(){
    //deja los atributos privados rellenos.
    String mensaje ;
    crearYRellenarBusquedaVO();
    try {
    setResultado(this.getServicio().obtenerResultadosWML(this.getBusquedaVO()));
    mensaje="succesNoJS";
    }catch(java.lang.IllegalArgumentException e){
    mensaje="error";
    }catch(es.yell.frontlite.exceptions.SrvBusquedaNoxtrumServiceException e1){
    mensaje="error";
    }catch(Exception e2){
    mensaje="error";
    return mensaje;
    public String obtenerResultadosWML(es.yell.frontlite.service.impl.BusquedaVO busquedaVO){
    if (busquedaVO == null){
    throw new IllegalArgumentException(
    "obtenerResultadosJSdesactivado(es.yell.frontlite.service.impl.BusquedaVO busquedaVO) - 'busquedaVO' no puede ser nulo.");
    try{
    return this.manejarObtenerResultadosWML(busquedaVO);
    }catch(es.yell.frontlite.exceptions.SrvBusquedaNoxtrumServiceException e1){
    throw new es.yell.frontlite.exceptions.SrvBusquedaNoxtrumServiceException(
    "Error ejecutando el servicio String obtenerResultadosJSdesactivado(es.yell.frontlite.service.impl.BusquedaVO busquedaVO). " + e1.getCause(),e1);
    }catch(Exception e){
    throw new es.yell.frontlite.exceptions.SrvBusquedaNoxtrumServiceException(
    "Error ejecutando el servicio String obtenerResultadosJSdesactivado(es.yell.frontlite.service.impl.BusquedaVO busquedaVO). " + e.getCause(),e);
    //it returns html code!
    protected String manejarObtenerResultadosWML(es.yell.frontlite.service.impl.BusquedaVO busquedaVO)
    throws java.lang.Exception{
    try{
    // xmlOrigen has full xml response from server
    String xmlOrigen = manejarObtenerResultadosJSActivado(busquedaVO);
    Source xmlSource = new StreamSource(new StringBufferInputStream(xmlOrigen));
    Source xsltSource = new StreamSource(SrvBusquedaNoxtrumServiceImpl.class.getResourceAsStream(Constantes.XSL_FILE));
    StringWriter cadenaSalida = new StringWriter();
    Result bufferResultado = new StreamResult(cadenaSalida);
    TransformerFactory factoriaTrans = TransformerFactory.newInstance();
    Transformer transformador = factoriaTrans.newTransformer(xsltSource);
    transformador.transform(xmlSource, bufferResultado);
    System.out.println(cadenaSalida.toString());
    return cadenaSalida.toString();
    }catch(Exception e2){
    throw new es.yell.frontlite.exceptions.SrvBusquedaNoxtrumServiceException (e2.getMessage());
    With this exit in html, since(as,like) how could i forward it towards a jsp especially?
    faces-config.xml
    <navigation-rule>
    <from-view-id>/index.jsp</from-view-id>
    <navigation-case>
    <from-outcome>succesNoJS</from-outcome>
    <to-view-id>/jsDesactivado.jsp</to-view-id>
    </navigation-case>
    <navigation-case>
    <from-outcome>error</from-outcome>
    <to-view-id>/error.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    index.jsp
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <f:view>
    <f:loadBundle basename="MessageResources" var="msg"/>
    <head>
    <title>
    ${msg.titulo}
    </title>
    </head>
    <body>
    <h:form id="formulario">
    Que:
    <h:inputText id="campoQue" value="#{yellProxy.campoQue}" />
    Donde
    <h:inputText id="campoDonde" value="#{ yellProxy.campoDonde}" />
    <h:commandButton id="boton" value="Encuentra" action="#{yellProxy.encuentra}"/>
    </h:form>
    </f:view>
    </body>
    </html>
    jsDesactivado.jsp
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%--
    The taglib directive below imports the JSTL library. If you uncomment it,
    you must also add the JSTL library to the project. The Add Library... action
    on Libraries node in Projects view can be used to add the JSTL 1.1 library.
    --%>
    <%--
    <%@taglib uri=" http://java.sun.com/jsp/jstl/core" prefix="c"%>
    --%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    " http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JSP Page</title>
    </head>
    <body>
    <h1>JSP Page</h1>
    jsDesactivado!!
    <%--
    This example uses JSTL, uncomment the taglib directive above.
    To test, display the page like this: index.jsp?sayHello=true&name=Murphy
    --%>
    <%--
    <c:if test="${param.sayHello}">
    <!-- Let's welcome the user ${param.name} -->
    Hello ${param.name}!
    </c:if>
    --%>
    <jsp:getProperty name="yellProxy" property="resultado"/>
    </body>
    </html>
    If you could pass me a simple example of use of an app that uses JSF, tiles, xml and xsl, i�be grateful
    regards a lot!

    We too (at Viking Freight) would also be very interested to see if anybody
    has produced such a useful series of classes...
    Frank Lees, Developer
    -----Original Message-----
    From: Amin, Kamran [mailto:kamran.aminframeworkinc.com]
    Sent: Wednesday, January 19, 2000 12:11 PM
    To: 'Forte User'
    Subject: (forte-users) XML and XSL in Forte
    Has anybody integrated an XSL parser with Forte. I know Forte provides us
    with an XML parser but that does not help with parsing XSL. There a lot of
    parsers written in JAVA but that will not integrate well with Forte. We
    need something that will be easy to integrate with Forte. This parser will
    take our XML and XSL to give us a result set. If anybody can comment on the
    subject or share some information I would appreciate it.
    thanks in advance.
    ka
    For the archives, go to: http://lists.sageit.com/forte-users and use
    the login: forte and the password: archive. To unsubscribe, send in a new
    email the word: 'Unsubscribe' to: forte-users-requestlists.sageit.com

  • JSF,Tiles, Sun App Server and NetBeans 5.5

    hi all,
    here is my environment :
    1.Server - Sun Application Server (Running On Suse Linux OS)
    2.IDE - NetBeans 5.5
    3.Project - JSF with Tiles
    here i found topic about tiles and jsf :
    http://forum.java.sun.com/thread.jspa?threadID=643536&messageID=3792238 but i think that Tiles is best alternative for JSF Layout Manager (It's my mind).
    is there anybody help me how to integrate tiles with jsf ?
    here is my example :
    1.web.xml :
        <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-def.xml</param-value>
            </init-param>
            <load-on-startup>2</load-on-startup>
        </servlet>2. tiles-def.xml :
    <tiles-definitions>
             <!--****************************************************************-->
         <!--                     Global Layout                       -->
         <!--****************************************************************-->
         <definition name="global.layout" path="/pages/Mylayout/layout.jsp">
              <put name="title" value="Magti Billing System" type="string"></put>
                    <put name="subtitle" value="Magti Billing System" type="string"></put>
                    <put name="header" value="/pages/Mylayout/header.jsp"></put>
              <put name="subheader" value="/pages/Mylayout/sub_header.jsp"></put>          
              <put name="footer" value="/pages/Mylayout/footer.jsp"></put>
                    <put name="body" value="/pages/Mylayout/body.jsp"></put>
                    <put name="left_menu" value="/pages/Mylayout/left_menu.jsp"></put>
         </definition>   
    </tiles-definitions>3.and then i have 5 blank jsp pages : body.jps, footer.jsp, header.jsp, layout.jsp, left_menu.jsp, sub_header.jsp.
    4. here is my layout.jsp code :
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:jsp="http://java.sun.com/JSP/Page"
              xmlns:webuijsf="http://www.sun.com/webui/webuijsf"
              xmlns:tiles="http://jakarta.apache.org/struts/tags-tiles"
    >
        <tiles:importAttribute scope="request"></tiles:importAttribute>
        <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
        <f:view>
            <webuijsf:page binding="#{pages$Mylayout$layout.page1}" id="page1">
                <webuijsf:html binding="#{pages$Mylayout$layout.html1}" id="html1">
                    <webuijsf:head binding="#{pages$Mylayout$layout.head1}" id="head1">
                        <webuijsf:link binding="#{pages$Mylayout$layout.link1}" id="link1" url="/resources/stylesheet.css"/>
                    </webuijsf:head>
                    <webuijsf:body binding="#{pages$Mylayout$layout.body1}" id="body1" style="-rave-layout: grid">
                        <webuijsf:form binding="#{pages$Mylayout$layout.form1}" id="form1">
                            <h:panelGrid columns="2" cellspacing="0" cellpadding="0"
                                         border="0" styleClass="maingrid" columnClasses="maingrid">
                                <f:facet name="header">
                                    <f:subview id="header">
                                        <h:panelGrid columns="1" cellpadding="0" cellspacing="0">
                                            <tiles:insert attribute="header" flush="false" />
                                            <tiles:insert attribute="subheader" flush="false" />
                                        </h:panelGrid>
                                    </f:subview>
                                </f:facet>
                                <f:subview id="left_menu">
                                    <tiles:insert attribute="left_menu" flush="false" />
                                </f:subview>
                                <f:subview id="body">
                                    <tiles:insert attribute="body" flush="false" />
                                </f:subview>
                                <!--
                                <f:facet name="footer">
                                    <f:subview id="footer">
                                        <tiles:insert attribute="footer" flush="false" />
                                    </f:subview>
                                </f:facet>
                                -->
                            </h:panelGrid>
                        </webuijsf:form>
                    </webuijsf:body>
                </webuijsf:html>
            </webuijsf:page>
        </f:view>
    </jsp:root>5. and at last i have index.jsp:
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:jsp="http://java.sun.com/JSP/Page"
    xmlns:webuijsf="http://www.sun.com/webui/webuijsf"
    xmlns:tiles="http://jakarta.apache.org/struts/tags-tiles"
    >
        <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
        <f:view>
            <webuijsf:page binding="#{pages$main$index.page1}" id="page1">
                <webuijsf:html binding="#{pages$main$index.html1}" id="html1">
                    <webuijsf:head binding="#{pages$main$index.head1}" id="head1">
                        <webuijsf:link binding="#{pages$main$index.link1}" id="link1" url="/resources/stylesheet.css"/>
                    </webuijsf:head>
                    <webuijsf:body binding="#{pages$main$index.body1}" id="body1" style="-rave-layout: grid">
                        <webuijsf:form binding="#{pages$main$index.form1}" id="form1">
                            <tiles:insert definition="global.layout" flush="false"/>
                        </webuijsf:form>
                    </webuijsf:body>
                </webuijsf:html>
            </webuijsf:page>
        </f:view>
    </jsp:root>but i get an error like this :
    Can't leverage base class
    java.lang.IllegalStateException
            at com.sun.faces.taglib.jsf_core.ViewTag.getComponentType(ViewTag.java:259)
            at javax.faces.webapp.UIComponentELTag.createComponent(UIComponentELTag.java:219)
            at javax.faces.webapp.UIComponentClassicTagBase.createChild(UIComponentClassicTagBase.java:458)
            at javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:643)
            at javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1070)
            at com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:180)
            at org.apache.jsp.pages.Mylayout.layout_jsp._jspx_meth_f_view_0(layout_jsp.java:140)
            at org.apache.jsp.pages.Mylayout.layout_jsp._jspService(layout_jsp.java:99)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:353)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:412)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:318)Any Ideas Is Usefull. Thanks.
    Paata.

    Hi,
    I'm trying to use Tiles with NetBeans 6.0. I used a similar set up as the other writer did, except for the JSP:root part:
    <jsp:root version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:jsp="http://java.sun.com/JSP/Page"
    xmlns:webuijsf="http://www.sun.com/webui/webuijsf"
    xmlns:tiles="http://jakarta.apache.org/struts/tags-tiles">
    It complies and deploys OK, except it renders a blank page. The source code of the page is below. It seems that the "tiles:insertDefinition" was not expanded. Would you share some lights on how you get it to work. By the way I did not use shale-tiles, do I need it?
    Thanks in advance.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:wairole="http://www.w3.org/2005/01/wai-rdf/GUIRoleTaxonomy#" xmlns:waistate="http://www.w3.org/2005/07/aaa">
    <head>
    <meta content="no-cache" http-equiv="Pragma" />
    <meta content="no-cache" http-equiv="Cache-Control" />
    <meta content="no-store" http-equiv="Cache-Control" />
    <meta content="max-age=0" http-equiv="Cache-Control" />
    <meta content="1" http-equiv="Expires" />
    <title></title>
    <link rel="stylesheet" type="text/css" href="/apogee-web-1.0-SNAPSHOT/theme/com/sun/webui/jsf/suntheme/css/css_master.css" />
    <script type="text/javascript">
    var djConfig = {
        "isDebug": false,
        "parseWidgets": false,
        "debugAtAllCosts": false
    </script>
    <script type="text/javascript" src="/apogee-web-1.0-SNAPSHOT/theme/META-INF/dojo/dojo.js"></script>
    <script type="text/javascript" src="/apogee-web-1.0-SNAPSHOT/theme/META-INF/json/json.js"></script>
    <script type="text/javascript" src="/apogee-web-1.0-SNAPSHOT/theme/META-INF/prototype/prototype.js"></script>
    <script type="text/javascript" src="/apogee-web-1.0-SNAPSHOT/theme/META-INF/com_sun_faces_ajax.js"></script>
    <script type="text/javascript">
    dojo.hostenv.setModulePrefix("webui.suntheme", "/apogee-web-1.0-SNAPSHOT/theme/com/sun/webui/jsf/suntheme/javascript");
    dojo.require('webui.suntheme.*');
    dojo.require('webui.suntheme.widget.*');
    dojo.require('webui.suntheme.widget.jsfx.*');
    </script>
    <link id="link1" rel="stylesheet" type="text/css" href="/apogee-web-1.0-SNAPSHOT/resources/stylesheet.css" />
    </head>
    <body id="body1" style="-rave-layout: grid" onload="" onunload="">
    <form id="form1" class="form" method="post" action="/apogee-web-1.0-SNAPSHOT/faces/Apogee.jsp" enctype="application/x-www-form-urlencoded">
    <tiles:insertDefinition flush="false" name="global.layout" />
    <input id="form1_hidden" name="form1_hidden" value="form1_hidden" type="hidden" />
    <input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="H4sIAAAAAAAAAKVWTWwbRRR+Xmexm4LSOCgEiZRIFESFsk7bCyIUSFInsfBPZZsU2kM6Xk/sDevdYXbWXreiag+ABBcQIIEUBBIcemhP3HoAqh4QSEUiEhdOFReEBBwQEj8HYGZs79qOZZNkZD2vd957M98333vja7+A6lKYOJfaRDWkmcgqa9niJtbZ/JvfPP/hIeeoqQB4BAAiDoUTul3VHNfSNpCOHQ0RYho6YoZtaXmGGE4jC5UxTVaJeaRAMc7YJfz7xo3Prs+tfH63yFM/A2KsdOfBHsOWw7PwlDXEENX4PLEtbDFHO40oM5BZoKiGqYPMNQPXc7bNxCIQ3Vw3Svxz3HNegkug1Gdl/pl2/jouuoa26WwEGXnCMgaVcHusMyo0OGqVVU1QK9x2RSlDojAq8Shuu6LCg6NShvUiqCa3u1lr0S41QC1y2xWlDo5atmkV1A1uj3muiBJD8Z+iwRM//3GpEpcZpraKnEoaETXy/c1bk+e/DYOyDKOmjUrLSGc2TcIBVqHYqdhmySNPPyNT3FWPikSCAAZHRC6vpQC+My4mbem5XC6RKayvJRNn1nPZbEEsPsbg0TYCIQLhrHEcPKCIHKwt5RILhcQpGeTvUSp50bZNjKzbM/Tyd1t//6pA6CyoNWS62CMhBjP9dpBNn85mxB6Sp/I820SAeIFS1EgZDvOubE+//yX6IAyhJIw4xgUsCyRUHxHSY21teYSwQKACSUweyziIidHVQjq1vriQTy4xOBhfIHYZY342hC96KFg0ZevIxJf+HD+/NffXzwqMJCFa4dTrvLJSENFt12K0wSAmCzguYMfzjBpWeT4FUfHT5ZsRyz7A3WuIGshi8qdH/uWDATBQsCVeHe5mL2kxzIs59sNHn/xx5bXHFYG2xV57i9Iv41aLmL567d3pg+/ceaPdLkKEEF87oT7KUjuUJZ7u2SGSkHg9ISfv7eK3WYWdcu1pYS0Grm+v/fjT9MUVf08MIkXDKvG5YGsc9COdQghKQ7a0VS5gTPOi+bzw9acn3966nVZAScEB3USOk0HVNrmjDvcpyRgGk83jMOx4HnPKTeMCKpp4nkuCL3e4rWZsamuCz4RHeKmIBiiaWvjG1eKDD3/1nmiYFKaae9vpWh+9fO7OF/+8pUi3Cd8t8Pj4ldfzv53dflLCr5+AsYcutmQmBfry8DZJiCfQTfomJswUx7czUvrL6R4zUAXh3apACVQguiprd7ze5vVYO3S246jFU5zIr+NdhEhFDSFE3AAtQo76ZgAhTX/SB3TwNLb3ImheD/uELSgcBpv7tGCf9M0g2MI/OH1CAv9u0+/d/1BMJKCsl9vdgZcEDgEvbuIW+Gd9MwB805+IBn9/nJeh7VLeU+IOa5j8LsSYabrjBNuGPvju27skmrf4/iQhq2kIK+KfRouVp3wzgJWmf8/gd9asuM5nTdSwXfbETJkapZ4GEhsuh6m90yWu5rl90iUpH0KX+IvVokv3zQC6pH9nBe0YfUoF/gMrokC8ywsAAA==" />
    </form>
    <script type="text/javascript">
    webui.suntheme.common.body = new webui.suntheme.body('/Apogee.jsp', '/apogee-web-1.0-SNAPSHOT/faces/Apogee.jsp',null,null,'com_sun_webui_util_FocusManager_focusElementId');</script>
    </body>
    </html>

  • Current status of Tiles and JSF integration

    Hi. I am new to JSF, and I have been researching Tiles integration with JSF. I've read a lot of posts about difficulties encountered when integrating them, and other posts seem to suggest that it is definitely do-able (some posts say using Shale Tiles is the way to go instead of using Struts tiles.)
    I have not found any definitive or straight forward tutorial on integrating Tiles and JSF. Is it a matter of the JSF technology not being fully developed? Will tiles be easily integrated (as it is in Struts) in the future, without jumping through hoops?
    Any opinions or advice would be greatly appreciated. I would rather not use JSF w/ JSP includes as an alternative. It seems as though Struts would be a better choice for what I have to do, unless I can integrate JSF and tiles functionality with relative ease.
    Thanks.

    Cold-Gin wrote:
    I have not found any definitive or straight forward tutorial on integrating Tiles and JSF. Is it a matter of the JSF technology not being fully developed? Will tiles be easily integrated (as it is in Struts) in the future, without jumping through hoops?I certainly wouldn't say that JSF technology is not fully developed by any stretch. It's certainly possible that there's some sort of impedance mismatch between the two, but Tiles support is hardly the measure of a framework's maturity. :P
    Having said that, I really can't say much more than that with regard to Tiles. What I can suggest, though, is JSFTemplating or Facelets. Both are mature products, engineered specifically for use with JSF. Facelets is probably the more popular of the two and is slated for inclusion in JSF 2.0 in some form, while JSFTemplating, which supports the Facelets syntax, is another strong alternative (which, incidentally, is what powers the GlassFish admin GUI).
    Hope that helps...

  • Rendering Problems of JSF Tomahawk and Richfaces elements

    Hello,
    we developed a J2EE-Application on the Netweaver 7.0 (SP16) Platfarm, that uses JFS, Myfaces Tomahawk and Richfaces.
    It is developed as a "normal" J2EE Webmodule Project and works very well (even in the Portal).
    But one requiremant is, that the Application has to be a Development Component in a Development Track.
    So we ported the application into the Track without much trouble. But then we realized that many UI-Components, especially the Richfaces-Components do not render correctly.
    It seems, that the underlying Java-scrips are not generate properly, so that for example the Richfaces Calendar Component completetly fails. Also the scripts that apply certail style aspects to the UI-Components vanished.
    I have absolutely no idea, what could be the reason for that. There are no errors or exceptions. Just the underlying scripts are not generated or do not work.
    Does anybody have a hint what could be the solution?
    Regards,
    Jens Stolpmann
    Edited by: Jens Stolpmann on Jul 3, 2009 4:24 PM

    Hello,
    How did you manage to integrate RichFaces into your NWDS ? Do you have by any chance a tutorial that explains the steps to do it ?

  • How to integrate Single Sign-On and JSF?

    Hi all,
    We are going to develop a web application using Oracle technologies, including ADF and JSF.
    But we´ll need to secure our website using Oracle Identity Manager (Single Sign-On). I am having difficulties to find any resource explaining how to do that.
    Also, the IM (SSO) will run on a Oracle AS instance and our web app (ADF+JSF) will run on a separete OC4J instance, due to ADF version. Is this a problem?
    Thanks

    We too are in the process of implementing iStore with SSO features.
    And if you believe me it seems to me as nightmare.
    In our scenerio we are intgrating this SSO with Third party access control too (AD and Siteminder). I would request you to please respond me on the following mail id , so we can share our experince which will help us in our implementation
    [email protected]
    regards and thanks in advance
    Vikas Deep

  • Trying to use tomahawk and rich faces jar?

    I tried a very simple example to know how to use menu group. These are the following steps:
    1. I opened a web application using Netbeans using JSF as framework.
    2. When I run my application, it worked and welcomeJSF page was displayed.
    3. Then I wanted to a try a sample program. Hence I modified welcomeJSF page as below:
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>
    <%@ taglib uri="http://richfaces.org/rich" prefix="rich" %>
    <f:subview id="menuSubView">
        <h:form>
            <t:panelGrid columns="1" width="50">
                <rich:dropDownMenu value="Menu" direction="bottom-right">
                    <rich:menuItem value="Home" action="home"/>
                    <rich:menuSeparator id="menuSeparator1"/>
                    <rich:menuGroup value="test">
                        <rich:menuGroup value="Library ">
                            <rich:menuItem action="regNewLibrary" value="new"/>
                            <rich:menuItem action="regEditLibrary" value="edit"/>
                        </rich:menuGroup>
                       <rich:menuGroup value="Sample ">
                            <rich:menuItem action="regNewSample" value="new"/>
                            <rich:menuItem action="regEditSample" value="edit"/>
                        </rich:menuGroup>
                        <rich:menuGroup value="search ">
                            <rich:menuItem action="regSearchLibrary" value="library"/>
                            <rich:menuItem action="regSearchSample" value="sample"/>
                        </rich:menuGroup>
                    </rich:menuGroup>
                    <rich:menuSeparator id="menuSeparator2"/>
                    <rich:menuGroup value="test2 ">
                        <rich:menuItem action="testSelectLibrary" value="Load Library"/>
                        <rich:menuItem action="testSeqRequest" value="Seq Request"/>
                    </rich:menuGroup>
                    <rich:menuSeparator id="menuSeparator3"/>
                    <rich:menuItem value="Exit" action=" testing"/>
                </rich:dropDownMenu>
            </t:panelGrid>
        </h:form>
    </f:subview>4. I added tomahawk-1.1.6.jar, richfaces-api-3.1.0.jar, richfaces-impl-3.1.0.jar, richfaces-ui-3.1.0.jar into libraries.
    5. When I run my application, I get an error report as below:
    type Status report
    message /test1/
    description The requested resource (/test1/) is not available.Can anyone tell me what went wrong?

    Yes, I could guess my problem now. My web.xml is as below:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4" 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">
        <context-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/applicationContext.xml</param-value>
        </context-param>
        <context-param>
            <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
            <param-value>messages</param-value>
        </context-param>
        <context-param>
            <param-name>com.sun.faces.verifyObjects</param-name>
            <param-value>false</param-value>
        </context-param>
        <context-param>
            <param-name>com.sun.faces.validateXml</param-name>
            <param-value>true</param-value>
        </context-param>
        <context-param>
            <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
            <param-value>client</param-value>
        </context-param>
        <servlet>
            <servlet-name>Faces Servlet</servlet-name>
            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet-mapping>
            <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>/faces/*</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>*.html</url-pattern>
        </servlet-mapping>  
        <session-config>
            <session-timeout>
                30
            </session-timeout>
        </session-config>
        <welcome-file-list>
            <welcome-file>
                index.jsp
            </welcome-file>
        </welcome-file-list>
    </web-app>When I try to add filter for tomahawk and rich faces as below, I get deployment error.
    <filter>
            <filter-name>extensionsFilter</filter-name>
            <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
            <init-param>
                <description>Set the size limit for uploaded files.
                    Format: 10 - 10 bytes
                    10k - 10 KB
                    10m - 10 MB
                    1g - 1 GB
                </description>
                <param-name>uploadMaxFileSize</param-name>
                <param-value>100m</param-value>
            </init-param>
            <init-param>
                <description>Set the threshold size - files
                    below this limit are stored in memory, files above
                    this limit are stored on disk.
                    Format: 10 - 10 bytes
                    10k - 10 KB
                    10m - 10 MB
                    1g - 1 GB
                </description>
                <param-name>uploadThresholdSize</param-name>
                <param-value>100k</param-value>
            </init-param>
        </filter>
        <filter-mapping>
            <filter-name>extensionsFilter</filter-name>
            <url-pattern>*.html</url-pattern>
        </filter-mapping>
    <filter>
            <display-name>RichFaces Filter</display-name>
            <filter-name>richfaces</filter-name>
            <filter-class>org.ajax4jsf.Filter</filter-class>
        </filter>
        <filter-mapping>
            <filter-name>richfaces</filter-name>
            <servlet-name>Faces Servlet</servlet-name>
            <dispatcher>REQUEST</dispatcher>
            <dispatcher>FORWARD</dispatcher>
            <dispatcher>INCLUDE</dispatcher>
        </filter-mapping>Anything wrong in the above code?

  • Tomahawk + Facelets + JSF 1.1 + Tomcat 4.1

    When I try to run my server with the latest Tomahawk jar, I get the following exception on server startup:
    2006-06-30 08:10:15 org.apache.myfaces.component.html.ext.HtmlDataTable
    javax.faces.FacesException: Can't instantiate class: 'org.apache.myfaces.component.html.ext.HtmlDataTable'.
         at com.sun.faces.application.ApplicationImpl.newThing(ApplicationImpl.java:792)
         at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:372)
         at com.sun.faces.config.ConfigureListener.verifyObjects(ConfigureListener.java:1088)
         at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:362)
         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3212)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:3554)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:707)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316)
         at org.apache.catalina.core.StandardService.start(StandardService.java:450)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:2143)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:463)
         at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)
         at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)These are the jars I'm including in my library:
    antlr-2.7.6rc1.jar
    asm.jar
    cglib-2.1.3.jar
    commons-beanutils.jar
    commons-collections.jar
    commons-digester.jar
    commons-logging.jar
    dom4j-1.4.jar
    el-api.jar
    el-ri.jar
    hibernate3.jar
    httpunit.jar
    itext-1.4.jar
    jsf-api.jar
    jsf-facelets.jar
    JUnit.3.8.1.jar
    junitee.1.11.jar
    log4j-1.2.13.jar
    nekohtml.jar
    spring.jar
    tomahawk-1.1.3.jar
    jsf-impl.jarI've searched google and these forums for any related problems, but have come up short. Does anyone see a problem with my setup? Thanks in advance!

    Me as well I have the same problem when I tried to use a simple datatable in my JSP
    <t:dataTable id="data"      var="searchResult" border="1">
          <h:column>
              <h:outputText value="test" />     
         </h:column>
    </t:dataTable>The libraries I am using are :
    common-annotations.jar
    commons-beanutils.jar
    commons-collections.jar
    commons-digester.jar
    commons-logging.jar
    jsf-api.jar
    jsf-impl.jar
    jstl.jar.jar
    standard.jar
    tomahawk-1.1.3.jarMy error :
    org.apache.jasper.JasperException: Can't instantiate class: 'org.apache.myfaces.component.html.ext.HtmlDataTable'.
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:207)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:627)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:306)
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:326)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:132)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:225)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:194)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:198)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:138)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2459)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:132)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:593)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:593)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:126)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:534)I tried some other component of Tomahawk and it works, but I am struggling with the extended datatable.
    Thanks,
    Paul

  • J2EE, JSTL and JSF questions

    I am trying to learn J2EE/JSTL/JSF and have quite a few general questions. Any help on any of these is appreciated.
    1) Is there a way, just by using J2EE/Java to "manipulate" an XML file. Not just parse and read it's data but actually add nodes to the file?
    2) I've been reading quite a bit on JSTL and JSF recently. Is JSF supposed to be an alternative to Struts and JSTL an alternative to scriptlet coding?
    3) I am also working on creating a message board but throwing around a couple of ways to implement it. Either (a) using a database to store posts and a JSP interface or (b) using an XML document to store postings. Which of these two seem best or is there a better option?
    4) Is there an easy way to call Php from a Java program? I need to invoke a php program when a user clicks on a link on a JSP page I have.

    1) The SDK provides JAXP (Java API for XML Processing) in javax.xml package.
    2) I wouldn't call it 'alternative'.
    3) Your choice. I'd to use a RDBMS. Less overhead, better suited, (much) more functions and better performance.
    4) If that program is available on the web, then just invoke a HTTP request. If not, I'd rather to rewrite it to Java.

  • JSF Tiles Stylesheet solution

    This is just a post for other newbies (like me !) out there who might have struggled with integrating JSF & Tiles. It turns out my problem was not integration related at all & nor was it related to JSF (probably) or Tiles. I just did not know how to load a stylesheet correctly. The way I did it the first time was:
    <head>
    <link rel="stylesheet" href="./config/styles.css" type="text/css"/>
    </head>
    This worked fine the first time the page was displayed. Now if there was a validation error JSF would re-display the same page with all styles missing. The page would have the correct Tiles layout nonetheless.
    After much searching up all the wrong alleys (such as integration between the two etc.), I finally arrived at the correct way to load the .css file:
    <head>
    <link rel="stylesheet" href="<%=request.getContextPath()%>/config/styles.css" type="text/css" />
    </head>
    Now the path is derived from the contextPath of the application each time and the pages do not lose their styles.
    ...just in case someone else hits this and ends up looking here.
    Ciao, Bhishma

    Thanks Bhishma your solution was very usefull, I wish to know if you have some blog or something where I could write to you, for to be in touch and share experiences from our countries, sorry for my bad english

  • JSP 2.1 and JSF 1.2 support?

    hi
    when can we expect to see JSP 2.1 and JSF 1.2 support in JDeveloper?
    br. aspa

    Good question Neila!
    Shay, thanks for the input.
    We urgently need these informations in order to design our strategies for future projects architecturing. For exemple, we are working on new Java projects at my company and are relying on JDev + ADF Faces + EJB 3.0 + OAS 10.1.3, based on the current Oracle implementation. I'm affraid I will have to rewrite code after you release new versions of those. If yes, I'll be personally in a big trouble... :-)
    Regards,
    Gustavo

  • Mixing Non JSF and JSF components

    Hi All,
    I wanted to mix non jsf and jsf components and I able to do this
      <f:verbatim>
                                    <input type="radio" name="selectBidder" value="#{currentRow['BID_ID]}"/>
                                </f:verbatim>But the problem is bean value is not getting binded.
    The rendered output is containing same string i.e.
    value="#{currentRow['BID_ID]}"
    How to bind bean value to non jsf component.
    And No Javascript please
    Thanks
    Sudhakar

    Basically I am trying to implement something like below
    <h:dataTable binding="#{consumer$Select_Provider.dataTable1}" headerClass="list-header" id="dataTable1"
                            rowClasses="list-row-even,list-row-odd" style="left: 48px; top: 48px; position: absolute"
                            value="#{consumer$Select_Provider.dataTable1Model}" var="currentRow">
                            <h:column binding="#{consumer$Select_Provider.column6}" id="column6">
                                <h:outputText binding="#{consumer$Select_Provider.outputText11}" id="outputText11" value="#{currentRow['USER_LNAME']} #{currentRow['USER_FNAME']}"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{consumer$Select_Provider.outputText12}" id="outputText12" value="Bidder"/>
                                </f:facet>
                            </h:column>
                            <h:column binding="#{consumer$Select_Provider.column1}" id="column1">
                                <h:outputText binding="#{consumer$Select_Provider.outputText1}" id="outputText1" value="#{currentRow['BID_PRICE']}"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{consumer$Select_Provider.outputText2}" id="outputText2" value="Bid Price"/>
                                </f:facet>
                            </h:column>
                            <h:column binding="#{consumer$Select_Provider.column3}" id="column3">
                                <f:verbatim>
                                    <input name="selectBidder" type="radio" value="#{currentRow['BID_ID]}"/>
                                </f:verbatim>
                                <f:facet name="header">
                                    <h:outputText binding="#{consumer$Select_Provider.outputText6}" id="outputText6" value="Select Bidder"/>
                                </f:facet>
                            </h:column>
                        </h:dataTable>Thanks
    Sudhakar

  • Valuelist and jsf

    I trying to display large volume of search results (1000-3000 rows) on my JSF page. And here are my options:-
    1.DisplayTag and JSF
    http://displaytag.sourceforge.net/11/DisplayTag is a popular candidate. Matt Raible has posted an example http://demo.appfuse.org/appfuse-jsf/users.html example of JSF-DisplayTag integration. But I read somewhere that the performance degrades and the page takes more than 40 seconds to load when there are more than 5000 search results. It makes sense, as the search results are stored in the session in this approach.
    2.ValueListHandlerTag and JSF
    This http://valuelist.sourceforge.net/tutorial.htm tag uses the ValueListHandler J2EE pattern. But I could not find any examples of how to integrete this with JSF. Has any one tried this before?
    3.Custom JSF Compoenent
    Similar to the option above. Except that it would involve me writing a custom jsf component that uses the ValueListHandler pattern (call a stateful session bean to fetch the rows for the current page).
    4.MyFaces DataTable
    http://www.irian.at/cagatay-validation-sandbox/selectOneRow.jsf
    Havn't used this before. Is it any good?
    So, these are the options I have. Any suggestions..
    Message was edited by:
    Mike.Corleone

    Who on earth would read the 3000 rows at once? Google doesn't show billions webbpages at once in the same page, do they?
    Implement filtering (searching) and/or paging techniques. Showing 100 rows at once is far more than enough. You may get useful ideas out of this: [http://balusc.blogspot.com/2008/10/effective-datatable-paging-and-sorting.html].
    That said, in the future please do not resurrect old topics. Start your own topic for each independent problem. If you feel the need, you may always link to any old topic you found in your query.

  • Petstore and JSF

    I look into petstore and JSF recently, and have two questions about those.
    1. What application framework does the petstore application use, Sun's own framework or similiar to Struts, or something else?
    2. JSF has been a part of the J2EE and become a standard, will the petstore implementation reflect the development soon?
    Can someone give me some ideas please?
    Thank you in advance.

    I look into petstore and JSF recently, and have two
    questions about those.
    1. What application framework does the petstore
    application use, Sun's own framework or similiar to
    Struts, or something else?Something else, and again, it's just an example! ;-)
    2. JSF has been a part of the J2EE and become a
    standard, will the petstore implementation reflect the
    development soon?JSF is not yet part of J2EE. It may be part of J2EE 5.0 (the one after 1.4). Note that JSF is part of the J2EE 1.4 SDK (Sun Java System App Server 8) though.
    Note also that one of the great differences between Struts and JSF is that the later was build to be tools-friendly from day one. So if you use Java Studio Creator (http://www.sun.com/jscreator) for instance (it relies heavily on JSF), you don't need to know the goory details of the MVC implementation in JSF.
    -Alexis
    >
    Can someone give me some ideas please?
    Thank you in advance.

Maybe you are looking for