Delegate

compared with
Current by Arturo Zambrano
on Dec 11, 2014 02:53.


 
Key
These lines were removed. This word was removed.
These lines were added. This word was added.

View page history


There are 1 changes. View first change.

 h2. Overview
 _Since 3.2_
  
 At the moment, the {{ace:delegate}} component only works in conjunction with {{ace:tooltip}} and {{ace:contextMenu}}. It's primary use case is to apply a tooltip or context menu component to an entire table, but placing the tooltip or context menu component itself outside of such table, while still having access to the row data. The showcase demos under ace:tooltip / Delegate and ace:contextMenu / Delegate illustrate these use cases.
  
 {tip}See the ICEfaces Showcase [Live Demo 1|http://icefaces-showcase.icesoft.org/showcase.jsf?grp=aceMenu&exp=delegateTooltipBean] and [Live Demo 2|http://icefaces-showcase.icesoft.org/showcase.jsf?grp=aceMenu&exp=contextMenuDelegate] of this component, complete with source code.{tip}
  
 h2. Getting Started
  
 The {{ace:delegate}} component simply has to surround the table and have an id specified, as in the following example.
  
 {panel}
 {code:xml|borderStyle=dashed}
  <ace:delegate id="tooltipDelegate">
  <ace:dataTable id="carTable" value="#{dataTableSort.carsData}" var="car" paginator="true" rows="15">
  
  <ace:column headerText="ID">
  <h:outputText value="#{car.id}" />
  </ace:column>
  
  <ace:column headerText="Name">
  <h:outputText id="carName" value="#{car.name}" />
  </ace:column>
  </ace:dataTable>
  </ace:delegate>
  
  <ace:tooltip id="tooltip" for="carName" forDelegate="tooltipDelegate" fetch="#{car}" store="#{delegateTooltipBean.data}">
  <h:outputText value="Chassis: #{delegateTooltipBean.data.chassis}"/><br/><br/>
  <h:outputText value="Weight: #{delegateTooltipBean.data.weight}lbs."/><br/><br/>
  <h:outputText value="Accel: #{delegateTooltipBean.data.acceleration}"/><br/><br/>
  <h:outputText value="MPG: #{delegateTooltipBean.data.mpg}"/>
  </ace:tooltip>
 {code}
 {panel}
  
  
 h2. Attributes
  
 {tip:title=TagLib Documentation}This section covers attributes involved in the typical use-cases for this component. For reference, the complete taglib documentation for this component is available [here|http://www.icefaces.org/docs/v4_latest/ace/tld/ace/delegate.html].{tip}
  
 The {{id}} attribute is required so that other components can reference the delegate component by specifying this id.
  
 h2. Client Behavior Events
  
 None.
  
 h2. JavaScript APIs
  
  None.
  Not applicable.
  
 h2. Keyboard and ARIA Support
  
 None.
  
 h2. Known Issues
  
 None.
  
 h2. Other Notes

© Copyright 2018 ICEsoft Technologies Canada Corp.