0 Replies Latest reply on Mar 9, 2007 9:51 AM by Ricardo Memoria

    s:selectDate render problem

    Ricardo Memoria Novice


      I had no idea how to warn about bugs found+corrected in the source code, so I'm sending it here.

      A few posts ago I related a problem wiht the s:selectDate tag and the Romanian language. Acctually I found that the DateFormatSymbols.ShortWeekdays using the romanian locale returns strings with length of 1 char:


      I checked the method ui.org.jboss.seam.ui.UISelectDate.commaSeparate and found a problem there:

      The code in use:

      private String commaSeparate(String[] values, int maxLength)
       StringBuilder sb = new StringBuilder();
       for (String val : values)
       if (!"".equals(val))
       if (sb.length() > 0) sb.append(',');
       sb.append(maxLength == -1 ? val : val.substring(0, maxLength));
       return sb.toString();

      I just replaced the
      sb.append(maxLength == -1 ? val : val.substring(0, maxLength));


      sb.append((maxLength == -1) || (val.length() < maxLength) ? val : val.substring(0, maxLength));

      and now it's working fine.