cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco Compatible JSF Component Sets

jbarrett
Champ in-the-making
Champ in-the-making
I know that Alfresco uses Mootools and I understand that it helps in webscript development. 

Because of this popular Ajaxified component sets like Richfaces will not work with Alfresco. 

Are there any open source Ajaxified component sets that work well with Alfresco?
5 REPLIES 5

rivarola
Champ on-the-rise
Champ on-the-rise
Hello,

With a 10-lines patch in the WebClient we made Ajax4Jsf work with Alfresco, but experienced incompatibilities with RichFaces and Tomahawk. I am also interested in discovering other compatible libraries…

jbarrett
Champ in-the-making
Champ in-the-making
Did that patch break anything else with Alfresco.  I was able to use the Ajax4JSF but my web forms on the WCM side broke.

Could you please post you patch?  I would like to give it a try. 

Thanks,

Josh

fhomasp
Champ in-the-making
Champ in-the-making
I'm interested in this as well. 

I currently open a custom JSF core page using an ftl html link attached to a user space.  But in order to make it look better some AJAX or richFaces stuff would be great.

I also need to embed the page(s) better, be able to navigate back and use specific user info in the custom page.
Anything that could help me on that one, eventhough it's kind of off topic here, is greatly appreciated.

dhalupa
Champ on-the-rise
Champ on-the-rise

rivarola
Champ on-the-rise
Champ on-the-rise
Hello,

Here is the SVN patch we use :
Index: projects/web-client/source/java/org/alfresco/web/app/servlet/FacesHelper.java
===================================================================
— projects/web-client/source/java/org/alfresco/web/app/servlet/FacesHelper.java   (revision 6799)
+++ projects/web-client/source/java/org/alfresco/web/app/servlet/FacesHelper.java   (working copy)
@@ -24,6 +24,8 @@
  */
package org.alfresco.web.app.servlet;

+import java.text.MessageFormat;
+
import java.util.regex.Pattern;

import javax.faces.FactoryFinder;
@@ -40,6 +42,7 @@
import javax.servlet.ServletContext;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;

import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.web.bean.generator.IComponentGenerator;
@@ -115,8 +118,20 @@
       InnerFacesContext.setFacesContextAsCurrent(facesContext);
      
       // set a new viewRoot, otherwise context.getViewRoot returns null
+      if (request instanceof HttpServletRequest)
+      {
+         HttpServletRequest hsr = (HttpServletRequest) request;
+         String path = hsr.getServletPath();
+         if (!path.startsWith("/faces"))
+         {
+            if (logger.isDebugEnabled())
+            {
+               System.out.println(MessageFormat.format("No JSF request found, creates a JSF tree for path {0}", path));
+            }        
       UIViewRoot view = facesContext.getApplication().getViewHandler().createView(facesContext, "/jsp/close.jsp");
       facesContext.setViewRoot(view);
+         }
+      }
      
       return facesContext;
    }

We do not use WCM, so I can't tell you if there is a regression in Web forms or not. Please tell me if you find any issue with that. From our point of view it does not break anything.