Hello all, I have to admit I am a total noobie with MyFaces but I believe Tobago is a very powerful framework.
Having said this, I cannot populate a Sheet :-( Attached are the beans, the web.xml (tobago-config.xml is pretty standard), and the JSP page that creates the Sheet. In faces-config I declare the beans: ... <managed-bean> <description>Item bean</description> <managed-bean-name>itemBean</managed-bean-name> <managed-bean-class>test.ItemBean</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> </managed-bean> <managed-bean> <description>List bean</description> <managed-bean-name>listBean</managed-bean-name> <managed-bean-class>test.ListBean</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> ... I have the following jars in WEB-INF/lib folder: avalon-framework-4.1.3.jar tobago-core-1.1.0-SNAPSHOT.jar commons-beanutils-1.7.0.jar jstl-1.1.0.jar tobago-jsf-compat-1.1.0-SNAPSHOT.jar commons-collections-3.1.jar log4j-1.2.11.jar tobago-taglib-extension-1.1.0-SNAPSHOT.jar commons-digester-1.8.jar logkit-1.0.1.jar tobago-theme-charlotteville-1.1.0-SNAPSHOT.jar commons-el-1.0.jar myfaces-api-1.1.6.jar tobago-theme-richmond-1.1.0-SNAPSHOT.jar commons-fileupload-1.2.jar myfaces-impl-1.1.6.jar tobago-theme-scarborough-1.1.0-SNAPSHOT.jar commons-io-1.1.jar mysql-connector-java-5.1.7-bin.jar tobago-theme-speyside-1.1.0-SNAPSHOT.jar commons-lang-2.1.jar tobago-theme-standard-1.1.0-SNAPSHOT.jar commons-logging-1.1.jar standard-1.1.2.jar The result is that I see the box title and the empty sheet skeleton. No helpful logs. What am I missing? Thank you all in advance! Giovanni
package test; /** * @author Giovanni De Stefano */ public class ItemBean { private String name; /** * */ public ItemBean() { } /** * */ public ItemBean(String name) { this.name = name; } /** * */ public String getName() { return name; } /** * */ public void setName(String name) { this.name = name; } }
package test; import java.util.ArrayList; import java.util.List; import org.apache.myfaces.tobago.model.SheetState; /** * @author Giovanni De Stefano */ public class ListBean { private List<ItemBean> list; private SheetState selectedItems; /** * */ public ListBean() { list = new ArrayList<ItemBean>(); for (int i = 0; i < 15; i++) { list.add(new ItemBean(i + " ITEM")); } } /** * */ public void setSelectedItems(SheetState selectedItems) { this.selectedItems = selectedItems; } /** * */ public SheetState getSelectedItems() { return selectedItems; } /** * */ public List<ItemBean> getItems() { return list; } /** * */ public void setItems(List<ItemBean> list) { this.list = list; } }
<?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>Radio</display-name> <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>/faces/*</url-pattern> </filter-mapping> <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-name>FacesServlet</servlet-name> <url-pattern>/faces/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>ResourceServlet</servlet-name> <url-pattern>/org/apache/myfaces/tobago/renderkit/*</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app>
list.jsp
Description: Binary data