now display PET fields in View; lost SWF Naviagtion
hi - thank you for the link. i looked at it but i'm afraid i wasn't able to work through it with the different versions. i was able to get a roo generated page to render as the 1st page of the flow; however, realized it would not be practical to use the generated page as i'm looking to build a wizard to step thru saving an entity and then building out the references. i have the 1st page of the flow rendering with the PET object using the roo taglibs but now i broke the SWF which expect a form method = POST. Here's what I did and the create pet is now showing; however, the navigation to PROCEED to step 2 no longer works. How should you define the view when using
Roo 1.2.1 with Spring Web Flow?
- in ROO ran: web flow --flowName registration
- registration/flox.xml modification: inserted:
<on-start>
<evaluate expression="new com.springsource.petclinic.domain.Pet()"
result="flowScope.pet">
</evaluate>
</on-start>
- registration/view-state-1.jspx
HTML Code:
<!-- Added namespace: FN AND UTIL -->
<!-- Changed form
from: <form method="POST">
to: <form:create modelAttribute="pet" path="/registration" id="rc_com_springsource_petclinic_domain_Pet">
-->
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<div xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:field="urn:jsptagdir:/WEB-INF/tags/form/fields"
xmlns:form="urn:jsptagdir:/WEB-INF/tags/form"
xmlns:fn="http://java.sun.com/jsp/jstl/functions"
xmlns:util="urn:jsptagdir:/WEB-INF/tags/util"
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:spring="http://www.springframework.org/tags" version="2.0">
<jsp:directive.page contentType="text/html;charset=UTF-8" />
<jsp:output omit-xml-declaration="yes" />
<spring:message var="title" code="webflow_state1_title" htmlEscape="false" />
<util:panel id="title" title="${title}">
<h1>${fn:escapeXml(title)}</h1>
<p>
<spring:message code="webflow_state1_message" />
</p>
<!-- mod from form method=post -->
<form:create modelAttribute="pet" path="/registration" id="rc_com_springsource_petclinic_domain_Pet">
<!-- mod for PET -->
<div> <field:input field="name" id="c_com_springsource_petclinic_domain_Pet_name" min="1"/> </div>
<div class="submit">
<spring:message var="cancel" code="button_cancel" htmlEscape="false" />
<spring:message var="proceed" code="button_proceed"
htmlEscape="false" />
<input type="submit" id="cancel" name="_eventId_cancel"
value="${fn:escapeXml(cancel)}" /> <input type="submit"
id="success" name="_eventId_success"
value="${fn:escapeXml(proceed)}" />
</div>
<!-- mod from form -->
</form:create>
</util:panel>
</div>