I'm working with spring webflow 2 and I'm facing the issue of presenting a form for user registration. The user has to insert name, surname... and his/her nationality. This is the model class:
I can bind everything with spring webflow and the form is showing properly. But I can't fill up the tagCode:@Component @Entity @Table (name = "personal_data") public class PersonalData implements Serializable { @Id @GeneratedValue @Column (name = "id") private Integer id; @Column (name = "name", nullable=false) private String name; @Column (name = "familyName", nullable=false) private String familyName; @Column (name = "nationality") @Enumerated (EnumType.STRING) private Nationality nationality; //getters and setters } Where Nationality is: public enum Nationality { Afghan, Albanian , Algerian , American , Andorran , Angolan , Antiguans , Argentinean , Armenian ... }
The jsp is:
And the spring webflow is defined as:Code:<tr> <td><spring:message code="label.familyName"/>:</td> <td><form:input path="personalData.familyName" /> <form:errors path="personalData.familyName"/> </td> </tr> <td><spring:message code="label.name"/>:</td> <td><form:input path="personalData.name" /> <form:errors path="personalData.name"/> </td> </tr> <td><spring:message code="label.nationality"/>:</td> <td><form:select path="personalData.nationality"/> <form:errors path="personalData.nationality"/> </td> </tr>
Can you please tell me how can I populate theCode:<var name="profile" class="com.tclouds.tpaas.models.user.UserProfile"/> <view-state id="registerProfile" view="profile/create1" model="profile"> <transition on="submitRegistration" to="confirmData"/> </view-state>
many thanks


Reply With Quote
