7 Replies Latest reply on Mar 29, 2008 2:55 PM by barbacena

    noSelectionLabel doesn`t change on reRender

    barbacena

      Hi,


      I've got the following facelet:


      <s:decorate id="#{name}">
       <c:if test="#{empty noSelectionLabel}">
        <c:set var="noSelectionLabel" value="----" />
       </c:if>
       <c:if test="#{defautSelectItems and items.size eq 1}">
        <c:set var="noSelectionLabel" value="" />
       </c:if>
       <h:selectOneMenu ... >
        <s:selectItems ... noSelectionLabel="#{noSelectionLabel}" />
       </h:selectOneMenu>
      </s:decorate>
      



      The expected behavior of this is when #{items} has only one value and #{defautSelectItems} is true, the #{noSelectionItem} shouldn't show. But what happens is that because the 1st render has no items it show the #{noSelectionLabel} as ----, but when I reRender the selectOneMenu with only 1 item, it keeps showing the noSelectionLabel but it shouldn't show it because the #{noSelectionLabel} is empty.


      Do I need to add something at s:selectItems to get this behaviour?


      Ty.