dWebSpec Dictionary
CONTEXT: descriptors->navigation-path




All Details Standard Only Platform Only
Structured Web info and helpTechnologies
 Home Page
 Product Page
 Download Page
 Feedback
Javascript Tree Menu

Results for:

 navigation-path 
Prev  Topic  Next

The navigation results could be considered a repository of navigational links used on a page, or accross a project, allowing the assignment of symbolic names to such links. For this the two important attributes are the id and path. The id would be unique globally, and could be used to refer to the URL destinations.

Some frameworks include navigational rules configurations, which could be used to determine destination paths based on page of origin (from page), the preceding action or its result.

This could also be used document page flow.

dWebSpec navigation-path descriptor is designed to capture all these possibilities as well as access security roles and ?request options.

 Seam  

Basic JSF Features 

SEAM Enhancements

The primary addition provided by Seam for navigation-path implementation, is the alternate and more robust means of capturing the navigational rules.

A sample specification is shown below.

NAVIGATION-PATH DESCRIPTORS

id

handler

result

from-page-id

path

security

options

description

1 {category.save} success ! pages/confirm.xhtml admin redirect  

Using standard JSF configuration the specifications would be accommodated to an extent; areas like security and the use of expression with or in place of string result are not accommodated.

The implementation with Seam would be as shown below.

<page page-id="page.xhtml">
    <navigation from-action="#{categories.save}">
        <rule if-outcome="success" if="#{s:hasRole='admin'}">
            <redirect view-id="pages/confirm.xhtml"
        </rule>
    </navigation>
</page>

The transformation is analyzed below.

Descriptor Attribute
Seams Configuration
from-page-id This is entered into view-id attribute of the page element.
handler The from-action attribute of the navigation element.
result if-outcome attribute of the rule element
security if attribute of the rule element. This attribute would also be used if the result is specified as an expression.
options The only configurable option is redirect. This would imply that the destination view would use a redirect element. In the absence of this option, it is the render element that would be used.
path The view-id attribute of the render or redirect elements.
Parameters (Note: the descriptor does not have place holder for parameters. A navigation-path id could be entered as a parent to a parameters descriptor.) This is only relevant for options redirect.
One or multiple param element nested within the redirect element, would carry the parameters.

Conversation and Navigation

There are options that could be specified for the resulting navigation-path.These are listed in the table below.

call-typeImplementationdescription
conversation:begin<begin-conversation/>Starts a conversation
conversation:beginNested<begin-conversation nest="true"/>Starts a conversation nested in another conversation
conversation:end<end-conversation/>Ends a conversation
conversation:join<begin-conversation join="true"/>Joins an existing converstation

An example specification is shown below.

NAVIGATION-PATH DESCRIPTORS

id

handler

result

from-page-id

path

security

options

description

1 {category.save} success ! pages/confirm.xhtml   conversation:begin,redirect  

For some options, the order of the options matter. For example, the implication could be end before or end after redirect

The implementation would be as shown below.

<page page-id="page.xhtml">
      <navigation from-action="#{categories.save}">
      <rule if-outcome="success">
      	<begin-conversation/>
      	<redirect view-id="pages/confirm.xhtml"

      </rule>
      </navigation>
</page>

Because the Seam conversation mechanism keeps track of associated view-id used, it could provide some navigation consequence. Generally, there are means of controlling the conversation life cycle, these are captured in the event descriptor.

The concern here is the navigational impact. the first issue of note is that some of the entries in the event descriptor, could have navigational impact, without reflecting these in the navigation-path. This is because these navigational rules are deciphered in the controller, and there are nothing to reflect declaratively. Because these paths are derive at runtime, like the last view-id used by the conversation or its parent.

Examples of is shown below.

EVENT DESCRIPTORS

id

event-source

parameters

handler

handler-class

security

call-type

8 forms[category].elements[cancel]   {conversation.endAndRedirect}      

<h:commandButton id="cancel" value="Cancel" action="#{conversation.endAndRedirect}"/>

A full list of these conversation/navigation methods is shown in the list below.

MethodDescription
redirectRedirect to the last known view-id for the conversation
endAndRedirectEnd conversation and then redirect to the last known view-id for the conversation
redirectToParentSwitch to parent converstaion, and redirect to the last known view-id for the parent conversation
redirectToRootSwitch to root converstaion, and redirect to the last known view-id for the root conversation
Prev Next