Fresh Combo:
**********************
<select class="form-control input-sm" id="levelOfInstitute" name="levelOfInstitute" style="height:26px;font-size:12px;">
<option value="0">Select</option>
<option value="1">Option One</option>
</select>
get List by iterator tag :
--------------------------
<s:iterator value="educationLvList" status="status">
<option value="<s:property value="education_level_id"/>"><s:property value="education_level_name"/></option>
</s:iterator>
That Means:
<select class="form-control input-sm" id="levelOfInstitute" name="levelOfInstitute" style="height:26px;font-size:12px;">
<option value="0">Select</option>
<s:iterator value="educationLvList" status="status">
<option value="<s:property value="education_level_id"/>"><s:property value="education_level_name"/></option>
</s:iterator>
</select>
If Retrieve in list combo :
<select id="instituteBoardDivision" name="instituteBoardDivision" style="width:auto;">
<option value="0">---</option>
<s:if test='%{institutes.division_id != ""}'>
<option selected="selected" value="<s:property value="institutes.division_id"/>" ><s:property value="institutes.division_name"/></option>
<s:iterator value="divisionList" status="status">
<option value="<s:property value="division_id"/>"><s:property value="division_name"/></option>
</s:iterator>
</s:if>
<s:else>
<s:iterator value="divisionList" status="status">
<option value="<s:property value="division_id"/>"><s:property value="division_name"/></option>
</s:iterator>
</s:else>
</select>
If retrieve in not list combo : Yes , No and Not applicable
<select id="mpoValidInstitution" name="mpoValidInstitution" class="form-control input-sm" onFocus="this.style.backgroundColor='#ffff66';" onBlur="this.style.backgroundColor='#d4e3e5';" style="height:26px;font-size:12px;">
<s:if test='%{institutes.mpo_status == "1"}'>
<option value="1" selected="selected">Yes</option>
<option value="2">No</option>
<option value="3">Not applicable</option>
</s:if>
<s:elseif test='%{institutes.mpo_status == "3"}'>
<option value="2" >No</option>
<option value="1">Yes</option>
<option value="3" selected="selected">Not applicable</option>
</s:elseif>
<s:else>
<option value="3">Not applicable</option>
<option value="1">Yes</option>
<option value="2" selected="selected">No</option>
</s:else>
</select>
If retrieve in not list combo : Thana, District and Division
<select id="instituteLocation" name="instituteLocation" class="form-control input-sm" onFocus="this.style.backgroundColor='#ffff66';" onBlur="this.style.backgroundColor='#d4e3e5';" style="height:26px;font-size:12px;">
<s:if test='%{{institutes.area_status1 == "1"}'>
<option value="1" selected="selected">Thana headquarters</option>
<option value="2">District headquarters</option>
<option value="3">Divisional headquarters</option>
</s:if>
<s:elseif test='%{{institutes.area_status1 == "2"}'>
<option value="1">Thana headquarters</option>
<option value="2" selected="selected">District headquarters</option>
<option value="3">Divisional headquarters</option>
</s:elseif>
<s:elseif test='%{institutes.area_status1 == "3"}'>
<option value="1">Thana headquarters</option>
<option value="2">District headquarters</option>
<option value="3" selected="selected">Divisional headquarters</option>
</s:elseif>
<s:else>
<option value="1" selected="selected">Thana headquarters</option>
<option value="2">District headquarters</option>
<option value="3">Divisional headquarters</option>
</s:else>
</select>
No comments:
Post a Comment