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 12:53 Go to next message
William is currently offline William
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 19:52 Go to previous messageGo to next message
Justin Chen is currently offline Justin Chen
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 15:24 Go to previous messageGo to next message
William is currently offline William
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 17:34 Go to previous message
Justin Chen is currently offline Justin Chen
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 19:52 Go to previous message
Justin Chen is currently offline Justin Chen
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 15:24 Go to previous message
William is currently offline William
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 17:34 Go to previous message
Justin Chen is currently offline Justin Chen
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 Apr 25 02:54:33 EDT 2014

Powered by FUDForum. Page generated in 0.01992 seconds