Hi all,

i'm absolutely amazed from jsf (myfaces), tobago and xml-driven interface-description with facelets.

i'm new to all three technologies and i am getting stuck at the very first beginning: Navigation Rules from Faces config don't work :-/

I got a first site (helloWorld.xml) with one button with the action "goon" that should lead to a site goon.xml (this xml file exists!).

The button is correctly being rendered in browser by tobago, i can click it, but the site only reloads and does not display the site goon.xml.

i will attach my files (faces-config.xml and helloWorld.xml)

i am using resin as servlet container (3.0.19), facelets 1.0.14, tobago (1.0.8)

help is much appreciated, i would like to learn this technology :)

thank you very much in advance
-- felix gonschorek

-----------> STDOUT <-----

[16:02:20.375] WebApp[http://localhost:8080/jsf] starting
[16:02:22.203] Resin started in 11688ms
[16:02:29.781] No state saving method defined, assuming default server state saving [16:02:30.281] Added Library from: jar:file:/C:/workspace/jsf/WEB-INF/lib/jsf-fa
celets-1.0.14.jar!/META-INF/jsf-html.taglib.xml
[16:02:30.296] Added Library from: jar:file:/C:/workspace/jsf/WEB-INF/lib/tobago
-facelets-1.0.8-SNAPSHOT.jar!/META-INF/tobago.taglib.xml
[16:02:30.343] Added Library from: jar:file:/C:/workspace/jsf/WEB-INF/lib/jsf-fa
celets-1.0.14.jar!/META-INF/jsf-ui.taglib.xml
[16:02:30.359] Added Library from: jar:file:/C:/workspace/jsf/WEB-INF/lib/tobago
-facelets-1.0.8-SNAPSHOT.jar!/META-INF/tobago-extension.taglib.xml
[16:02:30.421] Added Library from: jar:file:/C:/workspace/jsf/WEB-INF/lib/jsf-fa
celets-1.0.14.jar!/META-INF/jsf-core.taglib.xml
[16:02:30.453] Added Library from: jar:file:/C:/workspace/jsf/WEB-INF/lib/jsf-fa
celets-1.0.14.jar!/META-INF/jstl-core.taglib.xml
[16:02:30.468] Added Library from: jar:file:/C:/workspace/jsf/WEB-INF/lib/jsf-fa
celets-1.0.14.jar!/META-INF/jstl-fn.taglib.xml
[16:02:30.656] /helloWorld.xml @9,0 label="MYCREON TOBAGE IMPL. TEST :)" Propert y 'label' is not on type: org.apache.myfaces.tobago.component.UIPage [16:02:30.703] /helloWorld.xml @11,0 label="Go on" Property 'label' is not on type: org.apache.myfaces.tobago.component.UICommand
[16:02:31.140] ResourceServlet: init

<---------- STDOUT ------------->

clicking my button produces no debug output-....


here is my helloWorld.xml:
------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>

<tobago xmlns:f="http://java.sun.com/jsf/core";
                xmlns:tc="http://myfaces.apache.org/tobago/component";
                xmlns:ui="http://java.sun.com/jsf/facelets";
        xmlns:tx="http://myfaces.apache.org/tobago/facelet-extension";>

 <f:view>
  <tc:page label="MYCREON TOBAGE IMPL. TEST :)">
   <ui:debug hotkey="m"/>
   <tc:button label="Go on" action="goon" />
  </tc:page>
 </f:view>

</tobago>
------------------------------------------------------------
facex-config.xml:
------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>

<!--
<!DOCTYPE faces-config PUBLIC
  "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
  "http://java.sun.com/dtd/web-facesconfig_1_1.dtd";>
-->
<faces-config>

        <application>
                <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
<action-listener>org.apache.myfaces.tobago.application.ActionListenerImpl</action-listener>
                <locale-config>
                        <default-locale>en</default-locale>
                        <supported-locale>de</supported-locale>
                        <supported-locale>de_DE</supported-locale>
                        <supported-locale>de_AT</supported-locale>
                        <supported-locale>de_CH</supported-locale>
                </locale-config>
        </application>

        <navigation-rule>
                <navigation-case>
                        <from-outcome>goon</from-outcome>
                        <to-view-id>/goon.xml</to-view-id>
                </navigation-case>
        </navigation-rule>

</faces-config>

------------------------------------------------------------
and web.xml:
------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>

<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">

        <display-name>Blank Tobago Application</display-name>


        <context-param>
                <param-name>facelets.DEVELOPMENT</param-name>
                <param-value>true</param-value>
        </context-param>

        <context-param>
                <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
                <param-value>.xml</param-value>
        </context-param>

        <servlet>
                <servlet-name>FacesServlet</servlet-name>
                <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                <!--     <load-on-startup>1</load-on-startup> -->
        </servlet>

        <servlet>
                <servlet-name>ResourceServlet</servlet-name>
<servlet-class>org.apache.myfaces.tobago.servlet.ResourceServlet</servlet-class>
        </servlet>

        <!-- servlet-mapping -->
        <servlet-mapping>
                <servlet-name>FacesServlet</servlet-name>
                <url-pattern>*.jsf</url-pattern>
        </servlet-mapping>

        <servlet-mapping>
                <servlet-name>ResourceServlet</servlet-name>
                
<url-pattern>/org/apache/myfaces/tobago/renderkit/*</url-pattern>
        </servlet-mapping>

        <!-- The Usual Welcome File List -->
        <welcome-file-list>
                <welcome-file>index.html</welcome-file>
        </welcome-file-list>

        <listener>
<listener-class>org.apache.myfaces.tobago.webapp.TobagoServletContextListener</listener-class>
        </listener>
        
        <filter>
                <filter-name>multipartFormdataFilter</filter-name>
<filter-class>org.apache.myfaces.tobago.webapp.TobagoMultipartFormdataFilter</filter-class>
        </filter>
        
        <filter-mapping>
                <filter-name>multipartFormdataFilter</filter-name>
                <url-pattern>*.jsf</url-pattern>
        </filter-mapping>

</web-app>

------------------------------------------------------------



Reply via email to