| Author |
Tomahawk Tabbed Pane problem
|
ved gunjan
Ranch Hand
Joined: May 17, 2003
Posts: 86
|
|
Hi Experts, Im new to the world of JSF and recently started uisng the MyFaces Tomahawk implementation. Im tyring to create tabbed panes and also customising it. Below is the code of the backing bean -------------------------------------------------------- public class TabbedBean { HtmlPanelTabbedPane tabbedPane; List tabs = new ArrayList(); public TabbedBean() { tabs.add("General"); tabs.add("Requirment"); tabs.add("Design"); tabs.add("Pricing"); } public void setTabbedPane(HtmlPanelTabbedPane pane){ tabbedPane = pane; } public HtmlPanelTabbedPane getTabbedPane(){ boolean firstTab = true; // tabs is a member that contains Strings for the tab titles for (Iterator it = tabs.iterator(); it.hasNext();) { String tabName = (String) it.next(); addTab(tabName, firstTab); firstTab = false; } return tabbedPane; } private void addTab(String tabName, boolean firstTab) { List tabbedPaneChildren = tabbedPane.getChildren(); HtmlPanelTab tab = new HtmlPanelTab(); tab.setLabel(tabName); if(firstTab){ tab.setStyle("background-color: #EEEEEE"); }else{ tab.setStyle("background-color: #CCCCCC"); } HtmlGraphicImage img = new HtmlGraphicImage(); //img.setUrl(getImagePathByName(tabName)); List tabChildren = tab.getChildren(); tabChildren.add(img); tabbedPaneChildren.add(tab); } } ------------------------------------------------------------ This is the code in the jsp <t:panelTabbedPane binding="#{tabbedBean.tabbedPane}"></t:panelTabbedPane> I've properly configured the bean in the faces-config.xml file But im getting the following exception... javax.faces.el.EvaluationException: javax.faces.el.EvaluationException: Exception getting value of property tabbedPane of base of type : com.backing.TabbedBean at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:206) at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154) at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:386) at javax.faces.webapp.UIComponentTag.createComponent(UIComponentTag.java:1009) ======================================================== Can any one provide me with the reason for this exception and also what is the corrective action. Thanks Ved
|
 |
 |
|
|
subject: Tomahawk Tabbed Pane problem
|
|
|