<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib tagdir="/WEB-INF/tags" prefix="st"%>
<%@taglib uri="/japano" prefix="jpn"%>
<%@taglib uri="/sample" prefix="sample"%>
<st:page title="calc example">
<div class="box">
Number: ${pageContext.session.number}
<p>
<sample:substract value="2" id="minus2"> -2 </sample:substract> | <sample:substract id="minus1"> -1 </sample:substract> | <sample:add id="plus1">+1</sample:add> | <sample:add value="2" id="plus2">+2</sample:add>
</div>
<div class="info">
The above links invocate actions which add and substract a number stored in
<a href="/org/japanosample/SampleSession.java.txt" title="Session source code">the session</a>. The tags used in the jsp document are automatically generated
from the source codes of the actions.
<p>
<b>Note:</b> There is a subtle difference between the two actions. If the add
action is executed, a reload of the resulting document will increment the value again.
The substract action is executed only at the first click.
This is automatically achieved by attributing the add action as "repeatable".
<ul>
<li><a href="org/japanosample/action/Add.java.html">Source code of the add action</a></li>
<li><a href="org/japanosample/action/Substract.java.html">Source code of the substract action</a></li>
<li><a href="calc.jsp.html">Source code of the JSP view</a></li>
<li><a href="org/japanosample/SampleSession.java.html">Source code of the sample session</a></li>
</ul>
</div>
</st:page>