Hello Trinidad users,

 

I try to develop an application using the Trinidad capabilities. But the Trinidad Filter does not include the necessary css definitions to render the skins. Also the command Buttons are not rendered as image buttons as defined in the skin definition. They are rendered as ordinary <input type=”button”…>

 

The Tomahawk extension filter works. Lines like these ones are included in the output:

 

<script type="text/_javascript_" src="">

 

//--></script>

<script type="text/_javascript_" src="">

 

But not stylesheet definitions linking to the ADF Resource servlet are included in the output…

 

I have attached my web.xml and faces-config.xml

 

Perhaps someone can give me a hint (tomcat 5.5.17 Java 1.5)

 

Regards

Jochen

<?xml version="1.0"?>
<!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>
 <managed-bean>
  <managed-bean-name>loginController</managed-bean-name>
  <managed-bean-class>de.tccproducts.kn.jsf.controller.LoginController</managed-bean-class>
  <managed-bean-scope>request</managed-bean-scope>
 </managed-bean>
 <managed-bean>
  <managed-bean-name>keyAccountProfileEditorController</managed-bean-name>
  <managed-bean-class>de.tccproducts.kn.jsf.controller.KeyAccountProfileEditorController</managed-bean-class>
  <managed-bean-scope>session</managed-bean-scope>
 </managed-bean>
 <managed-bean>
  <managed-bean-name>mtn_ua_userAdministration</managed-bean-name>
  <managed-bean-class>de.tccproducts.kn.jsf.model.MenuTreeNode</managed-bean-class>
  <managed-bean-scope>none</managed-bean-scope>
  <managed-property>
   <property-name>action</property-name>
   <property-class>java.lang.String</property-class>
   <value>showUserList</value>
  </managed-property>
  <managed-property>
   <property-name>description</property-name>
   <property-class>java.lang.String</property-class>
   <value/>
  </managed-property>
  <managed-property>
   <property-name>icon</property-name>
   <property-class>java.lang.String</property-class>
   <value/>
  </managed-property>
  <managed-property>
   <property-name>label</property-name>
   <property-class>java.lang.String</property-class>
   <value>User Administration</value>
  </managed-property>
  <managed-property>
   <property-name>viewId</property-name>
   <property-class>java.lang.String</property-class>
   <value>/ua_userAdministration.xhtml</value>
  </managed-property>
  <managed-property>
   <property-name>children</property-name>
   <list-entries>
    <value-class>de.tccproducts.kn.jsf.model.MenuTreeNode</value-class>
    <value>#{mtn_ua_editUser}</value>
    <value>#{mtn_ua_createUser}</value>
    <value>#{mtn_ua_createRole}</value>
   </list-entries>
  </managed-property>
 </managed-bean>
 <managed-bean>
  <managed-bean-name>mtn_ua_createUser</managed-bean-name>
  <managed-bean-class>de.tccproducts.kn.jsf.model.MenuTreeNode</managed-bean-class>
  <managed-bean-scope>none</managed-bean-scope>
  <managed-property>
   <property-name>action</property-name>
   <property-class>java.lang.String</property-class>
   <value>showCreateUser</value>
  </managed-property>
  <managed-property>
   <property-name>description</property-name>
   <property-class>java.lang.String</property-class>
   <value/>
  </managed-property>
  <managed-property>
   <property-name>icon</property-name>
   <property-class>java.lang.String</property-class>
   <value/>
  </managed-property>
  <managed-property>
   <property-name>label</property-name>
   <property-class>java.lang.String</property-class>
   <value>Create User</value>
  </managed-property>
  <managed-property>
   <property-name>viewId</property-name>
   <property-class>java.lang.String</property-class>
   <value>/ua_createUser.xhtml</value>
  </managed-property>
 </managed-bean>
 <managed-bean>
  <managed-bean-name>mtn_ua_editUser</managed-bean-name>
  <managed-bean-class>de.tccproducts.kn.jsf.model.MenuTreeNode</managed-bean-class>
  <managed-bean-scope>none</managed-bean-scope>
  <managed-property>
   <property-name>action</property-name>
   <property-class>java.lang.String</property-class>
   <value>showEditUser</value>
  </managed-property>
  <managed-property>
   <property-name>description</property-name>
   <property-class>java.lang.String</property-class>
   <value/>
  </managed-property>
  <managed-property>
   <property-name>icon</property-name>
   <property-class>java.lang.String</property-class>
   <value/>
  </managed-property>
  <managed-property>
   <property-name>label</property-name>
   <property-class>java.lang.String</property-class>
   <value>Edit User</value>
  </managed-property>
  <managed-property>
   <property-name>viewId</property-name>
   <property-class>java.lang.String</property-class>
   <value>/ua_editUser.xhtml</value>
  </managed-property>
 </managed-bean>
 <managed-bean>
  <managed-bean-name>mtn_ua_createRole</managed-bean-name>
  <managed-bean-class>de.tccproducts.kn.jsf.model.MenuTreeNode</managed-bean-class>
  <managed-bean-scope>none</managed-bean-scope>
  <managed-property>
   <property-name>action</property-name>
   <property-class>java.lang.String</property-class>
   <value>showCreateRole</value>
  </managed-property>
  <managed-property>
   <property-name>description</property-name>
   <property-class>java.lang.String</property-class>
   <value/>
  </managed-property>
  <managed-property>
   <property-name>icon</property-name>
   <property-class>java.lang.String</property-class>
   <value/>
  </managed-property>
  <managed-property>
   <property-name>label</property-name>
   <property-class>java.lang.String</property-class>
   <value>Create Role</value>
  </managed-property>
  <managed-property>
   <property-name>viewId</property-name>
   <property-class>java.lang.String</property-class>
   <value>/ua_createRole.xhtml</value>
  </managed-property>
 </managed-bean>
 <managed-bean>
  <managed-bean-name>mtn_kape_keyAccountProfileEditor</managed-bean-name>
  <managed-bean-class>de.tccproducts.kn.jsf.model.MenuTreeNode</managed-bean-class>
  <managed-bean-scope>none</managed-bean-scope>
  <managed-property>
   <property-name>action</property-name>
   <property-class>java.lang.String</property-class>
   <value>showKeyAccountList</value>
  </managed-property>
  <managed-property>
   <property-name>description</property-name>
   <property-class>java.lang.String</property-class>
   <value/>
  </managed-property>
  <managed-property>
   <property-name>icon</property-name>
   <property-class>java.lang.String</property-class>
   <value/>
  </managed-property>
  <managed-property>
   <property-name>label</property-name>
   <property-class>java.lang.String</property-class>
   <value>Key Account Profile Editor</value>
  </managed-property>
  <managed-property>
   <property-name>viewId</property-name>
   <property-class>java.lang.String</property-class>
   <value>/ua_createRole.xhtml</value>
  </managed-property>
  <managed-property>
   <property-name>children</property-name>
   <list-entries>
    <value-class>de.tccproducts.kn.jsf.model.MenuTreeNode</value-class>
    <value>#{mtn_kape_createKeyAccount}</value>
   </list-entries>
  </managed-property>
 </managed-bean>
 <managed-bean>
  <managed-bean-name>mtn_kape_createKeyAccount</managed-bean-name>
  <managed-bean-class>de.tccproducts.kn.jsf.model.MenuTreeNode</managed-bean-class>
  <managed-bean-scope>none</managed-bean-scope>
  <managed-property>
   <property-name>action</property-name>
   <property-class>java.lang.String</property-class>
   <value>${keyAccountProfileEditorController.showCreateKeyAccount}</value>
  </managed-property>
  <managed-property>
   <property-name>description</property-name>
   <property-class>java.lang.String</property-class>
   <value/>
  </managed-property>
  <managed-property>
   <property-name>icon</property-name>
   <property-class>java.lang.String</property-class>
   <value/>
  </managed-property>
  <managed-property>
   <property-name>label</property-name>
   <property-class>java.lang.String</property-class>
   <value>Create Key Account</value>
  </managed-property>
  <managed-property>
   <property-name>viewId</property-name>
   <property-class>java.lang.String</property-class>
   <value>/kape_createKeyAccount.xhtml</value>
  </managed-property>
 </managed-bean>
 <managed-bean>
  <managed-bean-name>mtn_home</managed-bean-name>
  <managed-bean-class>de.tccproducts.kn.jsf.model.MenuTreeNode</managed-bean-class>
  <managed-bean-scope>application</managed-bean-scope>
  <managed-property>
   <property-name>action</property-name>
   <property-class>java.lang.String</property-class>
   <value>home</value>
  </managed-property>
  <managed-property>
   <property-name>description</property-name>
   <property-class>java.lang.String</property-class>
   <value/>
  </managed-property>
  <managed-property>
   <property-name>icon</property-name>
   <property-class>java.lang.String</property-class>
   <value/>
  </managed-property>
  <managed-property>
   <property-name>label</property-name>
   <property-class>java.lang.String</property-class>
   <value>Home</value>
  </managed-property>
  <managed-property>
   <property-name>viewId</property-name>
   <property-class>java.lang.String</property-class>
   <value>/main.xhtml</value>
  </managed-property>
  <managed-property>
   <property-name>children</property-name>
   <list-entries>
    <value-class>de.tccproducts.kn.jsf.model.MenuTreeNode</value-class>
    <value>#{mtn_ua_userAdministration}</value>
    <value>#{mtn_kape_keyAccountProfileEditor}</value>
   </list-entries>
  </managed-property>
 </managed-bean>
 <!-- create the treemodel -->
 <managed-bean>
  <managed-bean-name>navTreeList</managed-bean-name>
  <managed-bean-class>java.util.ArrayList</managed-bean-class>
  <managed-bean-scope>none</managed-bean-scope>
  <list-entries>
   <value-class>de.tccproducts.kn.jsf.model.MenuTreeNode</value-class>
   <value>#{mtn_home}</value>
  </list-entries>
 </managed-bean>
 <managed-bean>
  <managed-bean-name>navTreeModel</managed-bean-name>
  <managed-bean-class>org.apache.myfaces.trinidad.model.ChildPropertyTreeModel</managed-bean-class>
  <managed-bean-scope>none</managed-bean-scope>
  <managed-property>
   <property-name>childProperty</property-name>
   <value>children</value>
  </managed-property>
  <managed-property>
   <property-name>wrappedData</property-name>
   <value>#{navTreeList}</value>
  </managed-property>
 </managed-bean>
 <!-- create the navigationModel -->
 <managed-bean>
  <managed-bean-name>viewIdNavigationModel</managed-bean-name>
  <managed-bean-class>org.apache.myfaces.trinidad.model.ViewIdPropertyMenuModel</managed-bean-class>
  <managed-bean-scope>none</managed-bean-scope>
  <managed-property>
   <property-name>viewIdProperty</property-name>
   <value>viewId</value>
  </managed-property>
  <managed-property>
   <property-name>wrappedData</property-name>
   <value>#{navTreeModel}</value>
  </managed-property>
 </managed-bean>
 <navigation-rule>
  <from-view-id>/login.xhtml</from-view-id>
  <navigation-case>
   <from-action>#{loginController.login}</from-action>
   <from-outcome>success</from-outcome>
   <to-view-id>/main.xhtml</to-view-id>
  </navigation-case>
 </navigation-rule>
 <navigation-rule>
  <from-view-id>*</from-view-id>
  <navigation-case>
   <from-outcome>home</from-outcome>
   <to-view-id>/main.xhtml</to-view-id>
  </navigation-case>
  <navigation-case>
   <from-action>#{loginController.logout}</from-action>
   <from-outcome>success</from-outcome>
   <to-view-id>/login.xhtml</to-view-id>
  </navigation-case>
  <navigation-case>
   <from-outcome>showCreateKeyAccount</from-outcome>
   <to-view-id>/kape_createKeyAccount.xhtml</to-view-id>
  </navigation-case>
  <navigation-case>
   <from-outcome>showKeyAccountList</from-outcome>
   <to-view-id>/kape_showKeyAccountList.xhtml</to-view-id>
  </navigation-case>
 </navigation-rule>
 <application>
  <!-- Use the ADF RenderKit -->
  <default-render-kit-id>org.apache.myfaces.trinidad.core</default-render-kit-id>
  <locale-config>
   <default-locale>en</default-locale>
  </locale-config>
  <message-bundle>de.tccproducts.kn.i18n.i18n</message-bundle>
 </application>
</faces-config>
<?xml version="1.0"?>
<!--
	* Copyright 2004 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>FamilyTreeManagerNG</display-name>
 <!-- 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 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>
 <context-param>
  <description>This parameter tells MyFaces if javascript code should be
			allowed in the rendered HTML output. If javascript is
			allowed, command_link anchors will have javascript code that
			submits the corresponding form. If javascript is not
			allowed, the state saving info and nested parameters will be
			added as url parameters. Default: "true"</description>
  <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
  <param-value>true</param-value>
 </context-param>
 <context-param>
  <description>This parameter tells MyFaces if javascript code should be
			allowed in the rendered HTML output. If javascript is
			allowed, command_link anchors will have javascript code that
			submits the corresponding form. If javascript is not
			allowed, the state saving info and nested parameters will be
			added as url parameters. Default: "false"

			Setting this param to true should be combined with
			STATE_SAVING_METHOD "server" for best results.

			This is an EXPERIMENTAL feature. You also have to enable the
			detector filter/filter mapping below to get JavaScript
			detection working.</description>
  <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
  <param-value>false</param-value>
 </context-param>
 <context-param>
  <description>If true, rendered HTML code will be formatted, so that it is
			"human readable". i.e. additional line separators and
			whitespace will be written, that do not influence the HTML
			code. Default: "true"</description>
  <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
  <param-value>true</param-value>
 </context-param>
 <context-param>
  <description>If true, a javascript function will be rendered that is able
			to restore the former vertical scroll on every request.
			Convenient feature if you have pages with long lists and you
			do not want the browser page to always jump to the top if
			you trigger a link or button action that stays on the same
			page. Default: "false"</description>
  <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
  <param-value>false</param-value>
 </context-param>
 <context-param>
  <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>
  <param-value>org.apache.myfaces.renderkit.html.util.DefaultAddResource</param-value>
 </context-param>
 <context-param>
  <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
  <param-value>true</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>
 <context-param>
  <param-name>org.apache.myfaces.trinidad.resource.DEBUG</param-name>
  <param-value>true</param-value>
 </context-param>
 <context-param>
  <param-name>javax.faces.CONFIG_FILES</param-name>
  <param-value/>
 </context-param>
 <!-- With setting this parameter you are able to specify the logical
		outcome prefix to launch the dialog framework. If not set, the
		default value (dialog:) is used. 
		context-param>
		<param-name>org.apache.myfaces.trinidad.DIALOG_NAVIGATION_PREFIX</param-name>
		<param-value>userInputHere:</param-value>
		</context-param-->
 <context-param>
  <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
  <param-value>.xhtml</param-value>
 </context-param>
 <context-param>
  <param-name>facelets.DEVELOPMENT</param-name>
  <param-value>true</param-value>
 </context-param>
 <context-param>
  <param-name>facelets.LIBRARIES</param-name>
  <param-value>/WEB-INF/tomahawk.taglib.xml;/WEB-INF/tomahawk-sandbox.taglib.xml</param-value>
 </context-param>
 <context-param>
  <param-name>facelets.REFRESH_PERIOD</param-name>
  <param-value>1</param-value>
 </context-param>
 <filter>
  <filter-name>trinidad</filter-name>
  <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
 </filter>
 <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>
  <filter-name>HibernateFilter</filter-name>
  <filter-class>de.tccproducts.kn.dao.HibernateSessionRequestFilter</filter-class>
 </filter>
 <filter-mapping>
  <filter-name>trinidad</filter-name>
  <servlet-name>Faces Servlet</servlet-name>
 </filter-mapping>
 <filter-mapping>
  <filter-name>extensionsFilter</filter-name>
  <servlet-name>Faces Servlet</servlet-name>
 </filter-mapping>
 <filter-mapping>
  <filter-name>extensionsFilter</filter-name>
  <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
 </filter-mapping>
 <filter-mapping>
  <filter-name>HibernateFilter</filter-name>
  <servlet-name>Faces Servlet</servlet-name>
 </filter-mapping>
 <!-- Listener, that does all the startup work (configuration, init). -->
 <listener>
  <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
 </listener>
 <!-- Faces Servlet -->
 <servlet>
  <servlet-name>Faces Servlet</servlet-name>
  <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
  <load-on-startup>1</load-on-startup>
 </servlet>
 <!-- resource loader servlet -->
 <servlet>
  <servlet-name>resources</servlet-name>
  <servlet-class>org.apache.myfaces.trinidad.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>
 <servlet-mapping>
  <servlet-name>Faces Servlet</servlet-name>
  <url-pattern>*.faces</url-pattern>
 </servlet-mapping>
 <welcome-file-list>
  <welcome-file>/faces/login.xhtml</welcome-file>
 </welcome-file-list>
 <login-config>
  <auth-method>BASIC</auth-method>
 </login-config>
</web-app>

Reply via email to