Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 2.1-Beta2
-
Component/s: Documentation
-
Labels:None
-
Environment:ICEfaces 3 MyFaces 2 Liferay
-
Affects:Documentation (User Guide, Ref. Guide, etc.), Compatibility/Configuration
Description
Creating this case as a separate issue based on work done in ICE-7191.
This is not strictly a portlet issue but it currently only manifests there due to the lengthy nature of Liferay URLS. The problem is seen when running the ACE Showcase Portlets example on Liferay using MyFaces - the problem doesn't manifest with Mojarra. The various 'resource' EL expressions that we use in our themes.css file all look something like this:
url("#{resource['icefaces.ace:themes/sam/images/ui-default.png']}")
However, after being processed and sent to the client, they arriving somewhat garbled. Here are a few examples of what the resource URLs get turned into when they arrive at the client - note that the they are incomplete in various spots:
url("est/acefile?_fileEntry_WAR_showcaseportlet_ln=icefaces.ace&_fileEntry_WAR_showcaseportlet_javax.faces.resource=themes%2Fsam%2Fimages%2Fui-bg_flat_75_ffffff_40x100.png&p_p_col_count=1&p_p_col_id=column-1&p_p_id=fileEntry_WAR_showcaseportlet&p_p_lifecycle=2")
url("lhost:8080/web/guest/acefile?_fileEntry_WAR_showcaseportlet_ln=icefaces.ace&_fileEntry_WAR_showcaseportlet_javax.faces.resource=themes%2Fsam%2Fimages%2Fui-default.png&p_p_col_count=1&p_p_col_id=column-1&p_p_id=fileEntry_WAR_showcaseportlet&p_p_lifecycle=2")
url("localhost:8080/web/guest/acefile?_fileEntry_WAR_showcaseportlet_ln=icefaces.ace&_fileEntry_WAR_showcaseportlet_javax.faces.resource=themes%2Fsam%2Fimages%2Fsprite.png&p_p_col_count=1&p_p_col_id=column-1&p_p_id=fileEntry_WAR_showcaseportlet&p_p_lifecycle=2")
url("b/guest/acefile?_fileEntry_WAR_showcaseportlet_ln=icefaces.ace&_fileEntry_WAR_showcaseportlet_javax.faces.resource=themes%2Fsam%2Fimages%2Fui-icons_222222_256x240.png&p_p_col_count=1&p_p_col_id=column-1&p_p_id=fileEntry_WAR_showcaseportlet&p_p_lifecycle=2")
Running the ACE Showcase with MyFaces in a non-portlet environment shows the URLs properly resolved:
url("/my/javax.faces.resource/themes/sam/images/ui-bg_flat_75_ffffff_40x100.png.jsf?ln=icefaces.ace")
url("/my/javax.faces.resource/themes/sam/images/ui-default.png.jsf?ln=icefaces.ace")
url("/my/javax.faces.resource/themes/sam/images/sprite.png.jsf?ln=icefaces.ace")
This is not strictly a portlet issue but it currently only manifests there due to the lengthy nature of Liferay URLS. The problem is seen when running the ACE Showcase Portlets example on Liferay using MyFaces - the problem doesn't manifest with Mojarra. The various 'resource' EL expressions that we use in our themes.css file all look something like this:
url("#{resource['icefaces.ace:themes/sam/images/ui-default.png']}")
However, after being processed and sent to the client, they arriving somewhat garbled. Here are a few examples of what the resource URLs get turned into when they arrive at the client - note that the they are incomplete in various spots:
url("est/acefile?_fileEntry_WAR_showcaseportlet_ln=icefaces.ace&_fileEntry_WAR_showcaseportlet_javax.faces.resource=themes%2Fsam%2Fimages%2Fui-bg_flat_75_ffffff_40x100.png&p_p_col_count=1&p_p_col_id=column-1&p_p_id=fileEntry_WAR_showcaseportlet&p_p_lifecycle=2")
url("lhost:8080/web/guest/acefile?_fileEntry_WAR_showcaseportlet_ln=icefaces.ace&_fileEntry_WAR_showcaseportlet_javax.faces.resource=themes%2Fsam%2Fimages%2Fui-default.png&p_p_col_count=1&p_p_col_id=column-1&p_p_id=fileEntry_WAR_showcaseportlet&p_p_lifecycle=2")
url("localhost:8080/web/guest/acefile?_fileEntry_WAR_showcaseportlet_ln=icefaces.ace&_fileEntry_WAR_showcaseportlet_javax.faces.resource=themes%2Fsam%2Fimages%2Fsprite.png&p_p_col_count=1&p_p_col_id=column-1&p_p_id=fileEntry_WAR_showcaseportlet&p_p_lifecycle=2")
url("b/guest/acefile?_fileEntry_WAR_showcaseportlet_ln=icefaces.ace&_fileEntry_WAR_showcaseportlet_javax.faces.resource=themes%2Fsam%2Fimages%2Fui-icons_222222_256x240.png&p_p_col_count=1&p_p_col_id=column-1&p_p_id=fileEntry_WAR_showcaseportlet&p_p_lifecycle=2")
Running the ACE Showcase with MyFaces in a non-portlet environment shows the URLs properly resolved:
url("/my/javax.faces.resource/themes/sam/images/ui-bg_flat_75_ffffff_40x100.png.jsf?ln=icefaces.ace")
url("/my/javax.faces.resource/themes/sam/images/ui-default.png.jsf?ln=icefaces.ace")
url("/my/javax.faces.resource/themes/sam/images/sprite.png.jsf?ln=icefaces.ace")
Issue Links
- blocks
-
ICE-7191 Develop portlet version of latest ACE showcase application
- Closed
Activity
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #26658 | Wed Nov 30 16:04:43 MST 2011 | deryk.sinotte | |
Files Changed | ||||
DEL
/icefaces3/trunk/icefaces/lib/myfaces/myfaces-impl-2.1.3.jar
ADD /icefaces3/trunk/icefaces/lib/myfaces/myfaces-api-2.1.3-ice-7518.jar ADD /icefaces3/trunk/icefaces/lib/myfaces/myfaces-impl-2.1.3-ice-7518.jar DEL /icefaces3/trunk/icefaces/lib/myfaces/myfaces-api-2.1.3.jar |
Deryk Sinotte
created issue -
Deryk Sinotte
made changes -
Deryk Sinotte
made changes -
Assignee | Deryk Sinotte [ deryk.sinotte ] |
Deryk Sinotte
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Affects | [Documentation (User Guide, Ref. Guide, etc.), Compatibility/Configuration] | |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Fix Version/s | 3.0 [ 10241 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
Turns out that the issue is related to long URLs that are generated by Liferay and how they are processed by MyFaces in ResourceImpl. There is a special private class in there that's used for processing EL in CSS files:
private class ValueExpressionFilterInputStream extends InputStream
{
private PushbackInputStream delegate;
public ValueExpressionFilterInputStream(InputStream in)
{ super(); delegate = new PushbackInputStream(in,255); }...
With Liferay, the resulting URLs can actually be longer than 255 characters, causing the PushbackInputStream to behave oddly and provide mangled resource URLs. I'm logging an issue with MyFaces.
For the upcoming RC1 release, we'll ship our own modified versions of the MyFaces .jars with a the buffer size increased to handle longer URLs.