Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 16:53 Go to next message
William is currently offline WilliamFriend
Messages: 23
Registered: July 2009
Junior Member
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 23:52 Go to previous messageGo to next message
Justin Chen is currently offline Justin ChenFriend
Messages: 39
Registered: July 2009
Member
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 19:24 Go to previous messageGo to next message
William is currently offline WilliamFriend
Messages: 23
Registered: July 2009
Junior Member
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 21:34 Go to previous message
Justin Chen is currently offline Justin ChenFriend
Messages: 39
Registered: July 2009
Member
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 23:52 Go to previous message
Justin Chen is currently offline Justin ChenFriend
Messages: 39
Registered: July 2009
Member
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 19:24 Go to previous message
William is currently offline WilliamFriend
Messages: 23
Registered: July 2009
Junior Member
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 21:34 Go to previous message
Justin Chen is currently offline Justin ChenFriend
Messages: 39
Registered: July 2009
Member
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: Fri Mar 29 13:07:46 GMT 2024

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

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

Back to the top