You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2013/09/12 04:31:51 UTC

[jira] [Commented] (MYFACES-3740) ResourceResolver "this" identifier applies for contracts too in JSF 2.2

    [ https://issues.apache.org/jira/browse/MYFACES-3740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13765104#comment-13765104 ] 

Leonardo Uribe commented on MYFACES-3740:
-----------------------------------------

I have attached a patch that resolves "this" from any template, but after doing some tests, it seems the reference implementation does not have anything in this part. The reason is simple: most of resources are loaded using h:outputScript or h:outputStylesheet or h:graphicImage, so this feature is mostly used for css files.

In that sense, I think it is better do not apply the previous patch, because it requires some changes over FaceletFactory, but I have found some issues that needs to be fixed to make contracts work as expected, so part of the code in the patch needs to be committed but in a different way.
                
> ResourceResolver "this" identifier applies for contracts too in JSF 2.2
> -----------------------------------------------------------------------
>
>                 Key: MYFACES-3740
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3740
>             Project: MyFaces Core
>          Issue Type: Task
>          Components: JSR-344
>            Reporter: Leonardo Uribe
>         Attachments: resourceELThis-1.patch
>
>
> Doing some reviews in the code, I found these lines in JSF 2.2 section 5.6.2.5 :
> getValue()
> "... If property contains a single colon character ‘:’, treat the content before the ‘:’ as the libraryName and the content after the ‘:’ as the resourceName and pass both to ResourceHandler.createResource(
> resourceName, libraryName). If the value of libraryName is the literal string “this” (without the quotes), discover the library name of the current resource (or the contract name of the current resource, the two
> are mutually exclusive) and replace “this” with that library name (or contract name) before calling
> ResourceHandler.createResource(). In the case of resource library contracts, libraryName will actually be the contract name. If property contains more than one colon character ‘:’, throw a localized
> ELException, including property ..."
> In JSF 2.0, "this" was used when el expression where inside composite components, but in this case "this" refers to the contract itself.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira