There isn't any separate wizard to create Portlet facets. They can be
created either using the Dynamic Web Project wizard or using the New
Seam Project wizard.
The problem occurs when creating the Seam Portlet using the New Seam
Project wizard.
Moving SeamProjectCreator().execute() to Install Delegate would also
enable us to contribute some other functionalities to Seam projects.
This could be performed as follows:
- add 'private boolean seamProjectCreatorExecute=false', getter and
setter to SeamCorePlugin
- add the following code to the end of the
SeamFacetAbstractInstallDelegate.execute method:
if (SeamCorePlugin.isSeamProjectCreatorExecute()) {
getSeamProjectCreator(config,project).execute();
}
- add abstract method getSeamProjectCreator(config,project) to
SeamFacetAbstractInstallDelegate and implement it in
SeamFacetInstallDelegate and Seam2FacetInstallDelegate
- change SeamProjectWizard.performFinish() to:
@Override
public boolean performFinish() {
try {
SeamCorePlugin.setSeamProjectCreatorExecute(true);
SeamInstallWizardPage page = (SeamInstallWizardPage)
getPage(SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_SEAM_FACET);
page.finishPressed();
return super.performFinish();
} finally {
SeamCorePlugin.setSeamProjectCreatorExecute(false);
}
}
Snjeza
Alexey Kazakov wrote:
Hi,
you can just add something like new SeamProjectCreator().execute() in
your wizard as well as we do in SeamProjectWizard.performFinish().
Or, which is better, add some factory to create new
SeamProjectCreator() for particular IDataModel.
So the code could looks like:
performFinish() {
...
SeamProjectCreatorFactory().getInstance().getProjectCreator(dataModel).execute();
...
}
I'm not sure we should move EAR project creating to Seam facet install
deligate again.
Snjezana Peco wrote:
> Hi,
>
> I need to add richfaces libraries to some projects within this wizard.
> When choosing an EAR project, it is necessary to do the following:
>
> - change richfaces-impl.jar and richfaces-ui.jar in WAR project
> - change richfaces-api.jar in EAR project
>
> This has to be done in the (Post) Install Delegate action. However,
> the EAR project can't be changed because it is created after
> executing all web facet actions (in the wizard's performFinish method).
>
> I propose to create ear/ejb/test projects
> (SeamProjectCreator.execute) in the Install Delegate action within
> the Seam facet. Calling SeamProjectCreator.execute could depend on a
> varijable.
>
> Snjeza
>