2 Replies Latest reply on Oct 28, 2011 2:18 PM by Jason Porter

    AroundInvoke type safe ?

    Thyago Schleuss Newbie

      Hello, i'm trying the Service Handler example to define
      queries on interfaces. But ArraoundInvoke method returns Object tipo
      and not the intercepted method type.. like this

      I have this interface method

           @Query("SELECT s FROM Status s")
           List<Status> getAll();

      and i'm inject her on my manager class, like this:

           private StatusQuery statusQuery;

      the problem is, on my JSF page i'm try this:

      <h:selectOneMenu id="statusList">
           <f:selectItem itemValue="-1" itemLabel="" />
                itemLabel="#{status.description}" />

      when i'm access the jsp page, i got this exception:

      java.lang.NumberFormatException: For input string: "id"
           at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
           at java.lang.Integer.parseInt(Integer.java:449)
           at java.lang.Integer.parseInt(Integer.java:499)

      Because status is and Object class e not Status class.
      For me this is a bug, because my method return a Status object explicit.
      Theres any workarround for this, i need to create a conversor for this ? it's bad.