<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- We need a doctype to allow us to use special characters like
We use a "strict" DTD to make IE follow the alignment rules. -->
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_4.xsd">
<body class="container">
<h3>Alerts</h3>
Here we demonstrate Tapestry's Alerts component.<br/>
You can tailor the appearance of the alerts to suit your needs with CSS.<br/>
<div class="eg">
<t:form class="form-horizontal">
<div class="form-group">
<t:label for="duration" class="col-sm-3"/>
<div class="col-sm-6">
<t:RadioGroup t:id="duration" value="duration" validate="required">
<t:Radio t:id="durationS" value="Duration.SINGLE" label="Single"/>
<t:label for="durationS" class="label-radio"/>
<t:Radio t:id="durationT" value="Duration.TRANSIENT" label="Transient (a few seconds)"/>
<t:label for="durationT" class="label-radio"/>
<t:Radio t:id="durationU" value="Duration.UNTIL_DISMISSED" label="Until Dismissed"/>
<t:label for="durationU" class="label-radio"/>
</t:RadioGroup><br/>
</div>
</div>
<div class="form-group">
<t:label for="severity" class="col-sm-3"/>
<div class="col-sm-6">
<t:RadioGroup t:id="severity" validate="required">
<t:Radio t:id="severityI" value="Severity.INFO" label="Info"/>
<t:label for="severityI" class="label-radio"/>
<t:Radio t:id="severityS" value="Severity.SUCCESS" label="Success"/>
<t:label for="severityS" class="label-radio"/>
<t:Radio t:id="severityW" value="Severity.WARN" label="Warn"/>
<t:label for="severityW" class="label-radio"/>
<t:Radio t:id="severityE" value="Severity.ERROR" label="Error"/>
<t:label for="severityE" class="label-radio"/>
</t:RadioGroup><br/>
</div>
</div>
<div class="form-group">
<t:label for="quantity" class="col-sm-3"/>
<div class="col-sm-6">
<t:RadioGroup t:id="quantity" validate="required">
<t:Radio t:id="quantity1" value="literal:1" label="1"/>
<t:label for="quantity1" class="label-radio"/>
<t:Radio t:id="quantity2" value="literal:2" label="2"/>
<t:label for="quantity2" class="label-radio"/>
<t:Radio t:id="quantity3" value="literal:3" label="3"/>
<t:label for="quantity3" class="label-radio"/>
</t:RadioGroup><br/>
</div>
</div>
<div class="form-group">
<t:label for="showDismissAll" class="col-sm-3"/>
<div class="col-sm-6">
<t:RadioGroup t:id="showDismissAll" validate="required">
<t:Radio t:id="showDismissAllN" value="literal:false" label="No"/>
<t:label for="showDismissAllN" class="label-radio"/>
<t:Radio t:id="showDismissAllY" value="literal:true" label="Yes"/>
<t:label for="showDismissAllY" class="label-radio"/>
</t:RadioGroup><br/>
</div>
</div>
<div class="form-group">
<div class="col-sm-6 col-sm-offset-3">
<t:submit/>
</div>
</div>
</t:form>
<t:alerts showDismissAll="prop:showDismissAll"/>
</div>
References:
<a href="http://tapestry.apache.org/5.4/apidocs/org/apache/tapestry5/corelib/components/Alerts.html">Alerts</a>,
<a href="http://tapestry.apache.org/5.4/apidocs/org/apache/tapestry5/alerts/AlertManager.html">AlertManager</a>,
<a href="http://tapestry.apache.org/5.4/apidocs/org/apache/tapestry5/alerts/Duration.html">Duration</a>,
<a href="http://tapestry.apache.org/5.4/apidocs/org/apache/tapestry5/alerts/Severity.html">Severity</a>,
<a href="http://tapestry.apache.org/5.4/apidocs/org/apache/tapestry5/ioc/annotations/Inject.html">@Inject</a>.<br/><br/>
<t:pagelink page="Index">Home</t:pagelink><br/><br/>
<t:tabgroup>
<t:sourcecodetab src="/web/src/main/java/jumpstart/web/pages/examples/component/Alerts.tml"/>
<t:sourcecodetab src="/web/src/main/java/jumpstart/web/pages/examples/component/Alerts.java"/>
<t:sourcecodetab src="/web/src/main/resources/META-INF/assets/css/examples/alerts.css"/>
</t:tabgroup>
</body>
</html>