Hi
I had created an class of subscription,and iam trying to add an radio button on the registration form how to do plz help me out here is my code
model class:
import java.util.*;
/**
* State generated by hbm2java
*/
public class Subscription implements java.io.Serializable {
// Fields
private Integer subscriptionId;
private String subscriptionType;
private Integer isEnabled;
private String prefix;
private Set userDtlses;
private Set itemListings;
// Constructors
/** default constructor */
public Subscription() {
}
/** constructor with id */
public Subscription(Integer subscriptionId) {
this.subscriptionId = subscriptionId;
}
// Property accessors
/**
*
*/
public Integer getSubscriptionId() {
return this.subscriptionId;
}
public void setSubscriptionId(Integer subscriptionId) {
this.subscriptionId = subscriptionId;
}
/**
*
*/
public String getSubscriptionType() {
return this.subscriptionType;
}
public void setSubscriptionType(String subscriptionType) {
this.subscriptionType = subscriptionType;
}
/**
*
*/
public Integer getIsEnabled() {
return this.isEnabled;
}
public void setIsEnabled(Integer isEnabled) {
this.isEnabled = isEnabled;
}
/**
*
*/
public Set getUserDtlses() {
return this.userDtlses;
}
public void setUserDtlses(Set userDtlses) {
this.userDtlses = userDtlses;
}
/**
*
*/
public Set getItemListings() {
return this.itemListings;
}
public void setItemListings(Set itemListings) {
this.itemListings = itemListings;
}
public String getPrefix() {
return prefix;
}
public void setPrefix(String prefix) {
this.prefix = prefix;
}
}
My user class:
import java.util.*;
/**
* UserDtls generated by hbm2java
*/
public class UserDtls implements java.io.Serializable {
// Fields
private Integer userId;
private State state;
private RemoveRemarks removeRemarks;
private Country country;
private UserStatusDtls userStatusDtls;
private String firstName;
private String lastName;
private String addrs1;
private String addrs2;
private String city;
private String zip;
private String email;
private String auctionId;
private String paswd;
private Date activationDate;
private Date rcreTime;
private Date lchgTime;
private Integer rcreId;
private Integer lchgId;
private String adminRemarks;
private String companyName;
private String companyAddress;
private String companyAddress2;
private String homePhone;
private String workPhone;
private String mobilePhone;
private String fax;
private String reinsateRemarks;
private Set itemListings;
private Set itemBidderMaps;
private Set itemSecretBidses;
private Subscription subscription;
private Set documentHistories;
private String userRole;
private String license;
private String companyCity;
private String companyZip;
// Constructors
/** default constructor */
public UserDtls() {
}
/** constructor with id */
public UserDtls(Integer userId) {
this.userId = userId;
}
// Property accessors
/**
*
*/
public String getLicense() {
return this.license;
}
public void setLicense(String license) {
this.license = license;
}
/**
*
*/
public String getCompanyCity() {
return this.companyCity;
}
public void setCompanyCity(String companyCity) {
this.companyCity = companyCity;
}
/**
*
*/
public String getCompanyZip() {
return this.companyZip;
}
public void setCompanyZip(String companyZip) {
this.companyZip = companyZip;
}
/**
*
*/
public Integer getUserId() {
return this.userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
/**
*
*/
public String getCompanyAddress() {
return this.companyAddress;
}
public void setCompanyAddress(String companyAddress) {
this.companyAddress = companyAddress;
}
/**
*
*/
public String getCompanyAddress2() {
return this.companyAddress2;
}
public void setCompanyAddress2(String companyAddress2) {
this.companyAddress2 = companyAddress2;
}
/**
*
*/
public State getState() {
return this.state;
}
public void setState(State state) {
this.state = state;
}
/**
*
*/
public Subscription getSubscription() {
return this.subscription;
}
public void setSubscription(Subscription subscription) {
this.subscription = subscription;
}
/**
*
*/
public String getUserRole() {
return this.userRole;
}
public void setUserRole(String userRole) {
this.userRole = userRole;
}
public RemoveRemarks getRemoveRemarks() {
return this.removeRemarks;
}
public void setRemoveRemarks(RemoveRemarks removeRemarks) {
this.removeRemarks = removeRemarks;
}
/**
*
*/
public Country getCountry() {
return this.country;
}
public void setCountry(Country country) {
this.country = country;
}
/**
*
*/
public UserStatusDtls getUserStatusDtls() {
return this.userStatusDtls;
}
public void setUserStatusDtls(UserStatusDtls userStatusDtls) {
this.userStatusDtls = userStatusDtls;
}
/**
*
*/
public String getFirstName() {
return this.firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
/**
*
*/
public String getLastName() {
return this.lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
/**
*
*/
public String getAddrs1() {
return this.addrs1;
}
public void setAddrs1(String addrs1) {
this.addrs1 = addrs1;
}
/**
*
*/
public String getAddrs2() {
return this.addrs2;
}
public void setAddrs2(String addrs2) {
this.addrs2 = addrs2;
}
/**
*
*/
public String getCity() {
return this.city;
}
public void setCity(String city) {
this.city = city;
}
/**
*
*/
public String getZip() {
return this.zip;
}
public void setZip(String zip) {
this.zip = zip;
}
/**
*
*/
public String getEmail() {
return this.email;
}
public void setEmail(String email) {
this.email = email;
}
/**
*
*/
public String getAuctionId() {
return this.auctionId;
}
public void setAuctionId(String auctionId) {
this.auctionId = auctionId;
}
/**
*
*/
public String getPaswd() {
return this.paswd;
}
public void setPaswd(String paswd) {
this.paswd = paswd;
}
/**
*
*/
public Date getActivationDate() {
return this.activationDate;
}
public void setActivationDate(Date activationDate) {
this.activationDate = activationDate;
}
/**
*
*/
public Date getRcreTime() {
return this.rcreTime;
}
public void setRcreTime(Date rcreTime) {
this.rcreTime = rcreTime;
}
/**
*
*/
public Date getLchgTime() {
return this.lchgTime;
}
public void setLchgTime(Date lchgTime) {
this.lchgTime = lchgTime;
}
/**
*
*/
public Integer getRcreId() {
return this.rcreId;
}
public void setRcreId(Integer rcreId) {
this.rcreId = rcreId;
}
/**
*
*/
public Integer getLchgId() {
return this.lchgId;
}
public void setLchgId(Integer lchgId) {
this.lchgId = lchgId;
}
/**
*
*/
public String getAdminRemarks() {
return this.adminRemarks;
}
public void setAdminRemarks(String adminRemarks) {
this.adminRemarks = adminRemarks;
}
/**
*
*/
public String getCompanyName() {
return this.companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
/**
*
*/
public String getHomePhone() {
return this.homePhone;
}
public void setHomePhone(String homePhone) {
this.homePhone = homePhone;
}
/**
*
*/
public String getWorkPhone() {
return this.workPhone;
}
public void setWorkPhone(String workPhone) {
this.workPhone = workPhone;
}
/**
*
*/
public String getMobilePhone() {
return this.mobilePhone;
}
public void setMobilePhone(String mobilePhone) {
this.mobilePhone = mobilePhone;
}
/**
*
*/
public String getFax() {
return this.fax;
}
public void setFax(String fax) {
this.fax = fax;
}
/**
*
*/
public String getReinsateRemarks() {
return this.reinsateRemarks;
}
public void setReinsateRemarks(String reinsateRemarks) {
this.reinsateRemarks = reinsateRemarks;
}
/**
*
*/
public Set getItemListings() {
return this.itemListings;
}
public void setItemListings(Set itemListings) {
this.itemListings = itemListings;
}
/**
*
*/
public Set getItemBidderMaps() {
return this.itemBidderMaps;
}
public void setItemBidderMaps(Set itemBidderMaps) {
this.itemBidderMaps = itemBidderMaps;
}
public Set getItemSecretBidses() {
return itemSecretBidses;
}
public void setItemSecretBidses(Set itemSecretBidses) {
this.itemSecretBidses = itemSecretBidses;
}
/**
*
*/
public Set getDocumentHistories() {
return this.documentHistories;
}
public void setDocumentHistories(Set documentHistories) {
this.documentHistories = documentHistories;
}
}
And my form is :
<table width="650" height="541" border="0" cellpadding="0" cellspacing="3" class="table_text">
<tr>
<td width="1" height="16"> </td>
<td colspan="2"><b><div style="border-bottom:1px solid #CCCCCC;">Contact Information</div></b></td>
</tr>
<tr>
<td height="4" colspan="3"></td>
</tr>
<tr>
<td> </td>
<td width="119">First Name<font color="red"> *</font></td>
<td width="518" ><s:textfield name="firstName" maxlength="50" theme="simple" size="28" />
<s:fielderror theme="xhtml">
<s:param >firstName</s:param>
</s:fielderror></td>
</tr>
<tr>
<td> </td>
<td>Last Name<font color="red"> *</font></td>
<td><s:textfield name="lastName" maxlength="50" theme="simple" size="28" />
<s:fielderror theme="xhtml">
<s:param>lastName</s:param>
</s:fielderror></td>
</tr>
<tr>
<td> </td>
<td>Address1<font color="red"> *</font></td>
<td> <s:textfield name="addrs1" maxlength="50" theme="simple" size="28"/>
<s:fielderror theme="xhtml">
<s:param>addrs1</s:param>
</s:fielderror></td>
</tr>
<tr>
<td> </td>
<td>Address2</td>
<td><s:textfield name="addrs2" size="28" theme="simple" maxlength="50" /></td>
</tr>
<tr>
<td> </td>
<td>City<font color="red"> *</font></td>
<td> <s:textfield name="city" theme="simple" size="28" maxlength="50" />
<s:fielderror theme="xhtml">
<s:param>city</s:param>
</s:fielderror></td>
</tr>
<tr>
<td> </td>
<td>State<font color="red"> *</font></td>
<td> <s:select name="stateName" list="#application.stateList" listKey="stateId" listValue="stateName" theme="simple"
headerKey="" headerValue="[Select One]" cssStyle="width:173px;"
/>
<s:fielderror theme="xhtml">
<s:param>stateName</s:param>
</s:fielderror></td>
</tr>
<tr>
<td> </td>
<td>Zip Code<font color="red"> *</font></td>
<td><s:textfield name="txtZip" theme="simple" maxlength="10" size="28" />
<s:fielderror theme="xhtml">
<s:param>txtZip</s:param>
</s:fielderror></td>
</tr>
<tr>
<td> </td>
<td>Country<font color="red"> *</font></td>
<td> <s:select name="cntryName" theme="simple" list="#application.countryList"
listKey="cntryId" listValue="cntryName" cssStyle="width:173px;"
/></td>
</tr>
<tr>
<td> </td>
<td>Home Phone<font color="red"> </font></td>
<td><s:textfield name="phoneNoHome" theme="simple" maxlength="12" size="16"/>
<s:fielderror theme="xhtml">
<s:param>phoneNoHome</s:param>
</s:fielderror></td>
</tr>
<tr>
<td> </td>
<td>Work Phone<font color="red"> *</font></td>
<td><s:textfield name="phoneNoWork" theme="simple" maxlength="12" size="16"/>
<s:fielderror theme="xhtml">
<s:param>phoneNoWork</s:param>
</s:fielderror></td>
</tr>
<tr>
<td> </td>
<td>Mobile</td>
<td><s:textfield name="phoneNoMobile" theme="simple" maxlength="12" size="16"/>
<s:fielderror theme="xhtml">
<s:param>phoneNoMobile</s:param>
</s:fielderror></td>
</tr>
<tr>
<td> </td>
<td>Fax</td>
<td><s:textfield name="txtFaxNum" maxlength="12" size="16"
theme="simple" /> <s:fielderror theme="xhtml">
<s:param>txtFaxNum</s:param>
</s:fielderror></td>
</tr>
<tr>
<td> </td>
<td>Company Name</td>
<td><s:textfield name="companyName" maxlength="12" size="16" theme="simple" />
<s:fielderror theme="xhtml">
<s:param>companyName</s:param>
</s:fielderror></td>
</tr>
<tr>
<td> </td>
<td>Company Address</td>
<td><s:textfield name="companyAddress" maxlength="12" size="16" theme="simple" />
<s:fielderror theme="xhtml">
<s:param>companyAddress</s:param>
</s:fielderror></td>
</tr>
<tr>
<td> </td>
<td></td>
<td><s:hidden name="userRole" value="Seller"></s:hidden>
</td>
</tr>
<tr>
<td> </td>
<td>Email Address<font color="red"> *</font></td>
<td><s:textfield name="txtEmail" size="28" maxlength="50" theme="simple" />
<s:fielderror theme="xhtml">
<s:param>txtEmail</s:param>
</s:fielderror></td>
</tr>
<tr>
<td> </td>
<td>Confirm Email<font color="red"> *</font></td>
<td> <s:textfield name="confirmEMail" maxlength="50" size="28" theme="simple" />
<s:fielderror theme="xhtml">
<s:param>confirmEMail</s:param>
</s:fielderror></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td ><div style="border-bottom:1px solid #CCCCCC; width: auto"><b>Login Information</b></div></td>
</tr>
<tr>
<td> </td>
<td colspan="2"><div><b>Create your User Id and Password, must be 8 Characters</b></div></td>
</tr>
<tr>
<td> </td>
<td>User Id<font color="red"> *</font></td>
<td> <s:textfield name="userId" maxlength="50" size="28" theme="simple" />
<s:fielderror theme="xhtml">
<s:param>userId</s:param>
</s:fielderror></td>
</tr>
<tr>
<td> </td>
<td nowrap="nowrap">Password<font color="red"> *</font></td>
<td> <s:password name="txtPaswd" maxlength="50" size="28" theme="simple" />
<s:fielderror theme="xhtml">
<s:param>txtPaswd</s:param>
</s:fielderror></td>
<!-- <td nowrap="nowrap"><font color="red">Password should contain 8 characters</font></td>-->
</tr>
<tr>
<td> </td>
<td>Confirm Password<font color="red"> *</font></td>
<td> <s:password name="confirmPassword" maxlength="50" size="28" theme="simple" />
<s:fielderror theme="xhtml">
<s:param>confirmPassword</s:param>
</s:fielderror></td>
</tr><br/><br/>
<tr>
<td> </td>
<td colspan="2"><div style="padding-left:140px;"> <s:checkbox name="agreement" required="true" theme="simple" fieldValue="true" /><a href="#" onclick="viewTermsAndCondtions();">I Agree to Terms of Service</a></div>
<s:fielderror theme="xhtml">
<s:param>agreement</s:param>
</s:fielderror></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><s:submit name="submit" theme="simple" value="Register"/></td>
</tr>
</table>
<div dojoType="dialog" id="errorMsgDlg" bgColor="white"
bgOpacity="0.5" toggle="fade" toggleDuration="250"
style="visibility: hidden;">
<div id="errorDlgDisplay"></div>
<table width="100%">
<tr align="center">
<td align="center"><input type="button" value="Close" onclick="loginValidateShow.hide();"/>
</td>
</tr>
</table>
</div>
</s:form>
<div dojoType="dialog" id="termsAndConditionsDialog" style="visibility: hidden;" title="Terms and Condtions Dialog">
<div id="termsAndConditionsToDisplay" style="width:800px; height:500px; overflow-y: scroll; margin-left:auto; margin-right:auto; background:#eeeeee; color:#000000;">
</div>
<table width="100%" >
<tr align="center">
<td align="center">
<input style="margin-left:485px;" type="button" value="Close" onclick="termsAndConditionsDialogShow.hide();"/>
</td>
</tr>
</table>
plz sugest me how to use the class means how should i refer it here