0 Replies Latest reply on Jul 3, 2009 6:39 PM by Arbi Sookazian

    suggested approach for defaulting value in h:selectonemenu

    Arbi Sookazian Master

      what is the best approach to default the value for a drop-down in JSF/Seam?  I am using the <s:convertEntity/> tag like so:

      <h:selectOneMenu value="#{manageSiteId.selectedListValueForSiteId}">
           <s:selectItems var="lv"
                     noSelectionLabel="Please select..."/>                                                                                
                     <s:convertEntity />
                     <a4j:support event="onchange" action="#{manageSiteId.changeSiteId()}"/>

      Is it ok to just check for null in the getter and return the proper value, otherwise return what was saved/selected?