A theme describe what you show and how you show it in your application. It is a set of pages, sections, cells and fragments. It is possible to show some fragment depending on some condition using perspective. A perspective is an attribute of the fragment element. If there is no perspective attribute, the fragment will be shown in all perspective. In a default nuxeo, there is only one perspective named default.
- First you need to register the perspective with:
a perspective is just a name.
- then you add to your fragment in the theme config a perspective attribute:
- finally, you add to the perspective negociator your own scheme to resolve perspective:
Your class should implement the Scheme interface. The getOutcome method is passed a WebContext or a FacesContext. If you can't decide which perspective it is, return null, the query will be passed to the next negociator.