jstl convertion
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 1
- Joined: Tue May 03, 2005 4:34 pm
- Contact:
jstl convertion
I tried to convert these jsp tags to JSTL, but i couldnt, can any body help me with it?
first i declare a String:
String strSelectSectors = null;
.
.
.
then:
for (int i=0; i<dlSectorsInfo.size();i++){
strSectorID = dlSectorsInfo.getKey(i);
strSectorName = dlSectorsInfo.getValue(i);
if(!Validation.isEmpty(strSearchSectorID) && strSearchSectorID.equals(strSectorID)) {
if (!strSectorID.equals("0") || !strSectorName.equalsIgnoreCase("MARKET INDEX")) {
strSelectSectors +="<option value=\""+strSectorID+"\" selected>"+strSectorName+"</option>";
}
}
else {
if (!strSectorID.equals("0") || !strSectorName.equalsIgnoreCase("MARKET INDEX")){
strSelectSectors +="<option value=\""+strSectorID+"\">"+strSectorName+"</option>";
}
}
}
%>
.
.
.
.
then i use it like this
<select name="slcSectorID" id="slcSectorID" class="frmSelect">
<option value="NULL"> All Market </option>
<%=strSelectSectors%>
</select>
Notes: "dlSectorsInfo" is a Map of Hashtable, so im iterating throw it and get key, with that key i get the the Value.
i tried to make it with JSTL, here is what i have done, but its not working:
<select id="slcSectorID" class="frmSelect">
<option value="NULL"> All Market </option>
<c:forEach var="i" begin="0" end="${dlSectorsInfo.size}">
<c:set var="strSectorID" value="${dlSectorsInfo.getKe}"/>
<c:set var="strSectorName" value="${dlSectorsInfo.getValue}"/>
<c:choose>
<c:when test="${!empty strSearchSectorID && strSearchSectorID eq strSectorID}">
<c:if test="${!strSectorID eq '0' || strSectorName ne 'MARKET INDEX'}">
<option value="${strSectorID}" selected>${strSectorName}</option>
</c:if>
</c:when>
<c:otherwise>
<option value="${strSectorID}">${strSectorName}</option>
</c:otherwise>
</c:choose>
</c:forEach>
</select>
please help me with it, Thanks.
first i declare a String:
String strSelectSectors = null;
.
.
.
then:
for (int i=0; i<dlSectorsInfo.size();i++){
strSectorID = dlSectorsInfo.getKey(i);
strSectorName = dlSectorsInfo.getValue(i);
if(!Validation.isEmpty(strSearchSectorID) && strSearchSectorID.equals(strSectorID)) {
if (!strSectorID.equals("0") || !strSectorName.equalsIgnoreCase("MARKET INDEX")) {
strSelectSectors +="<option value=\""+strSectorID+"\" selected>"+strSectorName+"</option>";
}
}
else {
if (!strSectorID.equals("0") || !strSectorName.equalsIgnoreCase("MARKET INDEX")){
strSelectSectors +="<option value=\""+strSectorID+"\">"+strSectorName+"</option>";
}
}
}
%>
.
.
.
.
then i use it like this
<select name="slcSectorID" id="slcSectorID" class="frmSelect">
<option value="NULL"> All Market </option>
<%=strSelectSectors%>
</select>
Notes: "dlSectorsInfo" is a Map of Hashtable, so im iterating throw it and get key, with that key i get the the Value.
i tried to make it with JSTL, here is what i have done, but its not working:
<select id="slcSectorID" class="frmSelect">
<option value="NULL"> All Market </option>
<c:forEach var="i" begin="0" end="${dlSectorsInfo.size}">
<c:set var="strSectorID" value="${dlSectorsInfo.getKe}"/>
<c:set var="strSectorName" value="${dlSectorsInfo.getValue}"/>
<c:choose>
<c:when test="${!empty strSearchSectorID && strSearchSectorID eq strSectorID}">
<c:if test="${!strSectorID eq '0' || strSectorName ne 'MARKET INDEX'}">
<option value="${strSectorID}" selected>${strSectorName}</option>
</c:if>
</c:when>
<c:otherwise>
<option value="${strSectorID}">${strSectorName}</option>
</c:otherwise>
</c:choose>
</c:forEach>
</select>
please help me with it, Thanks.
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service