ICEfaces
  1. ICEfaces
  2. ICE-7600

The "raw" CSS resource URLs can't be resolved when running in portlets

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.RC1
    • Fix Version/s: 3.0.RC2, 3.0
    • Component/s: Sample Apps
    • Labels:
      None
    • Environment:
      ICEfaces 3 ACE Showcase Portlets
    • Affects:
      Sample App./Tutorial

      Description

      Portlets rely on different URL semantics than normal web applications. The way we handle this in our theme.css file is to use the 'resource' expression language tactic. Since CSS files are processed for EL, you can specify resources in a way that makes them work whether they are installed as a plain application or a portlet (as the PortletFaces Bridge now gets to help construct the appropriate URL for the portlet container). So in the theme.css files we see URLs that are constructed as follows:

       url("#{resource['icefaces.ace:themes/rime/images/ui-bg_inset-hard_100_eeeeee_1x100.png']}"

      The CSS files that we include with the showcase example use "raw" URLs. For example, in showcase_styles.css we have:

      .ice-checkboxbutton .ui-state-active {
          background: url("/resources/css/images/success24.png") no-repeat;
          border: 1px;
          border-style: solid;
      }

      Unfortunately, if the resource location is not done correctly, it won't work properly in both environments. It would be better to adjust them as follow:

      .ice-checkboxbutton .ui-state-active {
          background: url("#{resource['css/images/success24.png']}") no-repeat;
          border: 1px;
          border-style: solid;
      }

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26990 Tue Dec 20 16:10:54 MST 2011 ken.fyten ICE-7600 - Fixed resource URLs for images to use JSF2 #{resource.. syntax.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/css/override_styles.css
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/css/showcase_styles.css
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/css/demo_template.css
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26991 Tue Dec 20 16:11:47 MST 2011 ken.fyten ICE-7600 - Fixed resource URLs for images to use JSF2 #{resource.. syntax.
        Files Changed
        Commit graph MODIFY /icefaces3/tags/icefaces-3.0.0.RC2/icefaces/samples/showcase/showcase/src/main/webapp/resources/css/demo_template.css
        Commit graph MODIFY /icefaces3/tags/icefaces-3.0.0.RC2/icefaces/samples/showcase/showcase/src/main/webapp/resources/css/showcase_styles.css
        Commit graph MODIFY /icefaces3/tags/icefaces-3.0.0.RC2/icefaces/samples/showcase/showcase/src/main/webapp/resources/css/override_styles.css
        Deryk Sinotte created issue -
        Hide
        Deryk Sinotte added a comment -

        Assigning to Ken for prioritization and delegation.

        Show
        Deryk Sinotte added a comment - Assigning to Ken for prioritization and delegation.
        Deryk Sinotte made changes -
        Field Original Value New Value
        Salesforce Case []
        Fix Version/s 3.0 [ 10241 ]
        Affects [Sample App./Tutorial]
        Assignee Ken Fyten [ ken.fyten ]
        Ken Fyten made changes -
        Assignee Ken Fyten [ ken.fyten ] Evgheni Sadovoi [ evgheni.sadovoi ]
        Hide
        Ken Fyten added a comment -

        Fixed CSS files have been committed.

        Show
        Ken Fyten added a comment - Fixed CSS files have been committed.
        Ken Fyten made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 3.0.RC2 [ 10313 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: