Hello Christoph,

you are using the myfaces jsf impl libs and the sun jsf impl libs.

You should include

jsf-api.jar
jsf-impl.jar

or

myfaces-api-1.1.2.jar
myfaces-impl-1.1.2.jar

not both.

Regards


Bernd

Christoph Lassner wrote:
Hi everybody!

Combining Tabago with Facelets is an intersting topic I thought and tried
to get it working. However, I still have some problems. The pages are
rendered properly in Tobago style, the tags are working. However, when I
set up navigation rules, they don't work. When I press a tobago button,
only the page will reload. Also tobago elements that require to load data
from the server (like calendar with popup) don't work, because when I click
the button to open it, only the page reloads. I really hope that someone
has got some idea how to fix that, because I'm desperately trying to fix
this.

As you will see, I just tried to use the facelets-example of the tobago
release, which didn't work any better.

My configuration:
      Apache Tomcat 5.5

      web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Copyright 2002-2005 The Apache Software Foundation.
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
-->
<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";>
 <display-name>Tobago Facelets Example 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>.xhtml</param-value>
 </context-param>
 <listener>
  <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</
listener-class>
 </listener>
 <listener>
  <listener-class>
org.apache.myfaces.tobago.webapp.TobagoServletContextListener</
listener-class>
 </listener>
 <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>
 <login-config>
  <auth-method>BASIC</auth-method>
 </login-config>
</web-app>

faces-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";>
<!--
 * Copyright 2002-2005 The Apache Software Foundation.
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
-->
<faces-config>
 <managed-bean>
  <managed-bean-name>counter</managed-bean-name>
  <managed-bean-class>org.apache.myfaces.tobago.example.facelets.Counter</
managed-bean-class>
  <managed-bean-scope>session</managed-bean-scope>
 </managed-bean>
 <managed-bean>
  <managed-bean-name>messageBackingBean</managed-bean-name>
  <managed-bean-class>
org.apache.myfaces.tobago.example.facelets.MessageBackingBean</
managed-bean-class>
  <managed-bean-scope>session</managed-bean-scope>
 </managed-bean>
 <navigation-rule>
  <from-view-id>/helloWorld.xhtml</from-view-id>
  <navigation-case>
   <from-outcome>next</from-outcome>
   <to-view-id>/helloWorldNext.xhtml</to-view-id>
  </navigation-case>
 </navigation-rule>
 <navigation-rule>
  <from-view-id>/helloWorldNext.xhtml</from-view-id>
  <navigation-case>
   <from-outcome>back</from-outcome>
   <to-view-id>/helloWorld.xhtml</to-view-id>
  </navigation-case>
 </navigation-rule>
 <application>
  <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
  <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>
</faces-config>

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

<!--
 * Copyright 2002-2005 The Apache Software Foundation.
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
-->

<!DOCTYPE tobago-config PUBLIC
    "-//The Apache Software Foundation//DTD Tobago Config 1.0//EN"
"tobago-config_1_0.dtd">

<tobago-config>

  <theme-config>
    <default-theme>speyside</default-theme>
  </theme-config>

  <resource-dir>tobago-resource</resource-dir>
  <resource-dir>org/apache/myfaces/tobago/renderkit</resource-dir>

</tobago-config>

helloWorld.xhtml:
<f:view xmlns:f="http://java.sun.com/jsf/core";
        xmlns:ui="http://java.sun.com/jsf/facelets";
        xmlns:tc="http://myfaces.apache.org/tobago/component";
        xmlns:tx="http://myfaces.apache.org/tobago/facelet-extension";>
  <tc:page label="Tobago Hello World Faclets">
    <f:facet name="layout">
      <tc:gridLayout/>
    </f:facet>

    <tc:out value="Hello World!"/>
    <ui:debug hotkey="m"/>
    <tc:button label="Weiter" action="next"/>
  </tc:page>
</f:view>

helloWorldnext.xhtml exists and is ok. I use tobago release 1.0.7. Files in
my lib:
commons-annotations.jar
commons-beanutils-1.0.7.jar
commons-codec-1.3.jar
commons-collections-3.1.jar
commons-digester-1.6.jar
commons-el-1.0.jar
commons-io-1.1.jar
commons-lang-2.1.jar
commons-logging-1.0.4.jar
el-api.jar
el-ri.jar
jsf-api.jar
jsf-facelets.jar
jsf-impl.jar
jstl-1.1.0.jar
myfaces-api-1.1.2.jar
myfaces-impl-1.1.2.jar
standard-1.1.2.jar
tobago-core-1.0.7.jar
tobago-facelets.jar
tobago-theme(s)...


Thanks A LOT in advance, hope you can help
Chris


Reply via email to