Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Faceted Project Framework » Triggering validation on LibraryFacetInstallPage
Triggering validation on LibraryFacetInstallPage [message #572784] Tue, 17 August 2010 15:48 Go to next message
Eric Peters is currently offline Eric PetersFriend
Messages: 27
Registered: July 2009
Junior Member
Hi,

In the article http://www.eclipse.org/fproj/articles/libprov/1/index.html there is a description of how to do this (i.e. The next step is to embed the library provider UI into the facet's install and version change action pages. Similarly to the action config classes, the easiest way of doing this is to subclass LibraryFacetInstallPage class. If the action page needs to display other controls besides the library provider UI, the createPageContents and performValidation methods can be overridden.)

I suspect the article actually refers to methods org.eclipse.wst.common.frameworks.internal.datamodel.ui.Data ModelWizardPage.createTopLevelComposite(Composite) & e.g. org.eclipse.wst.common.frameworks.internal.datamodel.ui.Data ModelWizardPage.validatePage(boolean)?

I get a NPE in call to validatePage except when I have actually arrived on my facet install UI page, so please advise how to perform validation on my install UI page before I actually get there so I can disable finish say on first page of new project creation wizard if my facet page has validation errors?

I am using org.eclipse.wst.common.frameworks.internal.datamodel.ui.Data ModelWizardPage.showValidationErrorsOnEnter() which allows for the errors to be shown when I enter the page.
Re: Triggering validation on LibraryFacetInstallPage [message #572817 is a reply to message #572784] Wed, 18 August 2010 21:58 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 961
Registered: July 2009
Senior Member
The article is not in error. The reference to overriding createPageContents and performValidation methods is in the context of subclassing LibraryFacetInstallPage.

It looks like you are trying to use the data model wizard framework to construct your wizard page. Nothing wrong with that. The library provider framework provides API for rendering the library selection panel in any wizard page implementation, but you will then be on the hook for setting up all the wiring. Take a look at implementation of LibraryFacetInstallPage to get an idea of what is necessary to get a custom wizard page to talk to the library selection panel.

For help with data model wizard framework API, you will need to head to the WTP forum.

- Konstantin
Re: Triggering validation on LibraryFacetInstallPage [message #572843 is a reply to message #572817] Fri, 20 August 2010 14:49 Go to previous message
Eric Peters is currently offline Eric PetersFriend
Messages: 27
Registered: July 2009
Junior Member
Thanks a lot for your reply.

I was a bit stumped as to why for JAX-RS facet Finish was not disabled on first page of new web project wizard and also why when adding the facet post project creation there was an error "Further Configuration required" when the JAX-RS user library was already defined. I was able to look at JSF & JPA facets for guidance as they did not have same problem and solution was to override org.eclipse.jface.wizard.IWizardPage.isPageComplete() and fix up the validation in org.eclipse.jst.ws.jaxrs.core.internal.project.facet.JAXRSFa cetInstallDataModelProvider.validate(String).

Thanks again!
Previous Topic:Triggering validation on LibraryFacetInstallPage
Next Topic:Library provider framework- library deprecation
Goto Forum:
  


Current Time: Wed Dec 17 20:03:10 GMT 2014

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

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