Else

Conditionally emulates an element and its attributes and/or includes a block of content if the condition of the previous If component evaluates to false.

See also: org.apache.tapestry.components.ElseBean , If

Parameters

Name Type Required Default Description
renderTag boolean no true Specifies whether or not to render the html tag name used to reference this component. This logic also deprecates the element parameter in that tag names are already captured from the html temlpate read in, so you only need to tell the component to render or not render whatever tag you used.
element String no The element to emulate. If specified, then the component acts like an Any , emitting an open and close tag. Informal parameters are applied to the tag.

This parameter is now deprecated in favor of the new renderTag parameter, the element tag to render is implied by the html used to reference the component now.

Body: allowed

Informal parameters: allowed

Reserved parameters: none

Examples

In the example, we say hello to our user if he/she has login, or we ask him/her login. (Just the same example for If component.)

Home.html

...
<p>
Hello, <span jwcid="@If" condition="ognl:user.login"><span jwcid="@Insert" value="ognl:user.name"/></span>
<span jwcid="@Else"> please <span jwcid="@PageLink" page="Login">login</span></span>	
</p>
...