public Result execute(UIExecutionContext context) throws Exception
{
String beanName = named.getValue();
String beanPackage = targetPackage.getValue();
DirectoryResource targetDir = targetLocation.getValue();
UIContext uiContext = context.getUIContext();
Project project = getSelectedProject(uiContext);
JavaResource javaResource;
if (project == null)
{
javaResource = facesOperations.newBackingBean(targetDir, beanName, beanPackage);
}
else
{
javaResource = facesOperations.newBackingBean(project, beanName, beanPackage);
}
uiContext.setSelection(javaResource);
return Results.success("Backing bean " + javaResource + " created");
}