Parent Project
Project Documentation

Summary

Tag Name: <tr:page>
Java Class: org.apache.myfaces.trinidad.component.core.nav.CorePage
Component Type: org.apache.myfaces.trinidad.CorePage
Naming Container: Yes. When referring to children of this component ("partialTriggers", findComponent(), etc.), you must prefix the child's ID with this component's ID and a colon (':').
The Page component is similar to the PanelPage component, except that instead of having navigation1, navigation2 and navigation3 facets for adding navigation item information, the user binds a model object and a stamp to render these areas. The model object is of type MenuModel. A commandNavigationItem should be used as the stamp and placed in the "nodeStamp" facet.

Code Example(s)

<tr:page var="foo" value="#{nav.menuModel}">
  <f:facet name="nodeStamp">
    <tr:commandNavigationItem text="#{foo.label}" action="#{foo.action}"/>
  </f:facet>
  <f:facet name="branding">
    <tr:panelGroupLayout layout="horizontal">
      <tr:image source="/components/images/corporateBrand.gif"/>
      <tr:image source="/components/images/applicationBrand.gif"/>
    </tr:panelGroupLayout>
  </f:facet>
  <f:facet name="appCopyright">
    <tr:outputText value="copyright facet"/>
  </f:facet>
  <f:facet name="appPrivacy">
    <tr:commandLink text="privacy facet" action="action.none" />
  </f:facet>
  <f:facet name="appAbout">
    <tr:commandLink text="about facet" action="action.none" />
  </f:facet>
  <tr:outputText value="Content here" />
</tr:page>

Supported Client Events for Client Behaviors

  • click (default)
  • dblclick
  • keydown
  • keypress
  • keyup
  • mousedown
  • mousemove
  • mouseout
  • mouseover
  • mouseup

Events

Type Phases Description
org.apache.myfaces.trinidad.event.RowDisclosureEvent Apply Request Values,
Invoke Application
The expansion event is generated for a table when the detail facet of a row is expanded or collapsed. For tree or a treeTable, the expansion event is generated when tree nodes are expanded or collapsed.
org.apache.myfaces.trinidad.event.AttributeChangeEvent Invoke Application,
Apply Request Values
Event delivered to describe an attribute change. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change event might include the width of a column that supported client-side resizing.

Supported Facets

Name Description
actions The page-level actions of the page. If present, this area typically contains either a panelButtonBar containing buttons that operate on the entire page, or a processChoiceBar allowing the user to move to the next or previous step in a process.
appAbout Area to put a commandLink to more information about the application.
appCopyright The copyright region of the page. If present, this area typically contains a outputText with the copyright information.
appPrivacy The privacy region of the page. If present, this area typically contains a commandLink to the privacy policy for the application.
branding The corporate or organization branding region of the page. This section typically contains a medium size image of the logo of the organization owning the page.
brandingApp The application, module, or product branding region of the page. This section typically contains a image of the application logo.
brandingAppContextual The application's contextual branding region of the page. This section typically contains formatted text indicating that ONE context exists between the persistent tabs. The user selects the context from a centralized aggregate home page of multiple contexts, then navigates into a tabbed application pertaining to that specific context.
contextSwitcher The context switcher of a page.
infoFootnote The footnote information region. This region provides a location for page-level information that is ancillary to the user's task.
infoReturn The return information region. Typically this will contain a "return to [X]" link.
infoStatus The status information region. This region provides a location for page-level status that is important to the user's task. It also provides a location for a key notation. A key notation is a legend used to define icons, elements, or terms used within the page content.
infoSupplemental This region provides a location for presenting additional information for the user. It often contains a panelBox.
infoUser The user information region. This region provides a location for presenting user login and connection information.
location The locator region of the page. If present, this section typically contains either a processTrain, indicating the user's location in a multistep process, or navigationPath, containing links that will bring the user back to each of the parent pages of a tree of pages that he has navigated down into.
menuSwitch This location typically contains a menuChoice.
messages The node to display messages. Usually contains a messages component.
nodeStamp the component to use to stamp each element in the menu. A CommandNavigationItem is expected.
search The search region of the page.

Attributes

Name Type Supports EL? Description
attributeChangeListener javax.el.MethodExpression Only EL a method reference to an attribute change listener. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change events might include the width of a column that supported client-side resizing.
binding org.apache.myfaces.trinidad.component.core.nav.CorePage Only EL an EL reference that will store the component instance on a bean. This can be used to give programmatic access to a component from a backing bean, or to move creation of the component to a backing bean.
chromeType String Yes Valid Values: compact, expanded
Default Value: compact

what the chromeType is for the page: compact or expanded. If compact, the productBranding will be shown alongside the corporate branding instead of below the corporate branding.
disclosedRowKeys org.apache.myfaces.trinidad.model.RowKeySet Yes the set of disclosed rows for this component. Each entry in the set is a rowKey.
id String No the identifier for the component. Every component may be named by a component identifier that must conform to the following rules:
  • They must start with a letter (as defined by the Character.isLetter() method) or underscore ( _ ).
  • Subsequent characters must be letters (as defined by the Character.isLetter() method), digits as defined by the Character.isDigit() method, dashes ( - ), or underscores ( _ ). To minimize the size of responses generated by JavaServer Faces, it is recommended that component identifiers be as short as possible. If a component has been given an identifier, it must be unique in the namespace of the closest ancestor to that component that is a NamingContainer (if any).
immediate boolean Yes Default Value: false

whether data validation should be skipped when row disclosure events are generated by this component. When immediate is false (the default), events will be delivered during the Invoke Application phase, which will trigger validation. When set to true, events will be executed during the Apply Request Values phase.
inlineStyle String Yes the CSS styles to use for this component.
onclick String Yes an onclick Javascript handler.
ondblclick String Yes an ondblclick Javascript handler.
onkeydown String Yes an onkeydown Javascript handler.
onkeypress String Yes an onkeypress Javascript handler.
onkeyup String Yes an onkeyup Javascript handler.
onmousedown String Yes an onmousedown Javascript handler.
onmousemove String Yes an onmousemove Javascript handler.
onmouseout String Yes an onmouseout Javascript handler.
onmouseover String Yes an onmouseover Javascript handler.
onmouseup String Yes an onmouseup Javascript handler.
partialTriggers String[] Yes the IDs of the components that should trigger a partial update.

This component will listen on the trigger components. If one of the trigger components receives an event that will cause it to update in some way, this component will request to be updated too.

Separate multiple triggers with a space. e.g., partialTriggers="cmp1 cmp2"

Identifiers must account for NamingContainers. You can use a single colon to start the search from the root, or use multiple colons to move up through the NamingContainer. For example, "::" will pop out of this component's naming container (it pops out of itself if it is a naming container), ":::" will pop out of two naming containers, etc. The search for the partialTrigger begins from there. e.g., partialTriggers=":::commandButton1" the search begins for the component with id = commandButton1 after popping out of two naming containers relative to this component. To go into naming containers, you separate the naming containers with ':', e.g.,partialTriggers= "nc1:nc2:nc3:componentId".

rendered boolean Yes Default Value: true

whether the component is rendered. When set to false, no output will be delivered for this component (the component will not in any way be rendered, and cannot be made visible on the client). If you want to change a component's rendered attribute from false to true using PPR, set the partialTrigger attribute of its parent component so the parent refreshes and in turn will render this component.
rowDisclosureListener javax.el.MethodExpression Only EL a method reference to an ExpansionListener
shortDesc String Yes The short description of the component. This text is commonly used by user agents to display tooltip help text.
styleClass String Yes a CSS style class to use for this component.
value Object Yes the hierarchy of menu data - must be of type org.apache.myfaces.trinidad.model.MenuModel
var String No Name of the EL variable used to reference each element of this collection. Once this component has completed rendering, this variable is removed (or reverted back to its previous value).
varStatus String No Name of the EL variable used to reference the varStatus information. Once this component has completed rendering, this variable is removed (or reverted back to its previous value). The VarStatus provides contextual information about the state of the component to EL expressions. For components that iterate, varStatus also provides loop counter information. Please see the this component's documentation for the specific properties on the varStatus. The common properties on varStatus include:
  • "model" - returns the CollectionModel for this component
  • "index" - returns the zero based row index