get list of added JSF component libraries [message #473455] |
Thu, 21 September 2006 12:53  |
Eclipse User |
|
|
|
Dear Helpers,
I am trying to write a plugin for a new project facet which depends on
jsf facet 1.1, I wonder if there is a way to get a list of JSF component
libraries which have been added in jsf project creation wizard from my
new project facet installation delegate?
JSFLibraryRegistry doesn't know anything about a specific library is
selected or not
|
|
|
|
|
Re: get list of added JSF component libraries [message #473462 is a reply to message #473461] |
Fri, 22 September 2006 17:34  |
Eclipse User |
|
|
|
William,
You create a new instance of JSFLibraryConfigModelAdapter from IProject.
You need to update the model with library selections obtained from
JSFFacetInstallDataModelProvider during *facet installation* time.
For example,
JSFLibraryConfigModelAdapter model = new
JSFLibraryConfigModelAdapter(project);
model.updateJSFImplementationLibrary((JSFLibraryDecorator)
implLibs.get(0));
model.updateJSFComponentLibraries(compLibs);
... model.getSavedJSFImplementationLibrary();
... model.getSavedJSFComponentLibraries();
Thanks,
Justin
|
|
|
Re: get list of added JSF component libraries [message #607985 is a reply to message #473455] |
Thu, 21 September 2006 19:52  |
Eclipse User |
|
|
|
During project creation, you can query the wizard page data model for
the following two properties.
For example,
List implLibs =
(List)config.getProperty(IJSFFacetInstallDataModelProperties .IMPLEMENTATION_LIBRARIES);
List compLibs =
(List)config.getProperty(IJSFFacetInstallDataModelProperties .COMPONENT_LIBRARIES);
There is currently no available API for an already JSF faceted web
project. We will be fixing that in 2.0. You may, at your own risk, use
the internal JSFLibraryConfigModelAdapter class. Use
getSavedJSFImplementationLibrary and getSavedJSFComponentLibraries to
access the JSF library references once a project is created.
Thanks,
Justin
|
|
|
Re: get list of added JSF component libraries [message #607992 is a reply to message #473459] |
Fri, 22 September 2006 15:24  |
Eclipse User |
|
|
|
Thanks Justin,
I can get reference of JSFFacetInstallDataModelProvider, but how can i
get reference of JSFLibraryConfigModelAdapter?
William
Justin Chen wrote:
> During project creation, you can query the wizard page data model for
> the following two properties.
> For example,
> List implLibs =
> (List)config.getProperty(IJSFFacetInstallDataModelProperties .IMPLEMENTATION_LIBRARIES);
>
> List compLibs =
> (List)config.getProperty(IJSFFacetInstallDataModelProperties .COMPONENT_LIBRARIES);
>
>
> There is currently no available API for an already JSF faceted web
> project. We will be fixing that in 2.0. You may, at your own risk, use
> the internal JSFLibraryConfigModelAdapter class. Use
> getSavedJSFImplementationLibrary and getSavedJSFComponentLibraries to
> access the JSF library references once a project is created.
>
> Thanks,
> Justin
>
|
|
|
Re: get list of added JSF component libraries [message #607995 is a reply to message #473461] |
Fri, 22 September 2006 17:34  |
Eclipse User |
|
|
|
William,
You create a new instance of JSFLibraryConfigModelAdapter from IProject.
You need to update the model with library selections obtained from
JSFFacetInstallDataModelProvider during *facet installation* time.
For example,
JSFLibraryConfigModelAdapter model = new
JSFLibraryConfigModelAdapter(project);
model.updateJSFImplementationLibrary((JSFLibraryDecorator)
implLibs.get(0));
model.updateJSFComponentLibraries(compLibs);
... model.getSavedJSFImplementationLibrary();
... model.getSavedJSFComponentLibraries();
Thanks,
Justin
|
|
|
Powered by
FUDForum. Page generated in 0.04919 seconds