ArticlesTutorialsInterview Questions & AnswersCertificationsFree Books & Sample ChaptersTechnical Discussions  Your Account | Advertise with us | Feedback |
Few pages of this site are under construction and we are constantly trying to improve it. If you have any suggestions or ideas about how to improve the site, please Let us know.
Tomahawk DataList

 t:commandSortHeader Tomahawk Tag Home t:dataScroller 

<t:dataList>


Contents

  1. Introduction
  2. Tag Attributes
  3. Example

Introduction

The t:dataList tag is similar to the dataTable tag, but renders its data as an HTML list element. The layout attribute defines how each item is rendered. Legal values are: simple, unorderedList, and orderedList.



Tag Attributes


AttributeDescription   Type    
binding The value-binding expression linking this component tag to a backing bean property.String
dir The dir attribute is a standard HTML attribute that overrides the default text directionality for this component. The values accepted for this component are "LTR" (left-to-right) and "RTL" (right-to-left). String
disabled HTML: When true, this element cannot receive focus.String
enabledOnUserRole If user is in given role, this component will be rendered normally. If not, no hyperlink is rendered but all nested tags (=body) are rendered.String
first The first attribute defines the starting index of the collection associated with this data tag. The default value is 0.String
forceId A boolean value;If true, this component will force the use of the specified id when rendering.String
forceIdIndex The forceIdIndex attribute effects the component ID name when this component is rendered at runtime. It expects a boolean value that, when true, causes the component to display an index number in its ID value if the component is in a list. It has a default value of true. String
id The unique identifier value for this component. The value must be unique within the closest naming container (e.g.,h:form or f:subview).This value must be a static value.String
itemStyleClass The itemStyleClass attribute sets the CSS style class to the items within the data list.String
layout simple|unorderedList|orderedList : simple (the items are rendered normally), unorderedList (the list is rendered as an HTML unordered list), and orderedList (the list is rendered as an HTML ordered list). The default value is simple.String
onblur, onchange,etc., DHTML EventsString
relThe rel attribute identifies the relationship from the current document to the anchor specified by this hyperlink. The value of this attribute is a space-separated list of link types.String
renderedA boolean value that indicates whether this component should be rendered.Default value: true.String
rowCountVarThe rowCountVar attribute specifies a request attribute name for the variable storing the row count value.String
rowIndexVarThe rowIndexVar attribute specifies a request attribute name for the variable storing the row index value.String
rowsThe rows attribute sets the number of rows to display, starting from the row identified by the "first" attribute. If the value of the rows attribute is set to zero, all available rows in the underlying data model will be displayed.String
styleThe style attribute sets the CSS style definition to be applied to this component when it is rendered.String
styleClassThe styleClass attribute sets the CSS class to apply to this component when it is rendered.String
titleAn advisory title for this element. Often used by the user agent as a tooltip.String
valueThe value attribute sets the current value for this component.String
var(required)The var attribute sets the name of a request-scope attribute exposing the data for each iteration over the rows in the underlying data model for this table.String
visibleOnUserRoleIf user is in given role, this component will be rendered normally. If not, nothing is rendered and the body of this tag will be skipped. String


Example



 As an example suppose we need to have list of cars information to some of the entities in our application.


<t:dataList id="datalist" style="myStyle"
  var="test"
  value="#{testService.cars}"
  rowCountVar="rowCount"
  rowIndexVar="rowIndex"
  layout="simple"> 					
</t:dataList>

 When layout is simple,the list of cars displayed as follows:

Audi,BMW,Cadillac,Chevrolet,Chrysler,Dodge,Ford,GMC,Honda,Hummer,Hyundai




<t:dataList id="datalist" style="myStyle"
  var="test"
  value="#{testService.cars}"
  rowCountVar="rowCount"
  rowIndexVar="rowIndex"
  layout="unorderedList"> 					
</t:dataList>

 When layout is unorderedList,the list of cars displayed as follows:

  • Audi
  • BMW
  • Cadillac
  • Chevrolet
  • Chrysler
  • Dodge
  • Ford
  • GMC
  • Honda
  • Hummer
  • Hyundai


<t:dataList id="datalist" style="myStyle"
  var="test"
  value="#{testService.cars}"
  rowCountVar="rowCount"
  rowIndexVar="rowIndex"
  layout="orderedList"> 					
</t:dataList>

 When layout is orderedList,the list of cars displayed as follows:

  1. Audi
  2. BMW
  3. Cadillac
  4. Chevrolet
  5. Chrysler
  6. Dodge
  7. Ford
  8. GMC
  9. Honda
  10. Hummer
  11. Hyundai


 t:commandSortHeader Tomahawk Tag Home t:dataScroller 
//-->
//-->
Test

  ALSO SEE :

About Us | Our Mission | Terms of use | Author Terms |    Search        | Contact Us | Advertise With Us | Link to Us | Sitemap
Copyright © 2016 developersbook.com. All rights reserved.