Hi, I am new this framework. In my page i have one dropdown and one text box. If any error comes that drop is no longer available. How to fix this.
Struts.xml:
<action name="*DropDown"
class="com.mmm.ehspreg2.web.action.DropdownListAction" method="{1}" />
<action name="addComment" method="add"
class="com.mmm.ehspreg2.web.action.product.CommentAction">
<result name="input" type="tiles">addComment</result>
<result name="error" type="tiles">addComment</result>
<result name="success" type="tiles">reloadList</result>
</action>
Page:
<s:form action="addComment" method="POST">
<s:action name="getDivisionsDropDown" id="actFetchDivisions" executeResult="true"></s:action>
<s:action name="getPropretyTypesDropDown" id="actFetchPropretyTypes" executeResult="true" ></s:action>
<table cellspacing="0" cellpadding="3" width="100%" border="0">
<tr>
<td class="error"><s:actionerror /><s:actionmessage /> <s:fielderror></s:fielderror></td>
</tr>
<tr>
<td class="bdyRecords"><s:label>
<s:text name="common.division" />
</s:label></td>
<td class="bdyRecords" style="width: 1px">:</td>
<td class="bdyRecords"><s:if
test="#actFetchDivisions.lstEntities.size()>0">
<s:select cssClass="drop" list="#actFetchDivisions.lstEntities"
cssStyle="width:200px" tooltip="divisionName"
id="select_division" listKey="id" name="comment.divisionId"
listValue="value"></s:select>
</s:if></td>
</tr>
<tr>
<td class="bdyRecords"><s:label>
<s:text name="common.propertytype" />
</s:label></td>
<td class="bdyRecords" style="width: 1px">:</td>
<td class="bdyRecords"><s:select cssClass="drop"
list="#actFetchPropretyTypes.lstEntities" cssStyle="width:200px"
tooltip="propertyTypeName" id="select_propertytype" listKey="id"
name="comment.propertyTypeId" listValue="value"></s:select></td>
</tr>
<tr>
<td class="bdyRecords"><s:label>
<s:text name="common.comment" />
</s:label></td>
<td class="bdyRecords" style="width: 1px">:</td>
<td class="bdyRecords"><s:textfield name="comment.commentText"
key="common.comment" size="50" maxlength="60" cssClass="textbxadd" /></td>
</tr>
</table>
</s:form>
And validation enabled by CommentAction-validation.xml