[jboss-cvs] jboss-seam/seam-gen/freemarker-templates ...
Gavin King
gavin.king at jboss.com
Fri Nov 3 21:53:43 EST 2006
User: gavin
Date: 06/11/03 21:53:43
Added: seam-gen/freemarker-templates
Action.ftl ActionBean.ftl Conversation.ftl
ConversationBean.ftl FormAction.ftl
FormActionBean.ftl MessageDrivenBean.ftl
actionPage.ftl buildproperties.ftl
conversationPage.ftl entityEditPage.ftl
entityListPage.ftl formPage.ftl
Removed: seam-gen/freemarker-templates
CreateInterface.ftl CreateInterfaceConversation.ftl
CreateSFSBAction.ftl CreateSFSBConversation.ftl
CreateSFSBInterface.ftl CreateSLSBAction.ftl
Mdb.ftl action-page.ftl build-properties.ftl
conversation-page.ftl edit-page.ftl form-page.ftl
list-page.ftl
Log:
renamed templates
Revision Changes Path
1.1 date: 2006/11/04 02:53:43; author: gavin; state: Exp;jboss-seam/seam-gen/freemarker-templates/Action.ftl
Index: Action.ftl
===================================================================
package ${packageName};
import javax.ejb.Local;
@Local
public interface ${interfaceName} {
//seam-gen method
public String ${componentName}();
//add additional interface methods here
}
1.1 date: 2006/11/04 02:53:43; author: gavin; state: Exp;jboss-seam/seam-gen/freemarker-templates/ActionBean.ftl
Index: ActionBean.ftl
===================================================================
package ${packageName};
import javax.ejb.Stateless;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.log.Log;
import org.jboss.seam.core.FacesMessages;
@Stateless
@Name("${componentName}")
public class ${actionName}Action implements ${actionName} {
@Logger private Log log;
@In(create=true)
FacesMessages facesMessages;
//seam-gen method
public String ${componentName}()
{
//implement your business logic here
log.info("${componentName}() action called");
facesMessages.add("${componentName}");
return "success";
}
//add additional action methods
}
1.1 date: 2006/11/04 02:53:43; author: gavin; state: Exp;jboss-seam/seam-gen/freemarker-templates/Conversation.ftl
Index: Conversation.ftl
===================================================================
package ${packageName};
import javax.ejb.Local;
@Local
public interface ${interfaceName} {
//seam-gen methods
public String begin();
public String increment();
public String end();
public int getValue();
public void destroy();
//add additional interface methods here
}
1.1 date: 2006/11/04 02:53:43; author: gavin; state: Exp;jboss-seam/seam-gen/freemarker-templates/ConversationBean.ftl
Index: ConversationBean.ftl
===================================================================
package ${packageName};
import javax.ejb.Remove;
import javax.ejb.Stateful;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Begin;
import org.jboss.seam.annotations.End;
import org.jboss.seam.annotations.Destroy;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.log.Log;
@Stateful
@Name("${componentName}")
public class ${actionName}Action implements ${actionName} {
@Logger private Log log;
private int value;
@Begin
public String begin()
{
//implement your begin conversation business logic
log.info("beginning conversation");
return "success";
}
public String increment()
{
log.info("incrementing");
value++;
return "success";
}
//add additional action methods that participate in this conversation
@End
public String end()
{
//implement your end conversation business logic
log.info("ending conversation");
return "home";
}
public int getValue()
{
return value;
}
@Destroy @Remove
public void destroy() {}
}
1.1 date: 2006/11/04 02:53:43; author: gavin; state: Exp;jboss-seam/seam-gen/freemarker-templates/FormAction.ftl
Index: FormAction.ftl
===================================================================
package ${packageName};
import javax.ejb.Local;
@Local
public interface ${interfaceName} {
//seam-gen methods
public String ${componentName}();
public String getValue();
public void setValue(String value);
public void destroy();
//add additional interface methods here
}
1.1 date: 2006/11/04 02:53:43; author: gavin; state: Exp;jboss-seam/seam-gen/freemarker-templates/FormActionBean.ftl
Index: FormActionBean.ftl
===================================================================
<#assign pound = "#">
package ${packageName};
import javax.ejb.Remove;
import javax.ejb.Stateful;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Destroy;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.log.Log;
import org.jboss.seam.core.FacesMessages;
import org.hibernate.validator.Length;
@Stateful
@Name("${componentName}")
public class ${actionName}Action implements ${actionName} {
@Logger private Log log;
@In(create=true)
FacesMessages facesMessages;
private String value;
//seam-gen method
public String ${componentName}()
{
//implement your business logic here
log.info("${componentName}() action called with: ${pound}0", value);
facesMessages.add( "${componentName} ${pound}0", (Object) 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.1 date: 2006/11/04 02:53:43; author: gavin; state: Exp;jboss-seam/seam-gen/freemarker-templates/MessageDrivenBean.ftl
Index: MessageDrivenBean.ftl
===================================================================
package ${mdbPackage};
import javax.ejb.MessageDriven;
import javax.ejb.ActivationConfigProperty;
import javax.jms.Message;
import javax.jms.MessageListener;
@MessageDriven(activationConfig =
{
@ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.${destinationType}"),
@ActivationConfigProperty(propertyName="destination", propertyValue="${destination}")
})
public class ${actionName} implements MessageListener
{
public void onMessage(Message recvMsg)
{
System.out.println("----------------");
System.out.println("Received message");
System.out.println("----------------");
}
}
1.1 date: 2006/11/04 02:53:43; author: gavin; state: Exp;jboss-seam/seam-gen/freemarker-templates/actionPage.ftl
Index: actionPage.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>Generated action page</p>
<h:messages globalOnly="true" styleClass="message"/>
<h:form id="${componentName}">
<div>
<h:commandButton id="${componentName}" value="${actionName}!"
action="${pound}{${componentName}.${componentName}}"/>
</div>
</h:form>
</ui:define>
</ui:composition>
1.1 date: 2006/11/04 02:53:43; author: gavin; state: Exp;jboss-seam/seam-gen/freemarker-templates/buildproperties.ftl
Index: buildproperties.ftl
===================================================================
#Name of your project - cannot be "jboss-seam"
project.name=@projectName@
#Location for the project's files
workspace.home=${projectProps.workspaceHome}
#JBoss Installation Home - Must be an ejb3 configuration
jboss.home=${projectProps.jbossHome}
#Java package for action objects (SFSB's, SLSBs)
action.dir=${projectProps.actionDir}
action.package=${projectProps.actionPackage}
#Java package for model objects (Entity beans)
model.dir=${projectProps.modelDir}
model.package=${projectProps.modelPackage}
#Java package for test cases (TestNG)
test.dir=${projectProps.testDir}
test.package=${projectProps.testPackage}
#Java package for messaging objects (MDBs)
mdb.dir=${projectProps.mdbDir}
mdb.package=${projectProps.mdbPackage}
eclipse.wtp=${projectProps.wtp}
1.1 date: 2006/11/04 02:53:43; author: gavin; state: Exp;jboss-seam/seam-gen/freemarker-templates/conversationPage.ftl
Index: conversationPage.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"
xmlns:h="http://java.sun.com/jsf/html"
template="layout/template.xhtml">
<ui:define name="body">
<h1>${pageName}</h1>
<p>Generated conversation page.</p>
<h:messages globalOnly="true" styleClass="message"/>
<div class="dialog">
<div class="prop">
<span class="name">Value</span>
<span class="value">${pound}{${componentName}.value}</span>
</div>
</div>
<h:form id="${componentName}">
<div class="actionButtons">
<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>
</ui:composition>
1.1 date: 2006/11/04 02:53:43; author: gavin; state: Exp;jboss-seam/seam-gen/freemarker-templates/entityEditPage.ftl
Index: entityEditPage.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>Generated edit page.</p>
<h:messages globalOnly="true" styleClass="message"/>
<h:form id="${componentName}">
<div class="dialog">
<s:validateAll>
<div class="prop">
<span class="name">Name</span>
<span class="value">
<s:decorate>
<h:inputText id="name" required="true"
value="${pound}{${componentName}Home.instance.name}"/>
</s:decorate>
</span>
</div>
</s:validateAll>
</div>
<div class="actionButtons">
<h:commandButton id="save" value="Save"
action="${pound}{${componentName}Home.persist}"
rendered="${pound}{!${componentName}Home.managed}"/>
<h:commandButton id="update" value="Save"
action="${pound}{${componentName}Home.update}"
rendered="${pound}{${componentName}Home.managed}"/>
<h:commandButton id="delete" value="Delete"
action="${pound}{${componentName}Home.remove}"
rendered="${pound}{${componentName}Home.managed}"/>
<s:link id="done" value="Done" linkStyle="button"
propagation="end" view="/${masterPageName}.xhtml"/>
</div>
</h:form>
</ui:define>
</ui:composition>
1.1 date: 2006/11/04 02:53:43; author: gavin; state: Exp;jboss-seam/seam-gen/freemarker-templates/entityListPage.ftl
Index: entityListPage.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>${masterPageName}</h1>
<p>Generated list page.</p>
<h:messages globalOnly="true" styleClass="message"/>
<h:outputText value="No ${componentName} exists"
rendered="${pound}{empty ${componentName}List.resultList}"/>
<h:dataTable id="${componentName}List" var="${componentName}"
value="${pound}{${componentName}List.resultList}"
rendered="${pound}{not empty ${componentName}List.resultList}">
<h:column>
<f:facet name="header">Id</f:facet>
${pound}{${componentName}.id}
</h:column>
<h:column>
<f:facet name="header">Name</f:facet>
<s:link id="${componentName}" value="${pound}{${componentName}.name}" view="/${pageName}.xhtml">
<f:param name="${componentName}Id" value="${pound}{${componentName}.id}"/>
</s:link>
</h:column>
</h:dataTable>
<div class="actionButtons">
<s:link id="done" value="Create ${actionName}" linkStyle="button"
view="/${pageName}.xhtml"/>
</div>
</ui:define>
</ui:composition>
1.1 date: 2006/11/04 02:53:43; author: gavin; state: Exp;jboss-seam/seam-gen/freemarker-templates/formPage.ftl
Index: formPage.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>Generated form page.</p>
<h:messages globalOnly="true" styleClass="message"/>
<h:form id="${componentName}">
<div class="dialog">
<s:validateAll>
<div class="prop">
<span class="name">Value</span>
<span class="value">
<s:decorate>
<h:inputText id="value" required="true"
value="${pound}{${componentName}.value}"/>
</s:decorate>
</span>
</div>
</s:validateAll>
</div>
<div class="actionButtons">
<h:commandButton id="${componentName}" value="${actionName}"
action="${pound}{${componentName}.${componentName}}"/>
</div>
</h:form>
</ui:define>
</ui:composition>
More information about the jboss-cvs-commits
mailing list