Hi Ed,
Am 13.11.2012 um 03:45 schrieb Edward Burns <edward.burns_at_oracle.com>:
>>>>>> On Mon, 12 Nov 2012 21:05:23 +0100, Frank Caputo <frank_at_frankcaputo.de> said:
>
> EB> CONDITIONALLY_RESOLVED: How are contracts made available to the
> EB> application.
>
> EB> This is where I bring in the syntax from Manfred I mentioned earlier.
>
> EB> If we have a resource-library-contracts element in the application
> EB> configuration resources, any mappings and contract declarations it has
> EB> are added to the data structure of such things for the application.
>
> [...]
>
> FC> I still think, we don't need a configuration option, because
> FC> possible use cases differ too much.
>
> FC> And as you said before: The JSF spec is already gigantic ;-)
>
> EB>
> EB> CONDITIONALLY_RESOLVED: Add new method on ViewDeclarationLanguage:
> EB>
> EB> public List<String> calculateResourceLibraryContracts(
> EB> FacesContext context, String viewId);
> EB>
> EB> This method takes the argument viewId and uses the data structure to
> EB> find the list of contracts that should be applied.
>
> FC> As stated in another mail: I'd like to have it on ViewHandler
> FC> without the viewId.
>
> FC> You can't obtain the VDL without a viewId. But you might need to be
> FC> able to calculate it without a viewId. MyFaces' ResourceHandlerImpl
> FC> can calculate the locale prefix without a view. So let's use the
> FC> same behavior and put the new method on the ViewHandler.
>
> LU> +1 to use ViewHandler. Even if some VDL does not implement this feature, it
> LU> is clearly a view related concept.
>
> I want to argue for having it in VDL. Let me remind you why we invented
> VDL in the first place: to give a home to concerns related to the View
> Declaration Language, meaning Facelets. The ViewHandler doesn't know
> anything about the internal structure of a view, for example, how to
> take an XML file and create a tree of UIComponent instances from it.
> The VDL impl *does* know about that sort of thing.
I still want to argue for the ViewHandler, because this feature applies to any resources and the ResourceHandler will work independent from the VDL.
Ciao Frank