6 Replies Latest reply on Mar 10, 2010 11:18 AM by Leonid Sokolin

    InplaceSelect with Enum with 3.3.1

    julien colin Newbie

      Hello,

      This code with 3.2.2 it works.

      I've an Enum "Report" with these values "ALL,DELIVERED,NONE,UNDEFINED"

      <rich:inplaceSelect value="#{account.deliveryReport}"
      editEvent="onclick" selectOnEdit="true"
      defaultLabel="click to edit">
      <s:enumItem enumValue="ALL" itemLabel="ALL" />
      <s:enumItem enumValue="DELIVERED" itemLabel="DELIVERED" />
      <s:enumItem enumValue="NONE" itemLabel="NONE" />
      <s:enumItem enumValue="UNDEFINED" itemLabel="UNDEFINED" />
      <s:convertEnum />
      <a4j:support event="onviewactivated" eventsQueue="customer"
      action="#{entityManager.flush}" />
      </rich:inplaceSelect>


      with 3.3.1 i have a cast exception:


      java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Enum
       at org.jboss.seam.ui.converter.EnumConverter.getAsString(EnumConverter.java:56)
       at org.ajax4jsf.util.InputUtils.getConvertedStringValue(InputUtils.java:114)
       at org.richfaces.renderkit.ComboBoxBaseRenderer.getConvertedStringValue(ComboBoxBaseRenderer.java:131)
       at org.richfaces.renderkit.ComboBoxBaseRenderer.encodeSuggestion(ComboBoxBaseRenderer.java:138)
       at org.richfaces.renderkit.InplaceSelectBaseRenderer.encodeItems(InplaceSelectBaseRenderer.java:101)
       at org.richfaces.renderkit.html.InplaceSelectRenderer.doEncodeEnd(InplaceSelectRenderer.java:612)
       at org.richfaces.renderkit.html.InplaceSelectRenderer.doEncodeEnd(InplaceSelectRenderer.java:645)
       at org.ajax4jsf.renderkit.RendererBase.encodeEnd(RendererBase.java:134)
       at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:861)
      


      Is it the same problem https://jira.jboss.org/jira/browse/RF-5757 ??

      Fix on 3.3.1 :/

      Thanks.