<html xmlns:m="http://www.seasar.org/maya" m:extends="/WEB-INF/layout/layout.html">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-31j" />
<title>Add</title>
</head>
<body>
<span m:inject="f:param" m:name="layoutTitle" m:value="Add"/>
<span m:inject="s:insert" m:name="body">
<form id="form1">
<a id="selectPage" m:action="#{addAction.selectPage}"/>
<input id="pageNo" type="hidden" m:value="#{addDto.pageNo}"/>
<span m:rendered="#{addDto.pageNo==1}">
page1 <a m:onclick="pageNo.value=2;return changePage();">page2</a>
<span m:inject="h:messages" m:globalOnly="false" m:showDetail="true"/>
<input type="text" m:value="#{addDto.arg1}"/> +
<input type="text" m:value="#{addDto.arg2}"/> =
<span m:value="#{addDto.result}"/>
<input type="submit" value="calculate" m:action="#{addAction.calculate}"/>
</span>
<span m:rendered="#{addDto.pageNo==2}">
<a m:onclick="pageNo.value=1;return changePage();">page1</a> page2
</span>
<script type="text/javascript">
function changePage(){
        form1.target = "";
        form1.elements["form1:__link_clicked__"].value="form1:selectPage";
        form1.submit();
        return false;
}
</script>
</form>
</span>
</body>
</html>