incubator-adffaces-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Marinschek (JIRA)" <>
Subject [jira] Commented: (ADFFACES-438) Trinidad components don't use ViewHandler.getResourceUrl - custom ViewHandlers can fail due to this
Date Wed, 04 Apr 2007 18:17:32 GMT


Martin Marinschek commented on ADFFACES-438:

Hi *,

I've looked through the test results - I'll post one of the failures (the one for image, e.g.)

original golden file:


outcome after my potential change:


I conclude from my previous comments that the sources of the golden files are bogus - resource-url
needs to be called before encoded-resource-url is called, so the golden files sources are

two problems remain with my approach:

1) toUri is used all over now, in fact there should be a toResourceUri and a toActionUri cause
these two might be handled differently.

2) the question is if toUri is ever called where a FacesContext is not available - if yes,
my approach would fail.



> Trinidad components don't use ViewHandler.getResourceUrl - custom ViewHandlers can fail
due to this
> ---------------------------------------------------------------------------------------------------
>                 Key: ADFFACES-438
>                 URL:
>             Project: MyFaces ADF-Faces
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 1.0.1-incubating-core-SNAPSHOT
>            Reporter: Martin Marinschek
>         Assigned To: Martin Marinschek
>             Fix For: 1.0.1-incubating-core-SNAPSHOT
> Trinidad's components all call:
> CoreRenderer.toUri()
>  when they encode their resource-urls.
> This method does essentially the same as the JSF-Viewhandler's method getResourceUrl(),
so there is no reason why the core-renderer shouldn't call this method. If the viewHandler's
getResourceUrl() is not called, some other projects fail to work together with Trinidad, an
example for this is Weblets by John Fallows which overwrites the ViewHandler's getResourceUrl()
> Changing toUri() method to:
>   static public String toUri(Object o)
>   {
>     if (o == null)
>       return null;
>     String uri = o.toString();
>     // Treat two slashes as server-relative
>     if (uri.startsWith("//"))
>     {
>         uri = uri.substring(1);
>     }
>     return FacesContext.getCurrentInstance().getApplication().getViewHandler().getResourceURL(
>             FacesContext.getCurrentInstance(),uri);
>   }
> should fix the issue.
> regards,
> Martin

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message