1 2 Previous Next 26 Replies Latest reply on Dec 4, 2006 10:32 AM by Chris Lowe

    Oracle ADF

    Deniss Parhomenko Newbie

      Hi

      Is it possible to use Oracle ADF with Seam instead of myfaces ?

        • 1. Re: Oracle ADF
          jameswoodward Newbie

          I think this question should be "Is it possible to use Oracle ADF Faces with Seam". You still need an implementation of JSF (in this case MyFaces).

          I am using ADF Faces EA19, MyFaces 1.1.0 on JBoss 4.0.3. I'm trying to replace my glue code with Seam, but not having much luck.

          It looks like Seam doesn't like ADF, I think this is due to both ADF and Seam defining a PhaseListener and VariableResolver. Can someone confirm if this is the case?

          Is it possible to remove the PhaseListener and/or VariableResolver from ADF?

          The exception I get when trying to convert the Registration Demo to use ADF is:

          2005-10-07 13:02:45,352 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/seam-registration].[jsp]] Servlet.service() for servlet jsp threw exception
          javax.faces.el.PropertyNotFoundException: Base is null: user
           at org.apache.myfaces.el.ValueBindingImpl.resolveToBaseAndProperty(ValueBindingImpl.java:457)
           at org.apache.myfaces.el.ValueBindingImpl.getType(ValueBindingImpl.java:169)
           at oracle.adfinternal.view.faces.renderkit.core.xhtml.ValueRenderer.getDefaultConverter(ValueRenderer.java:57)
           at oracle.adfinternal.view.faces.renderkit.core.xhtml.EditableValueRenderer.addOnSubmitConverterValidators(EditableValueRenderer.java:168)
           at oracle.adfinternal.view.faces.renderkit.core.xhtml.SimpleInputTextRenderer.encodeAllAsElement(SimpleInputTextRenderer.java:82)
           at oracle.adfinternal.view.faces.renderkit.core.xhtml.FormElementRenderer.encodeAll(FormElementRenderer.java:47)
           at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.delegateRenderer(CoreRenderer.java:271)
           at oracle.adfinternal.view.faces.renderkit.core.xhtml.InputLabelAndMessageRenderer.renderFieldCellContents(InputLabelAndMessageRenderer.java:92)
           at oracle.adfinternal.view.faces.renderkit.core.xhtml.LabelAndMessageRenderer._renderFieldCell(LabelAndMessageRenderer.java:291)
           at oracle.adfinternal.view.faces.renderkit.core.xhtml.LabelAndMessageRenderer.encodeAll(LabelAndMessageRenderer.java:162)
           at oracle.adfinternal.view.faces.renderkit.core.xhtml.InputLabelAndMessageRenderer.encodeAll(InputLabelAndMessageRenderer.java:71)
           at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeEnd(CoreRenderer.java:159)
           at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)
           at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeChild(CoreRenderer.java:236)
           at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelFormRenderer.renderColumn(PanelFormRenderer.java:233)
           at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelFormRenderer._renderColumns(PanelFormRenderer.java:502)
           at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelFormRenderer._encodeChildren(PanelFormRenderer.java:197)
           at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelFormRenderer.encodeAll(PanelFormRenderer.java:62)
           at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeEnd(CoreRenderer.java:159)
           at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)
           at oracle.adfinternal.view.faces.uinode.UIComponentUINode._renderComponent(UIComponentUINode.java:317)
           at oracle.adfinternal.view.faces.uinode.UIComponentUINode._renderComponent(UIComponentUINode.java:312)
           at oracle.adfinternal.view.faces.uinode.UIComponentUINode.render(UIComponentUINode.java:262)
           at oracle.adfinternal.view.faces.uinode.UIComponentUINode.render(UIComponentUINode.java:239)
           at oracle.adfinternal.view.faces.ui.composite.ContextPoppingUINode$ContextPoppingRenderer.render(ContextPoppingUINode.java:224)
           at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:346)
           at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:301)
           at oracle.adfinternal.view.faces.ui.BaseRenderer.renderChild(BaseRenderer.java:413)
           at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:331)
           at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:223)
           at oracle.adfinternal.view.faces.ui.BaseRenderer.renderContent(BaseRenderer.java:130)
           at oracle.adfinternal.view.faces.ui.BaseRenderer.render(BaseRenderer.java:82)
           at oracle.adfinternal.view.faces.ui.laf.base.xhtml.XhtmlLafRenderer.render(XhtmlLafRenderer.java:67)
           at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:346)
           at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:301)
           at oracle.adfinternal.view.faces.ui.BaseRenderer.renderChild(BaseRenderer.java:413)
           at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:331)
           at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:223)
           at oracle.adfinternal.view.faces.ui.BaseRenderer.renderContent(BaseRenderer.java:130)
           at oracle.adfinternal.view.faces.ui.laf.oracle.desktop.HeaderRenderer.renderContent(HeaderRenderer.java:483)
           at oracle.adfinternal.view.faces.ui.BaseRenderer.render(BaseRenderer.java:82)
           at oracle.adfinternal.view.faces.ui.laf.base.xhtml.XhtmlLafRenderer.render(XhtmlLafRenderer.java:67)
           at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:346)
           at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:301)
           at oracle.adfinternal.view.faces.ui.BaseRenderer.renderChild(BaseRenderer.java:413)
           at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:331)
           at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:223)
           at oracle.adfinternal.view.faces.ui.BaseRenderer.renderContent(BaseRenderer.java:130)
           at oracle.adfinternal.view.faces.ui.laf.base.xhtml.BorderLayoutRenderer.renderIndexedChildren(BorderLayoutRenderer.java:43)
           at oracle.adfinternal.view.faces.ui.laf.base.xhtml.BorderLayoutRenderer.renderContent(BorderLayoutRenderer.java:72)
           at oracle.adfinternal.view.faces.ui.BaseRenderer.render(BaseRenderer.java:82)
           at oracle.adfinternal.view.faces.ui.laf.base.xhtml.XhtmlLafRenderer.render(XhtmlLafRenderer.java:67)
           at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:346)
           at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:301)
           at oracle.adfinternal.view.faces.ui.BaseRenderer.renderChild(BaseRenderer.java:413)
           at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:331)
           at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:223)
           at oracle.adfinternal.view.faces.ui.BaseRenderer.renderContent(BaseRenderer.java:130)
           at oracle.adfinternal.view.faces.ui.BaseRenderer.render(BaseRenderer.java:82)
           at oracle.adfinternal.view.faces.ui.laf.base.xhtml.XhtmlLafRenderer.render(XhtmlLafRenderer.java:67)
           at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:346)
           at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:301)
           at oracle.adfinternal.view.faces.ui.composite.UINodeRenderer.renderWithNode(UINodeRenderer.java:90)
           at oracle.adfinternal.view.faces.ui.composite.UINodeRenderer.render(UINodeRenderer.java:36)
           at oracle.adfinternal.view.faces.ui.laf.oracle.desktop.PageLayoutRenderer.render(PageLayoutRenderer.java:79)
           at oracle.adfinternal.view.faces.uinode.UIXComponentUINode.renderInternal(UIXComponentUINode.java:177)
           at oracle.adfinternal.view.faces.uinode.UINodeRendererBase.encodeEnd(UINodeRendererBase.java:53)
           at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)
           at oracle.adfinternal.view.faces.uinode.UIComponentUINode._renderComponent(UIComponentUINode.java:317)
           at oracle.adfinternal.view.faces.uinode.UIComponentUINode.render(UIComponentUINode.java:262)
           at oracle.adfinternal.view.faces.uinode.UIComponentUINode.render(UIComponentUINode.java:239)
           at oracle.adfinternal.view.faces.ui.BaseRenderer.renderChild(BaseRenderer.java:413)
           at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:331)
           at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:223)
           at oracle.adfinternal.view.faces.ui.BaseRenderer.renderContent(BaseRenderer.java:130)
           at oracle.adfinternal.view.faces.ui.laf.base.xhtml.PartialRootRenderer.renderContent(PartialRootRenderer.java:112)
           at oracle.adfinternal.view.faces.ui.BaseRenderer.render(BaseRenderer.java:82)
           at oracle.adfinternal.view.faces.ui.laf.base.xhtml.XhtmlLafRenderer.render(XhtmlLafRenderer.java:67)
           at oracle.adfinternal.view.faces.ui.laf.base.xhtml.DocumentRenderer.render(DocumentRenderer.java:31)
           at oracle.adfinternal.view.faces.uinode.UIXComponentUINode.renderInternal(UIXComponentUINode.java:177)
           at oracle.adfinternal.view.faces.uinode.UINodeRendererBase.encodeEnd(UINodeRendererBase.java:53)
           at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)
           at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:349)
           at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:253)
           at oracle.adf.view.faces.webapp.UIXComponentTag.doEndTag(UIXComponentTag.java:100)
           at org.apache.jsp.jdw.register_jsp._jspx_meth_af_document_0(org.apache.jsp.jdw.register_jsp:148)
           at org.apache.jsp.jdw.register_jsp._jspx_meth_f_view_0(org.apache.jsp.jdw.register_jsp:113)
           at org.apache.jsp.jdw.register_jsp._jspService(org.apache.jsp.jdw.register_jsp:80)
           at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
           at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
           at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
           at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
           at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
           at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
           at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
           at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
           at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
           at oracle.adfinternal.view.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:157)
           at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:95)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
           at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
           at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
           at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
           at java.lang.Thread.run(Thread.java:595)
          2005-10-07 13:02:45,352 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/seam-registration].[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
          javax.faces.FacesException: Base is null: user
           at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421)
           at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
           at oracle.adfinternal.view.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:157)
           at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:95)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
           at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
           at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
           at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
           at java.lang.Thread.run(Thread.java:595)
          Caused by: org.apache.jasper.JasperException: Base is null: user
           at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:370)
           at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
           at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
           at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
           at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
           at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
           at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
           ... 23 more
          


          • 2. Re: Oracle ADF
            Gavin King Master

            This stack trace seems to show that the ADF variable resolver is being used instead of Seam's. Most certainly, Seam needs its variable resolver :)

            • 3. Re: Oracle ADF
              jameswoodward Newbie

              It looks like the problem lies in the adf-faces-impl-ea19.jar.

              There is a meta-inf/faces.config.xml file in the jar, which contains:

              <application>
               <view-handler>oracle.adfinternal.view.faces.application.ViewHandlerImpl</view-handler>
               <state-manager>oracle.adfinternal.view.faces.application.StateManagerImpl</state-manager>
               <navigation-handler>oracle.adfinternal.view.faces.application.NavigationHandlerImpl</navigation-handler>
               <variable-resolver>oracle.adfinternal.view.faces.el.AdfFacesVariableResolver</variable-resolver>
               </application>
              
               <lifecycle>
               <phase-listener>oracle.adfinternal.view.faces.context.AdfFacesPhaseListener</phase-listener>
               </lifecycle>
              
              


              I'm guessing that this is to provide the processScope functionality.

              I wonder if this variable resolver can be commented out as we need to use Seam's one?

              • 4. Re: Oracle ADF
                nusa Novice

                Hi all,

                I'm building a simple web app using ADF EA19, Seam, and JSF RI ( not Myfaces ). So far, I haven't any problem, ... yet. This is just a simple web app.

                • 5. Re: Oracle ADF
                  Jacob Hookom Newbie

                   

                  "JamesWoodward" wrote:


                  I'm guessing that this is to provide the processScope functionality.

                  I wonder if this variable resolver can be commented out as we need to use Seam's one?


                  If you ask the ADF developers, they recommend referencing your processScope variables by #{processScope.varName} to avoid conflicts with other variable resolvers.

                  • 6. Re: Oracle ADF
                    Jacob Hookom Newbie

                     

                    "JamesWoodward" wrote:
                    It looks like the problem lies in the adf-faces-impl-ea19.jar.

                    I'm guessing that this is to provide the processScope functionality.

                    I wonder if this variable resolver can be commented out as we need to use Seam's one?


                    Actually, both JSF parts (ADF and Seam) are properly written, since ADF loads from the Jar, you just need to make sure that your faces-config.xml in your application follows the guidlines here:

                    http://docs.jboss.com/seam/reference/en/html/tutorial.html#d0e516



                    • 7. Re: Oracle ADF
                      nusa Novice

                      HI all,

                      So far my attempt to use some of ADF component was succesful.
                      Except, when I tried the <af:table> component :

                      <af:table value="#{projectAction.findAll}" var="row" rows="10"
                       binding="#{projectAction.table}" >
                      

                      The backing bean associate is as follows :
                      @LoggedIn
                      @Name("projectAction")
                      public class ProjectAction {
                       ...
                       @Out(required=false)
                       private List<Project> listProject;
                      
                       @In(create=true)
                       private Session hibernateSession;
                      
                       public List<Project> getFindAll() {
                       log.info("=== getFindAll ... ");
                       if (listProject == null)
                       buildListProject();
                       return listProject;
                       }
                      
                       public void setFindAll(List<Project> prj) {
                       this.listProject = prj;
                       }
                      
                       @SuppressWarnings("unchecked")
                       public void buildListProject() {
                       log.info("=== buildListProject ... ");
                       List<Project> list = null;
                       try {
                       list = hibernateSession.createCriteria(Project.class)
                       .addOrder(Order.asc("projectName"))
                       .list();
                       log.info("=== buildListProject has : " + list.size());
                       } catch (HibernateException ex) {
                       throw new SeamTestException("HibernateException raised : " + ex.toString());
                       }
                       setFindAll(list);
                       }
                      
                       public UIXTable getTable() {
                       return table;
                       }
                      
                       public void setTable(UIXTable table) {
                       this.table = table;
                       }
                       ...
                      }
                      

                      Now, every time I deploy my war, and go to that page, I got the following error :
                      00:25:02,734 DEBUG [org.jboss.seam.contexts.Contexts] found in application context: org.jboss.seam.core.manager.component
                      00:25:02,734 INFO [example.action.ProjectAction] === getFindAll ...
                      00:25:02,735 INFO [example.action.ProjectAction] === buildListProject ...
                      00:25:02,743 DEBUG [javax.faces.el.PropertyResolver] Error getting property 'findAll' from bean of type example.action.ProjectAction$$EnhancerByCGLIB$$dac7ce50: java.lang.NullPointerException
                      java.lang.NullPointerException
                       at example.action.ProjectAction.buildListProject(Unknown Source)
                       at example.action.ProjectAction$$EnhancerByCGLIB$$dac7ce50.CGLIB$buildListProject$7(<generated>)
                       at example.action.ProjectAction$$EnhancerByCGLIB$$dac7ce50$$FastClassByCGLIB$$39eb179.invoke(<generated>)
                       at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:167)
                       at org.jboss.seam.interceptors.JavaBeanInterceptor.intercept(Unknown Source)
                      ...
                      

                      I do have a getter/setter for findAll, but why it's still complaining ?
                      Or is it something else ?

                      Any help would be very grateful.

                      Thanks,
                      nusa


                      • 8. Re: Oracle ADF
                        Deniss Parhomenko Newbie

                        put

                        @Intercept(InterceptionType.ALWAYS)
                        to class declaration
                        bet then, i think, you receive another exception related to binding="#{projectAction.table}".

                        • 9. Re: Oracle ADF
                          Gavin King Master

                          No, if he puts @Intercept(InterceptionType.ALWAYS) , I think it will work.

                          • 10. Re: Oracle ADF
                            nusa Novice

                             

                            "gavin.king@jboss.com" wrote:
                            No, if he puts @Intercept(InterceptionType.ALWAYS) , I think it will work.

                            No Gavin, Deniss is right.
                            I got :
                            12:33:41,659 DEBUG [javax.faces.el.PropertyResolver] Error getting property 'table' from bean of type example.action.ProjectAction$$EnhancerByCGLIB$$f7a9cd13: org.jboss.seam.RequiredException: In attribute requires value for component: project
                            org.jboss.seam.RequiredException: In attribute requires value for component: project
                             at org.jboss.seam.Component.getInstanceToInject(Unknown Source)
                             at org.jboss.seam.Component.injectFields(Unknown Source)
                             at org.jboss.seam.Component.inject(Unknown Source)
                             at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(Unknown Source)
                            

                            Any more sugggestions / help ?
                            Thanks

                            • 11. Re: Oracle ADF
                              Deniss Parhomenko Newbie

                              Try to define another bean

                              @Name("otherBean")
                              @Scope(org.jboss.seam.ScopeType.EVENT)
                              public class OtherBean{
                               private ... table;
                               public setTable(... table)
                               public ... getTable()
                              
                              


                              then in your jsp put
                              binding="#{otherBean.table}"


                              this code gets table binding:
                              Contexts.getEventContext().get("otherBean");
                              


                              • 12. Re: Oracle ADF
                                nusa Novice

                                Thanks Deniss,

                                Yes that works, except that I got a ClassCastException with this code:

                                UIXTable table = (UIXTable)Contexts.getEventContext().get("otherBean");
                                


                                The 'otherBena' is defined as :
                                @Name("otherBean")
                                @Scope(org.jboss.seam.ScopeType.EVENT)
                                public class OtherBean {
                                 private UIXTable table;
                                 public setTable(UIXTable table)
                                 public UIXTable getTable()
                                 ...
                                }
                                


                                Any idea ?

                                Thanks.


                                • 13. Re: Oracle ADF
                                  Deniss Parhomenko Newbie

                                  Try to put Object instead of UIXTable, and check which class are setted(use debugger ot System.out)

                                  • 14. Re: Oracle ADF
                                    jameswoodward Newbie

                                    Here is how I have modified the Registration sample, but I still get the above error. What else do I need to do/have I done wrong?

                                    web.xml

                                    <?xml version="1.0" encoding="UTF-8"?>
                                    <web-app version="2.4"
                                     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">
                                    
                                    
                                     <!-- Seam -->
                                    
                                     <listener>
                                     <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
                                     </listener>
                                    
                                     <!-- MyFaces -->
                                    
                                     <listener>
                                     <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
                                     </listener>
                                    
                                     <context-param>
                                     <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                                     <param-value>client</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>*.jsf</url-pattern>
                                     </servlet-mapping>
                                    
                                     <!-- ADF Faces -->
                                    
                                     <filter>
                                     <filter-name>AdfFacesFilter</filter-name>
                                     <filter-class>
                                     oracle.adf.view.faces.webapp.AdfFacesFilter
                                     </filter-class>
                                     </filter>
                                     <filter-mapping>
                                     <filter-name>AdfFacesFilter</filter-name>
                                     <servlet-name>FacesServlet</servlet-name>
                                     </filter-mapping>
                                     <servlet>
                                     <servlet-name>AdfResourceServlet</servlet-name>
                                     <servlet-class>
                                     oracle.adf.view.faces.webapp.ResourceServlet
                                     </servlet-class>
                                     </servlet>
                                     <servlet-mapping>
                                     <servlet-name>AdfResourceServlet</servlet-name>
                                     <url-pattern>/adf/*</url-pattern>
                                     </servlet-mapping>
                                    </web-app>
                                    


                                    faces-config.xml
                                    <?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>
                                    
                                     <navigation-rule>
                                     <from-view-id>/register.jsp</from-view-id>
                                     <navigation-case>
                                     <from-outcome>success</from-outcome>
                                     <to-view-id>/registered.jsp</to-view-id>
                                     </navigation-case>
                                     </navigation-rule>
                                    
                                     <!-- Same for all Seam applications -->
                                    
                                     <application>
                                     <variable-resolver>org.jboss.seam.jsf.SeamVariableResolver</variable-resolver>
                                     <default-render-kit-id>oracle.adf.core</default-render-kit-id>
                                     </application>
                                    
                                     <lifecycle>
                                     <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>
                                     </lifecycle>
                                    
                                     <navigation-rule>
                                     <from-view-id>/jdw/register.jsp</from-view-id>
                                     <navigation-case>
                                     <from-outcome>success</from-outcome>
                                     <to-view-id>/jdw/registered.jsp</to-view-id>
                                     </navigation-case>
                                     </navigation-rule>
                                    </faces-config>
                                    


                                    register.jsp
                                    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
                                    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
                                    <%@ taglib prefix="af" uri="http://xmlns.oracle.com/adf/faces" %>
                                    
                                    <f:view>
                                     <af:document title="Register New User">
                                    
                                     <af:panelPage title="Register New User">
                                    
                                     <f:facet name="messages">
                                     <af:messages/>
                                     </f:facet>
                                    
                                     <af:form>
                                     <af:panelForm>
                                     <af:inputText label="Username" value="#{user.username}"/>
                                     <af:inputText label="Real Name" value="#{user.name}"/>
                                     <af:inputText label="Password" value="#{user.password}"/>
                                    
                                     <f:facet name="footer">
                                     <af:commandButton text="Register" action="#{register.register}"/>
                                     </f:facet>
                                     </af:panelForm>
                                     </af:form>
                                     </af:panelPage>
                                     </af:document>
                                    </f:view>
                                    




                                    1 2 Previous Next