Skip to main content



      Home
Home » Eclipse Projects » JavaServer Faces » get list of added JSF component libraries
get list of added JSF component libraries [message #473455] Thu, 21 September 2006 12:53 Go to next message
Eclipse UserFriend
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 #473459 is a reply to message #473455] Thu, 21 September 2006 19:52 Go to previous messageGo to next message
Eclipse UserFriend
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 #473461 is a reply to message #473459] Fri, 22 September 2006 15:24 Go to previous messageGo to next message
Eclipse UserFriend
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 #473462 is a reply to message #473461] Fri, 22 September 2006 17:34 Go to previous message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:get list of added JSF component libraries
Next Topic:Visual Pafe Designer features document posted on the wiki..
Goto Forum:
  


Current Time: Wed Jul 23 18:17:42 EDT 2025

Powered by FUDForum. Page generated in 0.04187 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top