[jboss-cvs] jboss-seam/seam-gen/freemarker-templates ...
Gavin King
gavin.king at jboss.com
Thu Nov 2 18:17:33 EST 2006
User: gavin
Date: 06/11/02 18:17:33
Modified: seam-gen/freemarker-templates CreateInterface.ftl
CreateInterfaceConversation.ftl
CreateSFSBAction.ftl CreateSFSBConversation.ftl
CreateSFSBInterface.ftl CreateSLSBAction.ftl
action-page.ftl conversation-page.ftl page.ftl
Added: seam-gen/freemarker-templates form-page.ftl
Log:
form
Revision Changes Path
1.3 +1 -1 jboss-seam/seam-gen/freemarker-templates/CreateInterface.ftl
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CreateInterface.ftl
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/seam-gen/freemarker-templates/CreateInterface.ftl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- CreateInterface.ftl 2 Nov 2006 01:01:53 -0000 1.2
+++ CreateInterface.ftl 2 Nov 2006 23:17:32 -0000 1.3
@@ -6,7 +6,7 @@
public interface ${interfaceName} {
//seam-gen method
- public String go();
+ public String ${componentName}();
//add additional interface methods here
}
\ No newline at end of file
1.3 +2 -0 jboss-seam/seam-gen/freemarker-templates/CreateInterfaceConversation.ftl
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CreateInterfaceConversation.ftl
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/seam-gen/freemarker-templates/CreateInterfaceConversation.ftl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- CreateInterfaceConversation.ftl 2 Nov 2006 01:01:53 -0000 1.2
+++ CreateInterfaceConversation.ftl 2 Nov 2006 23:17:32 -0000 1.3
@@ -7,7 +7,9 @@
//seam-gen methods
public String begin();
+ public String increment();
public String end();
+ public int getValue();
public void destroy();
//add additional interface methods here
1.6 +17 -2 jboss-seam/seam-gen/freemarker-templates/CreateSFSBAction.ftl
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CreateSFSBAction.ftl
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/seam-gen/freemarker-templates/CreateSFSBAction.ftl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- CreateSFSBAction.ftl 2 Nov 2006 20:38:41 -0000 1.5
+++ CreateSFSBAction.ftl 2 Nov 2006 23:17:32 -0000 1.6
@@ -1,3 +1,4 @@
+<#assign pound = "#">
package ${packageName};
import javax.ejb.Remove;
@@ -6,6 +7,7 @@
import org.jboss.seam.annotations.Destroy;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.log.Log;
+import org.hibernate.validator.Length;
@Stateful
@Name("${componentName}")
@@ -13,16 +15,29 @@
@Logger private Log log;
+ private String value;
+
//seam-gen method
- public String go()
+ public String ${componentName}()
{
//implement your business logic here
- log.info("go() action called");
+ log.info("${componentName}() action called with: ${pound}0", value);
return "success";
}
//add additional action methods
+ @Length(max=10)
+ public String getValue()
+ {
+ return value;
+ }
+
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
+
@Destroy @Remove
public void destroy() {}
}
1.6 +19 -5 jboss-seam/seam-gen/freemarker-templates/CreateSFSBConversation.ftl
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CreateSFSBConversation.ftl
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/seam-gen/freemarker-templates/CreateSFSBConversation.ftl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- CreateSFSBConversation.ftl 2 Nov 2006 20:38:41 -0000 1.5
+++ CreateSFSBConversation.ftl 2 Nov 2006 23:17:32 -0000 1.6
@@ -15,6 +15,8 @@
@Logger private Log log;
+ private int value;
+
@Begin
public String begin()
{
@@ -23,6 +25,13 @@
return "success";
}
+ public String increment()
+ {
+ log.info("incrementing");
+ value++;
+ return "success";
+ }
+
//add additional action methods that participate in this conversation
@End
@@ -30,7 +39,12 @@
{
//implement your end conversation business logic
log.info("ending conversation");
- return "success";
+ return "home";
+ }
+
+ public int getValue()
+ {
+ return value;
}
@Destroy @Remove
1.3 +3 -1 jboss-seam/seam-gen/freemarker-templates/CreateSFSBInterface.ftl
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CreateSFSBInterface.ftl
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/seam-gen/freemarker-templates/CreateSFSBInterface.ftl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- CreateSFSBInterface.ftl 2 Nov 2006 01:01:53 -0000 1.2
+++ CreateSFSBInterface.ftl 2 Nov 2006 23:17:32 -0000 1.3
@@ -6,7 +6,9 @@
public interface ${interfaceName} {
//seam-gen methods
- public String go();
+ public String ${componentName}();
+ public String getValue();
+ public void setValue(String value);
public void destroy();
//add additional interface methods here
1.7 +2 -2 jboss-seam/seam-gen/freemarker-templates/CreateSLSBAction.ftl
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CreateSLSBAction.ftl
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/seam-gen/freemarker-templates/CreateSLSBAction.ftl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- CreateSLSBAction.ftl 2 Nov 2006 22:34:20 -0000 1.6
+++ CreateSLSBAction.ftl 2 Nov 2006 23:17:32 -0000 1.7
@@ -12,10 +12,10 @@
@Logger private Log log;
//seam-gen method
- public String go()
+ public String ${componentName}()
{
//implement your business logic here
- log.info("go() action called");
+ log.info("${componentName}() action called");
return "success";
}
1.7 +3 -5 jboss-seam/seam-gen/freemarker-templates/action-page.ftl
(In the diff below, changes in quantity of whitespace are not shown.)
Index: action-page.ftl
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/seam-gen/freemarker-templates/action-page.ftl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- action-page.ftl 2 Nov 2006 20:38:41 -0000 1.6
+++ action-page.ftl 2 Nov 2006 23:17:32 -0000 1.7
@@ -4,7 +4,7 @@
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:f="http://java.sun.com/jsf"
+ xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
template="layout/template.xhtml">
@@ -12,11 +12,9 @@
<h1>${pageName}</h1>
<p>Action page created by seam-gen.</p>
<h:form>
- <s:validateAll>
- </s:validateAll>
<div>
- <h:commandButton id="go" styleClass="formButton"
- value="Go!" action="${pound}{${componentName}.go}"/>
+ <h:commandButton id="go" value="Go!"
+ action="${pound}{${componentName}.${componentName}}"/>
</div>
</h:form>
</ui:define>
1.2 +7 -6 jboss-seam/seam-gen/freemarker-templates/conversation-page.ftl
(In the diff below, changes in quantity of whitespace are not shown.)
Index: conversation-page.ftl
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/seam-gen/freemarker-templates/conversation-page.ftl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- conversation-page.ftl 2 Nov 2006 22:34:20 -0000 1.1
+++ conversation-page.ftl 2 Nov 2006 23:17:32 -0000 1.2
@@ -11,14 +11,15 @@
<ui:define name="body">
<h1>${pageName}</h1>
<p>Action page created by seam-gen.</p>
+ <p>${pound}{${componentName}.value}</p>
<h:form>
- <s:validateAll>
- </s:validateAll>
<div>
- <h:commandButton id="begin" styleClass="formButton"
- value="Begin" action="${pound}{${componentName}.begin}"/>
- <h:commandButton id="end" styleClass="formButton"
- value="End" action="${pound}{${componentName}.end}"/>
+ <h:commandButton id="begin" value="Begin"
+ action="${pound}{${componentName}.begin}"/>
+ <h:commandButton id="inc" value="Increment"
+ action="${pound}{${componentName}.increment}"/>
+ <h:commandButton id="end" value="End"
+ action="${pound}{${componentName}.end}"/>
</div>
</h:form>
</ui:define>
1.4 +1 -1 jboss-seam/seam-gen/freemarker-templates/page.ftl
(In the diff below, changes in quantity of whitespace are not shown.)
Index: page.ftl
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/seam-gen/freemarker-templates/page.ftl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- page.ftl 2 Nov 2006 02:12:30 -0000 1.3
+++ page.ftl 2 Nov 2006 23:17:32 -0000 1.4
@@ -3,7 +3,7 @@
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:f="http://java.sun.com/jsf"
+ xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
template="layout/template.xhtml">
1.1 date: 2006/11/02 23:17:32; author: gavin; state: Exp;jboss-seam/seam-gen/freemarker-templates/form-page.ftl
Index: form-page.ftl
===================================================================
<#assign pound = "#">
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
template="layout/template.xhtml">
<ui:define name="body">
<h1>${pageName}</h1>
<p>Action page created by seam-gen.</p>
<h:form>
<f:facet name="aroundInvalidField">
<s:span styleClass="errors"/>
</f:facet>
<f:facet name="afterInvalidField">
<s:message/>
</f:facet>
<s:validateAll>
<s:decorate>
<h:inputText value="${pound}{${componentName}.value}"/>
</s:decorate>
</s:validateAll>
<div>
<h:commandButton id="go" value="Go!"
action="${pound}{${componentName}.${componentName}}"/>
</div>
</h:form>
</ui:define>
</ui:composition>
More information about the jboss-cvs-commits
mailing list