You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Jeanne Waldman (JIRA)" <de...@myfaces.apache.org> on 2011/04/08 01:51:05 UTC
[jira] [Created] (TRINIDAD-2085) absolute urls for icon selectors
preprends context-root when it shouldn't
absolute urls for icon selectors preprends context-root when it shouldn't
-------------------------------------------------------------------------
Key: TRINIDAD-2085
URL: https://issues.apache.org/jira/browse/TRINIDAD-2085
Project: MyFaces Trinidad
Issue Type: Bug
Components: Skinning
Reporter: Jeanne Waldman
In the trinidad demo purple.css skin file, type an absolute url like
this one:
.AFErrorIcon:alias { content:
url('http://127.0.0.1:7101/trinidad-demo-context-root/faces/afr/skins/purple/images/info.png');
}
set trinidad-config.xml to use the purple skin
run af:icon demo
Type in 'error' for the type
Use firebug and hover on the Error text. You will see that the url has the
context-root prepended to it, when it shouldn't.
ACTUAL
<img width="16" height="16" border="0" alt="Error" title="Error"
class="AFErrorIconStyle"
src="/trinidad-demo-context-root/http://127.0.0.1:7101/trinidad-demo-context-root/faces/afr/skins/purple/images/info.png">
EXPECTED
<img width="16" height="16" border="0" alt="Error" title="Error"
class="AFErrorIconStyle"
src="http://127.0.0.1:7101/trinidadt-demo-context-root/faces/afr/skins/purple/images/info.png">
absolute urls work fine for background-images that are written to the css
file. This is strictly a Skinning Framework Icon issue. Possibly we are
creating the wrong type of Icon (ContextImageIcon instead of URIIIcon) when
we create Icons in StyleSheetDocument or SkinStyleSheetParserUtils.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TRINIDAD-2085) absolute urls for icon selectors
preprends context-root when it shouldn't
Posted by "Blake Sullivan (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TRINIDAD-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13017241#comment-13017241 ]
Blake Sullivan commented on TRINIDAD-2085:
------------------------------------------
Looks good. Calling URI.isAbsolute() is much better than my idea of checking if the scheme is non-empty
> absolute urls for icon selectors preprends context-root when it shouldn't
> -------------------------------------------------------------------------
>
> Key: TRINIDAD-2085
> URL: https://issues.apache.org/jira/browse/TRINIDAD-2085
> Project: MyFaces Trinidad
> Issue Type: Bug
> Components: Skinning
> Reporter: Jeanne Waldman
> Attachments: isAbsoluteURIPatch.patch
>
>
> In the trinidad demo purple.css skin file, type an absolute url like
> this one:
> .AFErrorIcon:alias { content:
> url('http://127.0.0.1:7101/trinidad-demo-context-root/faces/afr/skins/purple/images/info.png');
> }
> set trinidad-config.xml to use the purple skin
> run af:icon demo
> Type in 'error' for the type
> Use firebug and hover on the Error text. You will see that the url has the
> context-root prepended to it, when it shouldn't.
> ACTUAL
> <img width="16" height="16" border="0" alt="Error" title="Error"
> class="AFErrorIconStyle"
> src="/trinidad-demo-context-root/http://127.0.0.1:7101/trinidad-demo-context-root/faces/afr/skins/purple/images/info.png">
> EXPECTED
> <img width="16" height="16" border="0" alt="Error" title="Error"
> class="AFErrorIconStyle"
> src="http://127.0.0.1:7101/trinidadt-demo-context-root/faces/afr/skins/purple/images/info.png">
> absolute urls work fine for background-images that are written to the css
> file. This is strictly a Skinning Framework Icon issue. Possibly we are
> creating the wrong type of Icon (ContextImageIcon instead of URIIIcon) when
> we create Icons in StyleSheetDocument or SkinStyleSheetParserUtils.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TRINIDAD-2085) absolute urls for icon selectors
preprends context-root when it shouldn't
Posted by "Blake Sullivan (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TRINIDAD-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13017222#comment-13017222 ]
Blake Sullivan commented on TRINIDAD-2085:
------------------------------------------
The fix checked into trunk checks to see whether the URL begins with "http", which covers "http" and "https", however it would be more correct to actually look to see if the protocol part of the URL exists. I think it would be more correct to check the String for a ":" and if it contains one, create a URI from the String and see if the scheme part is non-empty. This would also avoid issues with the protocol being case insensitive, so users are allowed to use "HTTP:" or "Http:"
> absolute urls for icon selectors preprends context-root when it shouldn't
> -------------------------------------------------------------------------
>
> Key: TRINIDAD-2085
> URL: https://issues.apache.org/jira/browse/TRINIDAD-2085
> Project: MyFaces Trinidad
> Issue Type: Bug
> Components: Skinning
> Reporter: Jeanne Waldman
>
> In the trinidad demo purple.css skin file, type an absolute url like
> this one:
> .AFErrorIcon:alias { content:
> url('http://127.0.0.1:7101/trinidad-demo-context-root/faces/afr/skins/purple/images/info.png');
> }
> set trinidad-config.xml to use the purple skin
> run af:icon demo
> Type in 'error' for the type
> Use firebug and hover on the Error text. You will see that the url has the
> context-root prepended to it, when it shouldn't.
> ACTUAL
> <img width="16" height="16" border="0" alt="Error" title="Error"
> class="AFErrorIconStyle"
> src="/trinidad-demo-context-root/http://127.0.0.1:7101/trinidad-demo-context-root/faces/afr/skins/purple/images/info.png">
> EXPECTED
> <img width="16" height="16" border="0" alt="Error" title="Error"
> class="AFErrorIconStyle"
> src="http://127.0.0.1:7101/trinidadt-demo-context-root/faces/afr/skins/purple/images/info.png">
> absolute urls work fine for background-images that are written to the css
> file. This is strictly a Skinning Framework Icon issue. Possibly we are
> creating the wrong type of Icon (ContextImageIcon instead of URIIIcon) when
> we create Icons in StyleSheetDocument or SkinStyleSheetParserUtils.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (TRINIDAD-2085) absolute urls for icon selectors
preprends context-root when it shouldn't
Posted by "Jeanne Waldman (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TRINIDAD-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jeanne Waldman resolved TRINIDAD-2085.
--------------------------------------
Resolution: Fixed
Fix Version/s: 2.0.0-beta-3
Assignee: Jeanne Waldman
> absolute urls for icon selectors preprends context-root when it shouldn't
> -------------------------------------------------------------------------
>
> Key: TRINIDAD-2085
> URL: https://issues.apache.org/jira/browse/TRINIDAD-2085
> Project: MyFaces Trinidad
> Issue Type: Bug
> Components: Skinning
> Reporter: Jeanne Waldman
> Assignee: Jeanne Waldman
> Fix For: 2.0.0-beta-3
>
> Attachments: isAbsoluteURIPatch.patch
>
>
> In the trinidad demo purple.css skin file, type an absolute url like
> this one:
> .AFErrorIcon:alias { content:
> url('http://127.0.0.1:7101/trinidad-demo-context-root/faces/afr/skins/purple/images/info.png');
> }
> set trinidad-config.xml to use the purple skin
> run af:icon demo
> Type in 'error' for the type
> Use firebug and hover on the Error text. You will see that the url has the
> context-root prepended to it, when it shouldn't.
> ACTUAL
> <img width="16" height="16" border="0" alt="Error" title="Error"
> class="AFErrorIconStyle"
> src="/trinidad-demo-context-root/http://127.0.0.1:7101/trinidad-demo-context-root/faces/afr/skins/purple/images/info.png">
> EXPECTED
> <img width="16" height="16" border="0" alt="Error" title="Error"
> class="AFErrorIconStyle"
> src="http://127.0.0.1:7101/trinidadt-demo-context-root/faces/afr/skins/purple/images/info.png">
> absolute urls work fine for background-images that are written to the css
> file. This is strictly a Skinning Framework Icon issue. Possibly we are
> creating the wrong type of Icon (ContextImageIcon instead of URIIIcon) when
> we create Icons in StyleSheetDocument or SkinStyleSheetParserUtils.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira