>From: "Ryan Wynn" <[EMAIL PROTECTED]>
>
>
> Gary, that looks really interesting I'll give it a try. I think it's
> just a different way off looking at the same thing. I'm not too
> concerned with the actual extension. It's more the indirection.
>
> I was try to shorten
>
>
>viewId = org/blue/page1.html
>
><component jsfid="org/blue/page1.html" extends="basePage">
> <symbols>
> <set name="@templatePackage" value="org/blue/usecases/templates"/>
> <set name="@page" value="home.chtm" />
> </symbols>
> </component>
>
>to
>
>viewId = classpath*:org/blue/usecases/templates/home.chtm
>
>so that I can bypass indirection like
>
><navigation-rule>
>
> <from-view-id>classpath*:org/blue/usecases/templates/home.chtm</from-view-id>
> <navigation-case>
> <from-action>#{bean.changeColor}</from-action>
> <from-outcome>green</from-outcome>
> <to-view-id>classpath*:org/green/usecases/templates/home.chtm
> </to-view-id>
> </navigation-case>
></navigation-rule>
>
> Such that the clayJsfid of the root clay component would be
> interpreted as classpath*:org/blue/usecases/templates/home.chtm or
> classpath*:org/green/usecases/templates/home.chtm
Ah, I see. The URL would look something like
http://localhost:8080/myapp/classpath*:/org/apache/shale/error.html
That's a funky URL but it seems to be valid. I gave this a test and you are
only one character from making this work.
The view id always starts with a "/". The logic looks for the "classpath*:" at
the start of the resource.
If it starts with "classpath*:", the class loader is used rather than the
servlet context to load the resource.
java.lang.NullPointerException: Component not found
"/classpath*:/org/apache/shale/error.html".
The ClayViewHandler might be able to strip off the character to support
something like this but we might find other issue
with the navigation.
The from-view-id would expect the "/" character.
<from-view-id>/classpath*:org/blue/usecases/templates/home.html</from-view-id>
Gary
Gary