voyent
MenuBar throws InvalidComponentTypeException ? Help  XML
Forum Index -> JBoss Seam Integration
Author Message
rangelmp

Joined: 14/Dec/2006 00:00:00
Messages: 26
Offline



=========
testes.xhtml
=========
Code:
 <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <ui:composition xmlns="http://www.w3.org/1999/xhtml"
 	xmlns:ui="http://java.sun.com/jsf/facelets"
 	xmlns:h="http://java.sun.com/jsf/html"
 	xmlns:f="http://java.sun.com/jsf/core"
 	xmlns:s="http://jboss.com/products/seam/taglib"
 	xmlns:a="https://ajax4jsf.dev.java.net/ajax"
 	xmlns:ice="http://www.icesoft.com/icefaces/component">
 <head>	
  <link href="./xmlhttp/css/xp/xp.css" rel="stylesheet" type="text/css" /> 
 </head>
 	<ui:define name="body">
 <h:form>
 	<ice:menuBar orientation="vertical">
 		<ice:menuItems value="#{menuDinamico.menuModel}" />
 	</ice:menuBar>
 
 
 	</h:form>
 	</ui:define>
 


=============
MenuDinamico.java
=============
Code:
 import java.util.ArrayList;
 import java.util.List;
 import org.jboss.seam.annotations.Name;
 
 import com.icesoft.faces.component.menubar.MenuItem;
 
 @Name("menuDinamico")
 public class MenuDinamico {
 	private List menuModel;
 	
     public List getMenuModel() {
         return menuModel;
     }
 	@SuppressWarnings("unchecked")
 	public MenuDinamico() {
 
 		menuModel = new ArrayList();
 
         MenuItem topLevel1 = new MenuItem();
         topLevel1.setIcon("xmlhttp/css/xp/css-images/menuitem.gif");
         topLevel1.setValue("topLevel1");
 
         MenuItem topLevel2 = new MenuItem();
         topLevel2.setIcon("xmlhttp/css/xp/css-images/menuitem.gif");
         topLevel2.setValue("topLevel2");
 
         MenuItem topLevel3 = new MenuItem();
         topLevel3.setIcon("xmlhttp/css/xp/css-images/menuitem.gif");
         topLevel3.setValue("topLevel3");
 
         menuModel.add(topLevel1);
         menuModel.add(topLevel2);
         menuModel.add(topLevel3);
 	}
 }
 



com.icesoft.faces.component.InvalidComponentTypeException
at com.icesoft.faces.component.menubar.MenuItemsRenderer.setParentsRecursive(MenuItemsRenderer.java:77)
at com.icesoft.faces.component.menubar.MenuItemsRenderer.encodeChildren(MenuItemsRenderer.java:59)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:524)
at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:341)
at com.icesoft.faces.component.menubar.MenuBarRenderer.encodeChildren(MenuBarRenderer.java:94)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:524)
.
.
.
 

Anyone can help me?
rangelmp

Joined: 14/Dec/2006 00:00:00
Messages: 26
Offline


==========
application.xml
==========
Code:
 <?xml version="1.0" encoding="UTF-8"?>
 <application xmlns="http://java.sun.com/xml/ns/javaee"
 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
 	version="5">
 
 	<display-name>Seam Generated Application</display-name>
 
 	<module>
 		<web>
 			<web-uri>TempoProjetoSeam.war</web-uri>
 			<context-root>/TempoProjetoSeam</context-root>
 		</web>
 	</module>
 	<module>
 		<java>jboss-seam.jar</java>
 	</module>
 	<module>
 		<ejb>TempoProjetoSeam.jar</ejb>
 	</module>
 	<module>
 		<java>jbpm-3.1.2.jar</java>
 	</module>
 	<module>
 		<java>el-api.jar</java>
 	</module>
 	<module>
 		<java>el-ri.jar</java>
 	</module>
 	<module>
 		<java>icefaces-facelets.jar</java>
 	</module>
 	<module>
 		<java>icefaces-comps.jar</java>
 	</module>
 		<module>
 		<java>icefaces.jar</java>
 	</module>
 
 </application>
 


==============
faces-config.xml
=============
Code:
 <?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>
 		<message-bundle>messages</message-bundle>
 		<view-handler>
 			org.jboss.seam.ui.facelet.SeamFaceletViewHandler
 		</view-handler>
 	</application>
 
 
 	
 	<!-- Seam transaction management -->
 	<lifecycle>
 		<phase-listener>
 			org.jboss.seam.jsf.TransactionalSeamPhaseListener
 		</phase-listener>
 	</lifecycle>
 
 	<!-- No Seam transaction management -->
 	<!--  
 		<lifecycle>
 		<phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>
 		</lifecycle>
 	-->
 
 </faces-config>
 


===========
web.xml
===========
Code:
 <?xml version="1.0" encoding="UTF-8"?>
 
 <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
 <!-- 
 	<context-param>
 		<param-name>javax.faces.CONFIG_FILES</param-name>
 		<param-value>/WEB-INF/navigation.xml</param-value>
 	</context-param> -->
 	 <context-param>
  <param-name>javax.faces.CONFIG_FILES</param-name>
  <param-value>/WEB-INF/faces-config.xml</param-value>
  </context-param>
 
 	<!-- Seam -->
 
 	<listener>
 		<listener-class>
 			org.jboss.seam.servlet.SeamListener
 		</listener-class>
 	</listener>
 
 	<!-- Propagate conversations across redirects -->
 	<!--
 		<filter>
 		<filter-name>Seam Redirect Filter</filter-name>
 		<filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>
 		</filter>
 		
 		<filter-mapping>
 		<filter-name>Seam Redirect Filter</filter-name>
 		<url-pattern>*.seam</url-pattern>
 		</filter-mapping>
 	-->
 	<filter>
 		<filter-name>Seam Exception Filter</filter-name>
 		<filter-class>
 			org.jboss.seam.servlet.SeamExceptionFilter
 		</filter-class>
 	</filter>
 
 	<filter-mapping>
 		<filter-name>Seam Exception Filter</filter-name>
 		<url-pattern>*.seam</url-pattern>
 	</filter-mapping>
 
 	<!-- JSF -->
 
 	<context-param>
 		<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
 		<param-value>client</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>com.icesoft.faces.actionURLSuffix</param-name>
 		<param-value>.seam</param-value>
 	</context-param>
 
 	<context-param>
 		<param-name>com.icesoft.faces.synchronousUpdate</param-name>
 		<param-value>true</param-value>
 	</context-param>
 
 	<context-param>
 		<param-name>com.icesoft.faces.doJSFStateManagement</param-name>
 		<param-value>true</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>
 
 	<!-- Faces Servlet Mapping -->
 	<!--
 		<servlet-mapping>
 		<servlet-name>Faces Servlet</servlet-name>
 		<url-pattern>*.seam</url-pattern>
 		</servlet-mapping>
 		
 	-->
 
 	<servlet>
 		<servlet-name>Blocking Servlet</servlet-name>
 		<servlet-class>
 			com.icesoft.faces.webapp.xmlhttp.BlockingServlet
 		</servlet-class>
 		<load-on-startup>1</load-on-startup>
 	</servlet>
 
 	<servlet>
 		<servlet-name>Persistent Faces Servlet</servlet-name>
 		<servlet-class>
 			com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet
 		</servlet-class>
 		<load-on-startup>1</load-on-startup>
 	</servlet>
 
 	<servlet-mapping>
 		<servlet-name>Persistent Faces Servlet</servlet-name>
 		<url-pattern>/xmlhttp/*</url-pattern>
 	</servlet-mapping>
 
 	<servlet-mapping>
 		<servlet-name>Persistent Faces Servlet</servlet-name>
 		<url-pattern>/xmlhttp/*</url-pattern>
 	</servlet-mapping>
 
 
 	<!-- Blocking Servlet Mapping -->
 	<servlet-mapping>
 		<servlet-name>Blocking Servlet</servlet-name>
 		<url-pattern>/block/*</url-pattern>
 	</servlet-mapping>
 
 	<!-- Faces Servlet Mapping -->
 	<servlet-mapping>
 		<servlet-name>Persistent Faces Servlet</servlet-name>
 		<url-pattern>*.seam</url-pattern>
 	</servlet-mapping>
 
 	<!-- MyFaces -->
 	<listener>
 		<listener-class>
 			org.apache.myfaces.webapp.StartupServletContextListener
 		</listener-class>
 	</listener>
 
 	<!-- JSF RI -->
 	<!--
 		<listener>
 		<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
 		</listener> 
 	-->
 
 </web-app>
 
philip.breau


Joined: 08/May/2006 00:00:00
Messages: 2989
Offline


Have you set the UseJBossWebLoader settting? Check out this post.

Thanks,
Philip

.
 
Forum Index -> JBoss Seam Integration
Go to:   
Powered by JForum 2.1.7ice © JForum Team