dWebSpec Dictionary
CONTEXT: descriptors->behavior-repeat




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

Results for:

 behavior-repeat 
Prev  Topic  Next

Much of what is discussed in this section are repetition of the discussion in the behavior-define and behavior logic descriptors.

Just like the logic behavior could use to determine visibility of segments, the repeat behavior could be used to determine the rendering of a segment zero, once or many times.

The repeat behavior, just like the behavior-define, could expose objects to the elements within the segments that it encloses.

 Struts 1.x  

The repeat define loop that controls the rendering of a repeat region. A collection is also defined, a member object of which is presented in every iteration of the loop.

Example definition is shown below.

BEHAVIOR DESCRIPTORS

id

type

data-source

value

define-id

define-class

define-scope

details

bookList repeat {bookForm.list} 10,0,1 book      

The class definition is deduced automatically through java inspections, as such the entry for define-class is not necessary, as far asimplementation is concerned.The scope is limited to the body of the repat tag; scope specification would be meaningless.

The implementation of this specification is as follows.

<logic:iterate name="bookForm" property="#{list}"
			id="book" offset="0" length="10" <
		
</logic:iterate>

The implementation using JSTL tag is illustrated below.

<c:forEach items=="#{bookForm.list}"
	var="book" begin="0" end="10" step="1"<
		
</c:forEach>

The transformation of the specification to Struts and JSTL tags is shown below.

Descriptor AttributeStruts-logic:iterateJSTL-c:forEach
data-sourcename/propertyitems
define-ididvar
define-classtype 
value:Ooffsetbegin
value:Nlengthend
value:Step step

More details are available in the attributes descriptions

type id data-source value define-id define-class define-scope
Prev Next