0 Replies Latest reply on Apr 23, 2008 7:03 AM by David Spark

    rich:togglePanel binding IllegalArgumentException

    David Spark Newbie

      I'm trying to add a binding to rich:togglePanel so I can handle more complex functionality through code. Unfortunately I'm getting the following error at the first hurdle.

      java.lang.IllegalArgumentException: Component bookingForm:booking not instance of org.richfaces.component.UITogglePanel
       at org.ajax4jsf.renderkit.RendererBase.encodeBegin(RendererBase.java:94)
       at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
       at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:280)
       at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
       at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:220)
       at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:215)
       at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
       at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:271)
       at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:242)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
       at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
       at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:577)
       at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
       at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:189)
       at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
       at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
       at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
       at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      

      My code is as follows
      <h:form id="bookingForm">
      <h:panelGrid border="0" columns="2" style="table-layout: fixed;" width="100%" columnClasses="panel">
      <rich:panel>
       <rich:togglePanel id="booking" initialState="detail"
       stateOrder="detail,venue,staff"
       binding="#{bookingManager.togglePanel}">...

      @Name("bookingManager")
      public class BookingManagerBean
      {...
      
       private HtmlTogglePanel togglePanel = new HtmlTogglePanel();
      
       public HtmlTogglePanel getTogglePanel() {
       return togglePanel;
       }
      
       public void setTogglePanel(HtmlTogglePanel togglePanel) {
       this.togglePanel = togglePanel;
       }