src.txt 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /* ====================================================================
  2. * The Tmax soft License, Version 1.1
  3. *
  4. * Copyright (c) 1997-2004 The Tmax software.
  5. * All rights reserved.
  6. * html code omitted for readability.
  7. /* ====================================================================
  8. /* calculator.jsp */
  9. <%@ include file="../../upper.jsp" %>
  10. <%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
  11. <%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
  12. <f:view>
  13. <h:form id="form_0">
  14. <h2><h:outputText value="Simple Calculator Test" /></h2><br>
  15. <h:panelGrid columns="3" border="0" cellpadding="0" cellspacing="0" id="panel">
  16. <h:outputText id="fristLabel" value="fristNumber" />
  17. <h:inputText id="firstInput" value="#{CalcBean.fristNumber}" />
  18. <h:message for="firstInput" id="firstMessage" errorStyle="color:red" />
  19. <h:outputText id="secondLabel" value="secondNumber" />
  20. <h:inputText id="secondInput" value="#{CalcBean.secondNumber}" />
  21. <h:message for="secondInput" id="secondMessage" errorStyle="color:red"/>
  22. </h:panelGrid><br><br>
  23. <h:commandButton value="add" id="commandAdd" action="#{CalcBean.add}" />
  24. <h:commandButton value="Multiply" id="commandMultiply" action="#{CalcBean.multiply}" />
  25. </h:form>
  26. </f:view>
  27. <%@ include file="../../footer.html" %>
  28. /* result.jsp */
  29. <%@ include file="../../upper.jsp" %>
  30. <%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
  31. <%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
  32. <f:view>
  33. <h:form id="form_0">
  34. <h2><h:outputText value="Result" /></h2><br>
  35. <h:outputText id="firstLabel" value="FristNumber : " />
  36. <h:outputText id="firstInput" value="#{CalcBean.fristNumber}" />
  37. <br>
  38. <h:outputText id="secondLabel" value="SecondNumber : " />
  39. <h:outputText id="secondInput" value="#{CalcBean.secondNumber}" />
  40. <br><br><h:outputText id="resultLabel" value="Result : " />
  41. <h:outputLabel for="resultInput" value="#{CalcBean.result}" />
  42. <br><br><h:commandButton value="back" action="back" />
  43. </h:form>
  44. </f:view>
  45. <%@ include file="../../footer.html" %>