1 2 3 Previous Next 30 Replies Latest reply on Jul 28, 2008 7:59 AM by kash_meu

    ANNOUNCE: first snapshot with Portal environment support

      We are ready to announce the initial version of Ajax4jsf with portal support. The Ajax4jsf snapshots built after 6:00PM, Apr 25, 2007 will contain it.
      Additionally, the simple example of portlet application - portal-echo has been created. It is available online at:
      http://livedemo.exadel.com/portal/potral-echo/

      This small application demonstrates:
      1) Two instances of the same portlet work independently from each other.
      2) Partial update of the portlet based on the client side event
      3) Navigation inside the portlet without refreshing the whole portal page

      To see the difference between two Ajax and Non-Ajax buttons:
      a) decrease the height of the browser until scroll bar appears
      b) scroll down the page
      c) click the "Non-Ajax Submit" or "Ajax Submit" button

      When you click the non-Ajax button, the page is refreshed and the scroller jumps up. It does not happen with Ajax button, because only the particular portlet is re-rendered when the navigation occurs.

      The source code of the portal-echo application you can find at Jboss SVN (Revision 129 and up):

      http://anonsvn.jboss.org/repos/ajax4jsf/trunk/samples/portal-echo/


      How to build:
      1. Take and build Ajax4jsf ( http://labs.jboss.com/wiki/HowToBuildAjax4jsf)
      2. Launch:
      mvn install
      from samples/portal-echo/ directory

      The target directory will contains the deployable file

      How to deploy:
      1. If you have no Jboss portal yet, download Jboss Portal+AS bundle from http://labs.jboss.com/jbossportal/download/index.html and copy it on your local disk
      2. copy portal-echo.war into <jboss-server-home>/server/default/deploy
      3. launch jboss server
      4. Type URL: http://localhost:8080/portal/portal-echo

      Additional to the three default navigation tabs, you can see two more: Portal-echo and Two-Portal-Echo . The first one contains one instance of portlet, the second one contains two instances of the same portlet.

      Working with GUI Tool:
      If you have an Eclipse 3.2 with WTP 1.5 (Exadel Studio 4.0.x is OK), you can import portal-echo project into Eclipse.

      1. Right in the samples/portal-echo/ directory launch:
      mvn eclipse:eclipse -DdownloadSources=true -Dwtpversion=1.5

      2. Import portal-echo project as an Existing Project into Workspace

      3. Create new Server configuration for Jboss Portal Server (use Jboss 4 from the list). Increase the timeout delay for server - Window -> Preferences; Server; Server timeout delay to "Longer"

      4. Add portal-echo to the server for deployment

      After that you are able to edit and launch the project from Eclipse. Do not ask me how to fight against the Jboss Portlet cache, however, Any advices how to do so are welcome. :-)

      ==========
      This portlet application is tested with Jboss Portal only and using FireFox and IE browsers. All possible aspects of the portal environment are not tested. RichFaces components are not tested also. We plan to support most popular portals and all set of browsers declared for Ajax4jsf and Richfaces.
      We assume that the initial version for portlet support might not be perfect. So, we are looking forward to hear from you. Any feedbacks (positive or negative) are welcome.

        • 1. Re: ANNOUNCE: first snapshot with Portal environment support
          maxandersen

          may i ask what version of jbossas you ran this on ? jboss 4.2 ?

          • 2. Re: ANNOUNCE: first snapshot with Portal environment support

            jboss-portal-2.4.2 has been installed on livedemo.exadel.com

            • 3. Re: ANNOUNCE: first snapshot with Portal environment support

              During the development, Alex used 4.0.4 + Portal 2.6.

              • 4. Re: ANNOUNCE: first snapshot with Portal environment support
                jleslie_manh

                I am trying the latest Ajax4jsf portlet-echo sample with Liferay 4.3 Rc1 but it results in the error below.


                20:28:50,517 ERROR [portal.render_portlet.jsp] javax.faces.FacesException: could'n determine portlet view id
                at org.ajax4jsf.portlet.application.PortletStateHolder.getViewId(PortletStateHolder.java:115)
                at org.ajax4jsf.portlet.AjaxFacesPortlet.restoreView(AjaxFacesPortlet.java:215)
                at org.ajax4jsf.portlet.AjaxFacesPortlet.doView(AjaxFacesPortlet.java:180)
                at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:235)
                at javax.portlet.GenericPortlet.render(GenericPortlet.java:163)
                at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:107)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
                at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
                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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
                at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
                at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
                at com.liferay.portlet.CachePortlet._invoke(CachePortlet.java:351)
                at com.liferay.portlet.CachePortlet.render(CachePortlet.java:198)
                at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:990)
                at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

                • 5. Re: ANNOUNCE: first snapshot with Portal environment support
                  suckerd

                  Hi I followed the instructions and
                  deployed to my jboss-portal-2.6-CR3 server...
                  I realized that the portalAjaxSample.war did not contain a jsf-api & impl as the pom defines them as "provided"!?
                  Who provides them? While the deloyment I first get the error-messages:

                  01:17:41,788 ERROR [[/portalAjaxSample]] StandardWrapper.Throwable
                  java.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions!
                  If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml.
                  A typical config looks like this;

                  <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>


                  at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:93)
                  at javax.faces.webapp.FacesServlet.init(FacesServlet.java:91)
                  at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
                  at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
                  at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3951)
                  at org.apache.catalina.core.StandardContext.start(StandardContext.java:4225)
                  .....cut....

                  and afterwards in the portal I get the same errors as described by jleslie_manh

                  Am I'am doing something wrong here?
                  Please help....

                  THX Mike

                  • 6. Re: ANNOUNCE: first snapshot with Portal environment support
                    alexsmirnov

                    Jboss AS provide JSF libraries for a all applications ( Myfaces 1.1.5 gor a jboss 4.0.5 & Sun RI 1.2 for a Jboss AS 4.2 ).
                    portal brige is not tested for a different environments , except Jboss Portal 2.6.

                    • 7. Re: ANNOUNCE: first snapshot with Portal environment support
                      suckerd

                      Mhh is there anyone who managed to deploy the test App onto a JBoss Portal Server 2.6?
                      I always get the Exception: javax.faces.FacesException: could'n determine portlet view id

                      Is there any location where I can get the war file that is deployed on the livedemo server?

                      THX,
                      Mike

                      • 8. Re: ANNOUNCE: first snapshot with Portal environment support
                        psig

                        Hello Sergey,
                        I tried to run the a2j-portlet stuff on my WebSphere Portal 5.1 environment. I have seen that you use some Java5 stuff in there. Is it intended to only run in a JEE5 (JSF1.2) environment.
                        Is there no support for Java1.4/J2EE 1.4 (JSF 1.1)?

                        I would be greatful for any comment on this!

                        • 9. Re: ANNOUNCE: first snapshot with Portal environment support
                          gressho

                          Hello Mike,

                          you're using JBossAS 4.2 which doesn't include Myfaces but the Sun JSF 1.2 RI.
                          That leads to the errors. In the Wiki (Portal or JBossAS?!) are some hints on how to replace
                          the SUN Faces by Myfaces.

                          Best wishes

                          Werner

                          • 10. Re: ANNOUNCE: first snapshot with Portal environment support
                            suckerd

                            Ok its working on my JBOSS Portal 2.6 , but under BEA 10 Portlet Server i get the following Error:

                            Error opening /portlets/index.faces.
                            The source of this error is:

                            javax.faces.FacesException: AJAX call to portlet without namespace parameter at org.ajax4jsf.portlet.context.ServletContextImpl.getNamespace(ServletContextImpl.java:73) at org.ajax4jsf.portlet.context.ServletContextImpl.getSessionPrefix(ServletContextImpl.java:193) at org.ajax4jsf.portlet.context.ServletContextImpl.getSessionAttribute(ServletContextImpl.java:219) at org.ajax4jsf.portlet.context.AbstractExternalContext$8.getAttribute(AbstractExternalContext.java:459) at org.ajax4jsf.portlet.context.ContextAttributesMap.get(ContextAttributesMap.java:18) at com.sun.faces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:71) at com.bea.portlet.adapter.faces.application.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:38) at org.ajax4jsf.framework.ajax.AjaxContext.getCurrentInstance(AjaxContext.java:154) at com.sample.jsffacelets.portlet.PortletViewHandler.createView(PortletViewHandler.java:33) at com.bea.portlet.adapter.faces.FacesContentStubImpl.setViewId(FacesContentStubImpl.java:451) at com.bea.portlet.adapter.faces.FacesContentStubImpl.restore(FacesContentStubImpl.java:368) at com.bea.portlet.adapter.faces.FacesContentStubImpl.render(FacesContentStubImpl.java:284) at com.bea.netuix.servlets.controls.content.FacesContent.beginRender(FacesContent.java:357) at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:483) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:220) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:375) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:341) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:332) at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:306) at com.bea.netuix.nf.UIControl.render(UIControl.java:578) at com.bea.netuix.servlets.controls.PresentationContext.render(PresentationContext.java:482) at com.bea.netuix.servlets.util.RenderToolkit.renderChild(RenderToolkit.java:146) at com.bea.netuix.servlets.jsp.taglib.skeleton.Child.doTag(Child.java:71) at jsp_servlet._framework._skeletons._bighorn.__flowlayout._jspService(__flowlayout.java:202) at weblogic.servlet.jsp.JspBase.service(JspBase.java:34) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283) at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:391) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:309) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175) at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:503) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:431) at com.bea.netuix.servlets.controls.application.laf.JspTools.renderJsp(JspTools.java:123) at com.bea.netuix.servlets.controls.application.laf.JspControlRenderer.beginRender(JspControlRenderer.java:72) at com.bea.netuix.servlets.controls.application.laf.PresentationControlRenderer.beginRender(PresentationControlRenderer.java:65) at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:479) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:220) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:375) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:341) at com.bea.netuix.nf.Lifecycle.runOutbound(Lifecycle.java:188) at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:148) at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:377) at com.bea.netuix.servlets.manager.UIServlet.processControlTree(UIServlet.java:296) at com.bea.netuix.servlets.manager.PortalServlet.service(PortalServlet.java:838) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at com.bea.portal.tools.servlet.http.HttpContextFilter.doFilter(HttpContextFilter.java:60) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:315) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3368) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(Unknown Source) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2117) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2023) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1359) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200) at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)

                            Any hints?

                            THX Mike

                            • 11. Re: ANNOUNCE: first snapshot with Portal environment support
                              pbakker

                              I also have the 'AJAX call to portlet without namespace parameter' exception when I try to deploy on Websphere Portal Server 5.1. Is there a known solution for this?

                              • 12. Re: ANNOUNCE: first snapshot with Portal environment support
                                suckerd

                                I filed a bug report concerning the namespace issue:
                                http://jira.jboss.com/jira/browse/AJSF-111

                                • 13. Re: ANNOUNCE: first snapshot with Portal environment support
                                  cybershastri

                                  Hi,

                                  I am trying to deploy portal-echo portlet that uses ajax4jsf 1.1.1 on Jboss portal 2.4.2, myfaces 1.1.5
                                  I am getting a NullPointerException at getViewPath -> getServletMapping while deploying the war file.
                                  Has anybody else encountered this issue? Am I missing something here?
                                  Any help would be greatly appreciated.

                                  Regards,
                                  Shaz.

                                  • 14. Re: ANNOUNCE: first snapshot with Portal environment support
                                    suckerd

                                    Concerning the bug with BEA WLP 10 and websphere -
                                    as ajax4jsf is now merged with richfaces this will be fixed in version 3.1.0 of richfaces - for details see:
                                    http://jira.jboss.com/jira/browse/RF-529?page=all

                                    1 2 3 Previous Next