com.primix.tapestry.components
Class Conditional
java.lang.Object
|
+--com.primix.tapestry.AbstractComponent
|
+--com.primix.tapestry.components.Conditional
- All Implemented Interfaces:
- IComponent, IRender
- public class Conditional
- extends AbstractComponent
A conditional element on a page. Will render its wrapped elements
zero or one times.
Property |
Type |
Read / Write |
Required |
Default |
Description |
condition |
boolean |
R |
no |
false |
The condition to be met. If this value is true, then the wrapped elements
will be rendered.
The determination of true vs. false is made by the method
IBinding.getBoolean() . |
invert |
boolean |
R |
no |
false |
If true, then the condition is inverted. This is useful for simulating
an else clause. |
Informal parameters are not allowed.
- Version:
- $Id: Conditional.java,v 1.7 2001/05/02 14:15:15 hship Exp $
- Author:
- Howard Ship
Methods inherited from class com.primix.tapestry.AbstractComponent |
addAsset, addComponent, addWrapped, cleanupAfterRender, cleanupComponent, finishLoad, finishLoad, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, generateAttributes, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getChangeObserver, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getListeners, getPage, getSpecification, prepareForRender, renderWrapped, reset, setBinding, setContainer, setId, setPage, setSpecification, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Conditional
public Conditional()
getConditionBinding
public IBinding getConditionBinding()
getInvertBinding
public IBinding getInvertBinding()
render
public void render(IResponseWriter writer,
IRequestCycle cycle)
throws RequestCycleException
- Render's its wrapped components only if the condition is true (technically,
if condition matches invert).
setConditionBinding
public void setConditionBinding(IBinding value)
setInvertBinding
public void setInvertBinding(IBinding value)