我写了这样的代码:
<ui:repeat var="fstDayWk" value="#{calendarBean.date}">
<c:choose>
<c:when test="#{fstDayWk == 'Sun'}">
<c:set var="fstDayWk" value="7"/>
</c:when>
<c:when test="#{fstDayWk =='Mon'}">
<c:set var="fstDayWk" value="1" />
</c:when>
<c:when test="#{fstDayWk =='Tue'}">
<c:set var="fstDayWk" value="2" />
</c:when>
<c:when test="#{fstDayWk =='Wed'}">
<c:set var="fstDayWk" value="3" />
</c:when>
<c:when test="#{fstDayWk =='Thu'}">
<c:set var="fstDayWk" value="4" />
</c:when>
<c:when test="#{fstDayWk =='Fri'}">
<c:set var="fstDayWk" value="5" />
</c:when>
<c:when test="#{fstDayWk =='Sat'}">
<c:set var="fstDayWk" value="6"/>
</c:when>
<c:otherwise>
<c:set var="fstDayWk" value="1" />
</c:otherwise>
</c:choose>
</ui:repeat>
但是这里的赋值fstDayWk
总是1。为什么会这样?如何根据 JSF 中的某些条件为某个变量设置值?