dWebSpec Dictionary
CONTEXT: descriptors->segment




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

Results for:

 segment 
Prev  Topic  Next

One of the facilities provided by dynamic web platforms is the ability to divide pages into sections or segments. These segments could then be dynamically arranges, selectively shown or hidden, enabled or disabled. There are also the issue of re-use of segment; one copy used in many places. There is also some form of inheritance; adding to a base segment, or enhancements based on runtime parameters.

With AJAX comes the possibility of segments being targets for re-rending, partial refresh, etc.

All these activities are captured by the segment descriptor.

Page Segmentation

Segments could be of two flavors. 1) Component based: on some platforms all elements are part of component tree. As such, a segment, which is a component itself, would be a container component. On such platform, a segment could have identity or server side representation.

2) Character stream based: on such platforms, we are simply generating character streams, of HTML or xHTML syntax. For these we could arbitrarily demarcate the page any way desired, as long as the active tags used to render the page remain valid XML. When such demarcations are done, it is possible for the dynamically assembled page to become invalid HTML/xHTML.? For example, with starting <div> tag, and no ending </div> tag. This would be a concern during the demarcation exercise, but there are no restrictions that preclude this. This is less likely for component based architecture, because of the component hierarchy.

Segment Reuse

Apart from the breaking of page into segments, there is another issue of pages that are made up of other pages. This allows the reuse of common fragments by multiple pages. This feature could vary from simple inclusion of segments, to full templates whereby a common theme or page is defined, which part of it could be replace or customized in the composition of pages.

dWebSpec provides the scheme for capturing the reuse of segments as provided in the state of the art frameworks and template utilities. The full implications of this aspect could be realized from the descriptor attributes, also a full discussion on page reuse is provided in the Introduction and Guide.

As an overview, the following facilities are provided for. 1) The include facilities, which allows inclusion of fragments from other pages. 2) The template facilities, that allows the use of a template or master page in composing pages.

 Seam  
This

Basic JSF Features 

SEAM Enhancements

Seam provides 2 additional dynamic component equivalents to standard HTML based segments (div and span).

dWebSpec segment type Seam
<div> inline <s:div>
<span> inline <s:span>
aws - static-include static-include n/a
aws - dynamic-include dynamic-include <ui:include src="included.html" />
aws - insert-include insert-include <ui:insert >
<!--aws:segment visible="false"   <ui:remove>

There is no equivalent to static include; Facelet provides for dynamic include and insert. There is more discussion on this under the subject of segment types.

One last component provided is the <ui:remove>. Whenever some of the mock-up code end up in the implementation page, it is normal to surround the segment involved with the segment annotation with visible attribute equals false, as shown below

  <!-- aws:segment visible="false" -->
	Mock-up text that should not be included
  <!-- /aws:segment -->

There are reasons to explicitly disable such regions. For example, some of the contents could be interpretable as expressions. Facelet has the ui:remove tag that could surround this segment, which ensure that it could not participate in the dynamic assemble of the page.

  <ui:remove>
	Mock-up text that should not be included
  </ui:remove>

Prev Next