Information Technology Reference
In-Depth Information
Creating a perspective
Creating a perspective is done exactly as explained before. In our case, we create a per-
spective to include only our message list screen. Here's the code found in our Mes-
sageListPerspective class:
@ApplicationScoped
@WorkbenchPerspective(
identifier = "uberFireDemo.MessageListPerspective",
isDefault = false)
public class MessageListPerspective {
@Perspective
public PerspectiveDefinition getPerspective() {
final PerspectiveDefinition p =
new
PerspectiveDefinitionImpl(PanelType.ROOT_LIST);
p.setTransient(true);
p.setName("My Customized panel of Messages");
p.getRoot().addPart(new PartDefinitionImpl(
new DefaultPlaceRequest(
"uberFireDemo.MessageListScreen")));
return p;
}
}
As you can see, all we do is create a method annotated with @Perspective to return a
PerspectiveDefinition instance that will have our message list screen in it, and we
mark it to not be the default perspective.
Search WWH ::




Custom Search