I am also interested if this does or does not work in a portlet...
I have been trying to get this to work with no success....
The releases are not there yet, wait a bit. It's still experimental anyway.
Of course if you are curious and not beginner you can make your path trough the compilation and configuration otherwise it's wiser not to go on cutting-edge technologies.
I will just wait a bit....
if anyone is curious, I do have Tomahawk working inside the portlet...
Its a nice alternative...
For the impatient check this branch of a Drag n Drop prototype using Ajax4JSF in a portal environment
Hint: Look at the SVN History for ideas of what files to look at
Thks for response.
If I've got time, I try to work on it.
PS: Sorry for my English.
I will also be playing with this...
Thanks so much!!
indyJones: do you know if all tomahawk components can be used inside a portlet? I'm curious starting to use RichFaces, but according to another thread, the JBoss Portal 2.6 isn't ready for RichFaces yet.
A wiki page has started to list the supported components if you try some and sucessfully have them working in a portlet environment please update the page:
Thomas, as you can see from my other thread on the same subject, there are still things not working correctly:
I get a Stacktrace when trying to use RichFaces in a JSF Portlet. Any input?
I am trying to deploy RichFaces portlet on Jboss Portal for about 2 days
I've read everything I could find on the Internet with no success. I hope You will be able to help me.
I am using
JBoss Portal 2.6.2.GA with bundled JBoss AS
.... <context-param> <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name> <param-value>org.ajax4jsf.portlet.application.PortletViewHandler</param-value> </context-param> ....
.... <portlet-name>Portlet</portlet-name> <portlet-class>org.ajax4jsf.portlet.AjaxFacesPortlet</portlet-class> <init-param> <name>default-view</name> <value>/pages/menu.jsp</value> </init-param> <init-param> <name>ViewPage</name> <value>/pages/menu.jsp</value> </init-param> <!-- disable portlet caching --> <expiration-cache>-1</expiration-cache> ....
.... <render-kit> <renderer> <description>override the viewroot</description> <component-family>javax.faces.ViewRoot</component-family> <renderer-type>javax.faces.ViewRoot</renderer-type> <renderer-class> org.ajax4jsf.portlet.renderkit.portlet.PortletAjaxViewRootRenderer </renderer-class> </renderer> </render-kit> <application> <view-handler> org.ajax4jsf.portlet.application.PortletViewHandler </view-handler> <state-manager> org.ajax4jsf.portlet.application.PortalStateManager </state-manager> </application> <managed-bean> <managed-bean-name>ajaxContext</managed-bean-name> <managed-bean-class>org.ajax4jsf.portlet.PortletAjaxContext</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> </managed-bean> ....
Portlet successfully deploys, but when viewed the Portal throws an exception:
javax.portlet.PortletException: Error processing execute lifecycle at org.ajax4jsf.portlet.AjaxFacesPortlet.doView(AjaxFacesPortlet.java:191) at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:133) at javax.portlet.GenericPortlet.render(GenericPortlet.java:306) ...... javax.faces.FacesException: java.lang.NullPointerException at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:306) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144) at org.ajax4jsf.portlet.AjaxFacesPortlet.render(AjaxFacesPortlet.java:256) at org.ajax4jsf.portlet.AjaxFacesPortlet.doView(AjaxFacesPortlet.java:175) at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:133) at javax.portlet.GenericPortlet.render(GenericPortlet.java:306) ....
Thanks in advance!
dimiter_a, have you tried to change the managed-bean-scope of the ajaxContext to something else than request? I'm not sure if that's you problem, or if you can live with another scope, but it's worth a chance. I've read some other places that people have experienced problems with request scope in portlets.
Finally I've made it work! :)
in the faces-config.xml should be added the folowing segment:
<factory> <faces-context-factory>org.ajax4jsf.portlet.context.FacesContextFactoryImpl</faces-context-factory> </factory>
It worked for me. I hope this will help someone else.