3 Replies Latest reply on Nov 13, 2007 8:19 AM by pmuir

    Seam Component as Richfaces Binding bean???

    xinhua

      yes, JSF binding bean could be a Seam Component. How about Richfaces binding bean?

      from Seam 1.2.1GA ~ 2.0.0GA , if i tried to use a Seam compoent as richfaces binding bean, followed exception tells me "no way":

      Caused by: java.lang.IllegalArgumentException: argument type mismatch
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at javax.el.BeanELResolver.setValue(BeanELResolver.java:108)
       at javax.el.CompositeELResolver.setValue(CompositeELResolver.java:68)
       at com.sun.faces.el.FacesCompositeELResolver.setValue(FacesCompositeELResolver.java:93)
       at org.jboss.el.parser.AstPropertySuffix.setValue(AstPropertySuffix.java:73)
       at org.jboss.el.parser.AstValue.setValue(AstValue.java:84)
       at org.jboss.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:249)
       at com.sun.facelets.el.TagValueExpression.setValue(TagValueExpression.java:93)
       ... 74 more
      


      What a pity!

        • 1. Re: Seam Component as Richfaces Binding bean???
          pmuir

          Post the xhtml and java code.

          • 2. Re: Seam Component as Richfaces Binding bean???
            xinhua

            hi,

            xhtml:

            <html xmlns="http://www.w3.org/1999/xhtml"
             xmlns:ui="http://java.sun.com/jsf/facelets"
             xmlns:h="http://java.sun.com/jsf/html"
             xmlns:s="http://jboss.com/products/seam/taglib"
             xmlns:f="http://java.sun.com/jsf/core"
             xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
             xmlns:rich="http://richfaces.ajax4jsf.org/rich">
            
            <ui:composition template="../#{theme.template}">
            
            
            <ui:define name="body">
            
            <rich:modalPanel id="Fenster" minHeight="600" minWidth="600" zindex="2000" binding="#{window.panel}">
             <f:facet name="header">
             <h:outputText value="Neu Fenster" />
             </f:facet>
             <f:facet name="controls">
             <h:graphicImage value="../images/default/modal/close.png" style="cursor:pointer" onclick="Richfaces.hideModalPanel('Fenster')" />
             </f:facet>
            
            </rich:modalPanel>
            
            </ui:define>
            </ui:composition>
            </html>
            


            binding bean:

            
            @Name("window")
            public class MsgMBean {
            
            @Logger Log log;
            private UIModalPanel panel;
            
             public UIModalPanel getPanel() {
             log.info("-----------> Panel kommt");
             return panel;
             }
            
             public void setPanel(UIModalPanel panel) {
             this.panel = panel;
             }
            
            }


            • 3. Re: Seam Component as Richfaces Binding bean???
              pmuir

              You'll have to use your debugger to find out what method it is trying to call, and what it is trying to pass in.