cancel
Showing results for 
Search instead for 
Did you mean: 

Facelets???

manuelgentile
Champ in-the-making
Champ in-the-making
Is it possible to integrate into the Alfresco Web Client a set of pages made with Facelets!?!?!?
It's a special content editor??

Thanks
33 REPLIES 33

manuelgentile
Champ in-the-making
Champ in-the-making
Are you going to use facelets? or other view framework!??!

BTW I have already convert some pages like browse.jsp and so on….

gavinc
Champ in-the-making
Champ in-the-making
No, we are planning on sticking with standard JSF as we have too much invested in the current approach to start from scratch, besides we won't have enough time to redesign the UI and switch framework 😞

I did spend a day a few weeks ago converting some of the existing UI i.e. browse.jsp to facelets to see what would be involved. I managed to get the overall page structure functioning but some of our components were not behaving as expected in the facelets environment.

I'm therefore very keen to see how far you have gotten with the conversion process. What problems/challenges have you faced? Have you had to make any changes to our code?

Let me know when you have created the forge project and I'll take a look.

Cheers,

manuelgentile
Champ in-the-making
Champ in-the-making
What are the components that have different behaviuors in the facelets environment? Some examples?
I did not found any differences using browse.xhtml ?!?!?!

gavinc
Champ in-the-making
Champ in-the-making
If I remember rightly some of the action listener methods did not work correctly and I had a few issues using our rich list component if there was more than one item to display in a list.

manuelgentile
Champ in-the-making
Champ in-the-making
If you want i can post some xhtml pages and the configurations.
Do you want it to check the functionality???

gavinc
Champ in-the-making
Champ in-the-making
Yes, I'm very keen to see whatever you have working, please post them.

manuelgentile
Champ in-the-making
Champ in-the-making
alfresco.taglib.xml

<?xml version="1.0"?>
<!DOCTYPE facelet-taglib PUBLIC
  "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
  "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">

<facelet-taglib>
   <namespace>http://www.alfresco.org/alfresco</namespace>
   <tag>
      <tag-name>inputDatePicker</tag-name>
      <component>
         <component-type>javax.faces.Input</component-type>
         <renderer-type>org.alfresco.faces.DatePickerRenderer</renderer-type>
      </component>
   </tag>


   <tag>
      <tag-name>modeList</tag-name>
      <component>
         <component-type>org.alfresco.faces.ModeList</component-type>
         <renderer-type>org.alfresco.faces.ModeListRenderer</renderer-type>
      </component>
   </tag>
   
   <tag>
      <tag-name>listItem</tag-name>
      <component>
         <component-type>org.alfresco.faces.ListItem</component-type>
      </component>
   </tag>
   
   <tag>
      <tag-name>listItems</tag-name>
      <component>
         <component-type>org.alfresco.faces.ListItems</component-type>
      </component>
   </tag>
   
   <tag>
      <tag-name>errors</tag-name>
      <component>
         <component-type>javax.faces.Messages</component-type>
         <renderer-type>org.alfresco.faces.Errors</renderer-type>
      </component>
   </tag>
   

   
   <tag>
      <tag-name>actionLink</tag-name>
      <component>
         <component-type>org.alfresco.faces.ActionLink</component-type>
         <renderer-type>org.alfresco.faces.ActionLinkRenderer</renderer-type>
      </component>
   </tag>
   
   <tag>
      <tag-name>booleanEvaluator</tag-name>
      <component>
         <component-type>org.alfresco.faces.BooleanEvaluator</component-type>
      </component>
   </tag>

   <tag>
      <tag-name>panel</tag-name>
      <component>
         <component-type>org.alfresco.faces.Panel</component-type>
      </component>
   </tag>
   
   <tag>
      <tag-name>richList</tag-name>
      <component>
         <component-type>org.alfresco.faces.RichList</component-type>
         <renderer-type>org.alfresco.faces.RichListRenderer</renderer-type>
      </component>
   </tag>
   
   <tag>
      <tag-name>dataPager</tag-name>
      <component>
         <component-type>org.alfresco.faces.DataPager</component-type>
      </component>
   </tag>
   
   <tag>
      <tag-name>column</tag-name>
      <component>
         <component-type>org.alfresco.faces.RichListColumn</component-type>
      </component>
   </tag>
   
   <tag>
      <tag-name>sortLink</tag-name>
      <component>
         <component-type>org.alfresco.faces.SortLink</component-type>
      </component>
   </tag>
   
   <tag>
      <tag-name>menu</tag-name>
      <component>
         <component-type>org.alfresco.faces.Menu</component-type>
      </component>
   </tag>
   
   <tag>
      <tag-name>breadcrumb</tag-name>
      <component>
         <component-type>org.alfresco.faces.Breadcrumb</component-type>
         <renderer-type>org.alfresco.faces.BreadcrumbRenderer</renderer-type>
      </component>
   </tag>
   
   <tag>
        <tag-name>convertXMLDate</tag-name>
      <converter>
         <converter-id>org.alfresco.faces.XMLDateConverter</converter-id>
      </converter>
   </tag>
   
   <tag>
        <tag-name>convertSize</tag-name>
      <converter>
         <converter-id>org.alfresco.faces.ByteSizeConverter</converter-id>
      </converter>
   </tag>

</facelet-taglib>

manuelgentile
Champ in-the-making
Champ in-the-making
repo.taglib.xml

<?xml version="1.0"?>
<!DOCTYPE facelet-taglib PUBLIC
  "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
  "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">

<facelet-taglib>
   <namespace>http://www.alfresco.org/repo</namespace>
   <tag>
      <tag-name>page</tag-name>
      <component>
         <component-type>javax.faces.Input</component-type>
         <renderer-type>org.alfresco.faces.DatePickerRenderer</renderer-type>
      </component>
   </tag>
   
   <tag>
      <tag-name>simpleSearch</tag-name>
      <component>
         <component-type>org.alfresco.faces.SimpleSearch</component-type>
      </component>
   </tag>
   
   <tag>
      <tag-name>shelf</tag-name>
      <component>
         <component-type>org.alfresco.faces.Shelf</component-type>
      </component>
   </tag>
   
   <tag>
      <tag-name>shelfGroup</tag-name>
      <component>
         <component-type>org.alfresco.faces.ShelfGroup</component-type>
      </component>
   </tag>
   
   <tag>
      <tag-name>shelfItem</tag-name>
      <component>
         <component-type>org.alfresco.faces.ShelfItem</component-type>
      </component>
   </tag>
   
   <tag>
      <tag-name>clipboardShelfItem</tag-name>
      <component>
         <component-type>org.alfresco.faces.ClipboardShelfItem</component-type>
      </component>
   </tag>
   
   <tag>
      <tag-name>recentSpacesShelfItem</tag-name>
      <component>
         <component-type>org.alfresco.faces.RecentSpacesShelfItem</component-type>
      </component>
   </tag>   
   
   <tag>
      <tag-name>shortcutsShelfItem</tag-name>
      <component>
         <component-type>org.alfresco.faces.ShortcutsShelfItem</component-type>
      </component>
   </tag>
   
   <tag>
      <tag-name>nodeDescendants</tag-name>
      <component>
         <component-type>org.alfresco.faces.NodeDescendants</component-type>
         <renderer-type>org.alfresco.faces.NodeDescendantsLinkRenderer</renderer-type>
      </component>
   </tag>
   
   <tag>
      <tag-name>actions</tag-name>
      <component>
         <component-type>org.alfresco.faces.Actions</component-type>
      </component>
   </tag>   
   
   <tag>
      <tag-name>permissionEvaluator</tag-name>
      <component>
         <component-type>org.alfresco.faces.PermissionEvaluator</component-type>
      </component>
   </tag>   
   
   <tag>
      <tag-name>nodeInfo</tag-name>
      <component>
         <component-type>org.alfresco.faces.NodeInfo</component-type>
      </component>
   </tag>   
   
   <tag>
      <tag-name>nodePath</tag-name>
      <component>
         <component-type>org.alfresco.faces.NodePath</component-type>
         <renderer-type>org.alfresco.faces.NodePathLinkRenderer</renderer-type>
      </component>
   </tag>
   
   <tag>
      <tag-name>lockIcon</tag-name>
      <component>
         <component-type>org.alfresco.faces.LockIcon</component-type>
      </component>
   </tag>
   
   
   
   
   
   
   
   
   



</facelet-taglib>

manuelgentile
Champ in-the-making
Champ in-the-making
the initial part of the web.xml
<web-app>
   <display-name>Alfresco Web Client</display-name>

   <description>Alfresco Web Client</description>


   <context-param>
      <param-name>facelets.LIBRARIES</param-name>
      <param-value>
         /WEB-INF/taglib/sloop/sloop.taglib.xml;/WEB-INF/taglib/amg/amg.taglib.xml;/WEB-INF/taglib/tomahawk.taglib.xml;/WEB-INF/taglib/sandbox.taglib.xml;/WEB-INF/taglib/alfresco.taglib.xml;/WEB-INF/taglib/repo.taglib.xml;/WEB-INF/taglib/bsh.taglib.xml
      </param-value>
   </context-param>
   <context-param>
      <param-name>facelets.DEVELOPMENT</param-name>
      <param-value>true</param-value>
   </context-param>
   <context-param>
      <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
      <param-value>.jsp</param-value>
   </context-param>
   <context-param>
      <param-name>facelets.VIEW_MAPPINGS</param-name>
      <param-value>*.xhtml</param-value>
   </context-param>
   <context-param>
      <param-name>com.sun.faces.validateXml</param-name>
      <param-value>true</param-value>
   </context-param>
   <context-param>
      <param-name>com.sun.faces.verifyObjects</param-name>
      <param-value>true</param-value>
   </context-param>

manuelgentile
Champ in-the-making
Champ in-the-making
in the faces-custom-config


<application>
   <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
</application>

and



<navigation-rule>
      <from-view-id>/jsp/sloop/browse/browse.xhtml</from-view-id>
      <!– showDocDetails and showSpaceDetails moved to /jsp/* above –>
      <navigation-case>
         <from-outcome>checkoutFile</from-outcome>
         <to-view-id>/jsp/dialog/checkout-file.jsp</to-view-id>
      </navigation-case>
      <navigation-case>
         <from-outcome>checkinFile</from-outcome>
         <to-view-id>/jsp/dialog/checkin-file.jsp</to-view-id>
      </navigation-case>
      <navigation-case>
         <from-outcome>undoCheckoutFile</from-outcome>
         <to-view-id>/jsp/dialog/undocheckout-file.jsp</to-view-id>
      </navigation-case>
      <navigation-case>
         <from-outcome>updateFile</from-outcome>
         <to-view-id>/jsp/dialog/update-file.jsp</to-view-id>
      </navigation-case>
      <navigation-case>
         <from-outcome>editFile</from-outcome>
         <to-view-id>/jsp/dialog/edit-file.jsp</to-view-id>
      </navigation-case>
      <navigation-case>
         <from-outcome>editHtmlInline</from-outcome>
         <to-view-id>/jsp/dialog/edit-html-inline.jsp</to-view-id>
      </navigation-case>
      <navigation-case>
         <from-outcome>editTextInline</from-outcome>
         <to-view-id>/jsp/dialog/edit-text-inline.jsp</to-view-id>
      </navigation-case>
      <navigation-case>
         <from-outcome>manageInvitedUsers</from-outcome>
         <to-view-id>/jsp/roles/manage-invited-users.jsp</to-view-id>
      </navigation-case>
      <navigation-case>
         <from-outcome>manageContentUsers</from-outcome>
         <to-view-id>/jsp/roles/manage-content-users.jsp</to-view-id>
      </navigation-case>
      <navigation-case>
         <from-outcome>manageRules</from-outcome>
         <to-view-id>/jsp/dialog/rules.jsp</to-view-id>
      </navigation-case>
      <navigation-case>
         <from-outcome>previewContent</from-outcome>
         <to-view-id>/jsp/dialog/preview-file.jsp</to-view-id>
      </navigation-case>
      <navigation-case>
         <from-outcome>previewSpace</from-outcome>
         <to-view-id>/jsp/dialog/preview-space.jsp</to-view-id>
      </navigation-case>
      <navigation-case>
         <from-outcome>startDiscussion</from-outcome>
         <to-view-id>/jsp/forums/create-topic.jsp</to-view-id>
      </navigation-case>
      <navigation-case>
         <from-outcome>showForum</from-outcome>
         <to-view-id>/jsp/forums/forum.jsp</to-view-id>
      </navigation-case>
      <navigation-case>
         <from-outcome>showTopic</from-outcome>
         <to-view-id>/jsp/forums/topic.jsp</to-view-id>
      </navigation-case>
      <navigation-case>
         <from-outcome>saveNewSearch</from-outcome>
         <to-view-id>/jsp/dialog/save-search.jsp</to-view-id>
      </navigation-case>
      <navigation-case>
         <from-outcome>saveEditSearch</from-outcome>
         <to-view-id>/jsp/dialog/edit-search.jsp</to-view-id>
      </navigation-case>
      <navigation-case>
         <from-outcome>manageDeletedItems</from-outcome>
         <to-view-id>/jsp/trashcan/trash-list.jsp</to-view-id>
      </navigation-case>
      <navigation-case>
         <from-outcome>editLOMInline</from-outcome>
         <to-view-id>/jsp/sloop/dialog/edit-lom-inline.xhtml</to-view-id>
      </navigation-case>
   </navigation-rule>