TabSetProxy

Version 10 by Ken Fyten
on Nov 12, 2014 17:15.


compared with
Current by Ken Fyten
on Nov 13, 2014 12:28.


 
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 2.0_
  
 The _ace:tabSetProxy_ component works in conjunction with its associated server side _ace:tabSet_, so that the _ace:tabSet_ need not be inside a form, but can still communicate with the server, when it changes its current tab. The purpose of this is so that _ace:tabPane_ components may have forms within them, and since forms can not be nested, _ace:tabSet_ needed to be freed from the requirement to be inside a form itself. As well, since _ace:tabSet_'s _immediate_ and _cancelOnInvalid_ properties control the interaction of the changing of current tab selection, with the validation of input components in the submitted form, _ace:tabSetProxy_ is the means for specifying which form, anywhere on the page, should host the submission of the tab change. So, when the current tab changes, it is the form that the _ace:tabSetProxy_ is in, which is submitted.
  
 {tip}See the ICEfaces Showcase [Live Demo|http://icefaces-showcase.icesoft.org/showcase.jsf?grp=aceMenu&exp=tabProxy] of this component, complete with source code.{tip}
  
  
 h2. Getting Started
  
 To use the _ace:tabSetProxy_ component, first the ACE Components tag-lib name-space has to be added in your page.
 {panel}
 {code:xml|borderStyle=dashed}<html ... xmlns:ace="http://www.icefaces.org/icefaces/components">
 {code}
 {panel}Now you ready to use _ace:tabSetProxy_ component, here is the basic example:
 {panel}
 {code:xml|borderStyle=dashed}<h:form>
  <ace:tabSetProxy for=":myTabSet" />
 </h:form>
  
 <ace:tabSet clientSide="false" id="myTabSet">
  <ace:tabPane label="Tab One">
  <h:outputText value="Contents of tab one"/> <br/>
  </ace:tabPane>
  <ace:tabPane label="Tab Two">
  <h:outputText value="Contents of tab one" />
  </ace:tabPane>
 </ace:tabSet>
  
 {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/tabSetProxy.html].{tip}
  
 {*}for* specifies how to find the _ace:tabSet_ that this _ace:tabSetProxy_ is associated with. There is a misconception that _for_ takes an _id_ or a _clientId_, but in reality _for_ is a search path to another component, that can either be relative from the current component, or absolute, which is really relative from the UIViewRoot. To specify an absolute search path, prepend it with a colon.
  
 Note that search strings are similar to _clientId{_}s, in that they are a concatenation of the _id{_}s of NamingContainers and then the desired component, all delimited with colons. They are inherently designed to search downwards/inwards from the nearest parent/ancestor NamingContainer, and don't handle searching upwards/outwards, like a ../.. file path would.
  
 h2. Using tabSetProxy with ace:ajax
  
 The ace:tabSetProxy component can be used in conjunction with the ace:ajax component, with certain limitations.
  
 The ace:ajax component must be specified on the ace:tabSet component, and not on the ace:tabSetProxy component.
  
 {code:xml|borderStyle=dashed}
 <ace:tabSet clientSide="false" id="myTabSet">
  <ace:tabPane label="Tab One">
  <h:outputText value="Contents of tab one"/> <br/>
  </ace:tabPane>
  <ace:tabPane label="Tab Two">
  <h:outputText value="Contents of tab one" />
  </ace:tabPane>
  
  <ace:ajax execute="@this" render="@all"/>
  
 </ace:tabSet>
  
 <h:form>
  <ace:tabSetProxy for=":myTabSet" />
 </h:form>
 {code}
  
 In addition, if the ace:tabSet itself is not inside a form and instead ace:tabSetProxy is being used, it is *not* valid to:
 * Specify an ace:ajax with "execute='@form'" in the tabSet.
 * Specify the tabSetProxy's form ID in its execute attribute.
  
 h2. Known Issues
  
  
 h2. Additional Resources
  

© Copyright 2021 ICEsoft Technologies Canada Corp.