ICEfaces
  1. ICEfaces
  2. ICE-9264

Adjust portlet sample builds to default to LiferayFaces Bridge

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.3
    • Fix Version/s: EE-3.3.0.GA, 4.0.BETA, 4.0
    • Component/s: Sample Apps
    • Labels:
      None
    • Environment:
      Portlet Portal sample build
    • Assignee Priority:
      P1
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial, Compatibility/Configuration

      Description

      Currently, the portlet sample applications default to using the PortletFaces Bridge. As of this release, we are switching to default to LiferayFaces Bridge. From here on in, the PortletFaces Bridge will be deprecated except for backwards compatibility with existing Liferay 5.2 installations that already use it as well as for WebSphere Portal (where we have it "extended" with our own code).

      The Wiki documentation will also need to be adjusted to reflect this change.

        Activity

        Hide
        Deryk Sinotte added a comment -

        The builds are now adjusted to default to using LiferayFaces Bridge rather than PortletFaces. This includes using the legacy version of the Liferay Bridge for Liferay 5.2.

        Adjusted the Maven builds so that resources that go into the WEB-INF/classes and resources that go into the META-INF are now separated.

        Improved the Ant builds to warn when the LiferayFaces libraries are not available and indicating what to do to fix it.

        The Wiki pages have been updated to reflect these changes as well.

        Show
        Deryk Sinotte added a comment - The builds are now adjusted to default to using LiferayFaces Bridge rather than PortletFaces. This includes using the legacy version of the Liferay Bridge for Liferay 5.2. Adjusted the Maven builds so that resources that go into the WEB-INF/classes and resources that go into the META-INF are now separated. Improved the Ant builds to warn when the LiferayFaces libraries are not available and indicating what to do to fix it. The Wiki pages have been updated to reflect these changes as well.
        Hide
        Ken Fyten added a comment -

        Somehow, the following commit for this JIRA has caused a styling regression with the ACE components.

        Commit:

        svn rvn#34999: ICE-9264: adjust showcase builds (and and mvn) to better support resources going into META-INF directory of the war

        Regression:

        showcase (Firefox20 / Tomcat7):

        All Components with:
        > Required Styling demos not functional, Myfaces and Mojarra JSF

        To reproduce, use showcase->ace:textEntry->Required Styling demo. Note that the custom color style for the required fields are not applied.

        Show
        Ken Fyten added a comment - Somehow, the following commit for this JIRA has caused a styling regression with the ACE components. Commit: svn rvn#34999: ICE-9264 : adjust showcase builds (and and mvn) to better support resources going into META-INF directory of the war Regression: showcase (Firefox20 / Tomcat7): All Components with: > Required Styling demos not functional, Myfaces and Mojarra JSF To reproduce, use showcase->ace:textEntry->Required Styling demo. Note that the custom color style for the required fields are not applied.
        Hide
        Deryk Sinotte added a comment -

        As part of the work to adjust the portlet builds, I tweaked the non-portlet showcase application. Originally, the application was built so that the resource-dependency.xml file for the .war file was located at:

        /WEB-INF/classes/META-INF/resource-dependency.xml

        Seeing the META-INF in there seemed odd. Looking at the documentation and inside our jars (icefaces.jar, icefaces-compat.jar, icefaces-ace.jar), the file is always located in the "correct" location at the top-level of the hierarchy. I adjusted the build so that the location in the .war file aligned with the documentation and the .jar files.

        However, this move caused the file to stop being read and processed correctly. This is all done in our own org.icefaces.impl.event.ResourceOrdering class via this technique:

        Enumeration<URL> urls = this.getClass().getClassLoader().getResources("META-INF/resource-dependency.xml");

        This finds all the resource-dependency.xml files in the .jars and finds the resource-dependency.xml in the .war BUT only if it's on the classpath (which it was when it was in its original location under classes). But after I moved it to the "real" META-INF location, it was no longer on the classpath and was no longer found in the .war file. To find the resource-dependency.xml in the war under the official META-INF directory requires a different call using the ServletContext API:

        FacesContext fc = FacesContext.getCurrentInstance();
        ExternalContext ec = fc.getExternalContext();
        URL warResourceDependencyURL = ec.getResource("/META-INF/resource-dependency.xml");

        So I've tweaked the ResourceOrdering class so that it does both calls and combines them into a single collection of URLs for processing. This allows the file to be located in the actual /META-INF director in the .war file and still be processed.

        Show
        Deryk Sinotte added a comment - As part of the work to adjust the portlet builds, I tweaked the non-portlet showcase application. Originally, the application was built so that the resource-dependency.xml file for the .war file was located at: /WEB-INF/classes/META-INF/resource-dependency.xml Seeing the META-INF in there seemed odd. Looking at the documentation and inside our jars (icefaces.jar, icefaces-compat.jar, icefaces-ace.jar), the file is always located in the "correct" location at the top-level of the hierarchy. I adjusted the build so that the location in the .war file aligned with the documentation and the .jar files. However, this move caused the file to stop being read and processed correctly. This is all done in our own org.icefaces.impl.event.ResourceOrdering class via this technique: Enumeration<URL> urls = this .getClass().getClassLoader().getResources( "META-INF/resource-dependency.xml" ); This finds all the resource-dependency.xml files in the .jars and finds the resource-dependency.xml in the .war BUT only if it's on the classpath (which it was when it was in its original location under classes). But after I moved it to the "real" META-INF location, it was no longer on the classpath and was no longer found in the .war file. To find the resource-dependency.xml in the war under the official META-INF directory requires a different call using the ServletContext API: FacesContext fc = FacesContext.getCurrentInstance(); ExternalContext ec = fc.getExternalContext(); URL warResourceDependencyURL = ec.getResource( "/META-INF/resource-dependency.xml" ); So I've tweaked the ResourceOrdering class so that it does both calls and combines them into a single collection of URLs for processing. This allows the file to be located in the actual /META-INF director in the .war file and still be processed.

          People

          • Assignee:
            Deryk Sinotte
            Reporter:
            Deryk Sinotte
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: