2 Replies Latest reply on May 12, 2009 10:36 PM by Christopher Logan

    preserving leading drop downs

    Christopher Logan Newbie
      Hi,
      I have working code! but I can't preserve the leading zeros; my table entries are:

      accountTypeCode  accountTypeDesc
      01               Business Checking
      02              Personal Checking
      03              Personal Savings

      my xhtml:

                              <h:selectOneMenu id="bankaccounttypes" value="#{accountProfile.bankAccountType}">
                                  <s:selectItems var="t" label="#{t.accountTypeDesc}"  noSelectionLabel="-- Select --"
                                                 value="#{bankAccountTypes.resultList}" />
                                  <s:convertEntity/>
                              </h:selectOneMenu>


      Where bankAccountTypes is defined in components.xml:

      <framework:entity-query name="bankAccountTypes"
            ejbql="select bat from BankAccountTypes bat">
          </framework:entity-query>

      When renendered, the dropdown is created as planned, but the values for each option is "0", "1", "2".  Instead of "00", "01", "02":
      <select id="bankaccounttypes" size="1" name="bankaccounttypes">
      <option value="org.jboss.seam.ui.NoSelectionConverter.noSelectionValue">-- Select --</option>
      <option value="0">Business Checking</option>
      <option value="1">Personal Checking</option>
      <option value="2">Personal Savings</option>
      </select>

      Thank you,
      Christopher