1 Reply Latest reply on Apr 1, 2008 2:53 PM by Nick Belaevski

    The cool new combobox and suggestValues

    niko schwarz Newbie

      Hey ho! I'm trying the cool new combobox and it doesn't quite want to work.

      The question it kinda boils down is: what should the session bean side side look like? The examples show only the presentation side.

      So, my presentation side:

      <rich:comboBox style="width:125px;" maxlength="50" height="170"
      width="250" styleClass="#{invalid?'errorInput':''}"
      value="#{ab.ausbildungsort.ausbildungsort}"
      suggestionValues="#{listFactory.suggestOrt}" >

      </rich:comboBox>

      and my session bean side:

      (2 methods cos i wasnt sure about which signature is expected. i thought ONE of them has to match ferkrissakes!)

      public List suggestOrt(Object suggest) {
      String input = suggest.toString();
      input = input.toLowerCase() + "%";
      input = input.replaceAll("\\*", "%");
      log.info("Suggestsuche nach: " + input);
      return entityManager
      .createQuery(
      "select o from Ausbildungsort o where lower(o.ausbildungsort) like :input order by o.ausbildungsort")
      .setParameter("input", input).getResultList();
      }


      public List suggestOrt() {
      String input = "";
      input = input.toLowerCase() + "%";
      input = input.replaceAll("\\*", "%");
      log.info("Suggestsuche nach: " + input);
      return entityManager
      .createQuery(
      "select o from Ausbildungsort o where lower(o.ausbildungsort) like :input order by o.ausbildungsort")
      .setParameter("input", input).getResultList();
      }

      the error message is:

      "property suggestOrt not found on type org.javaassist.tmp.java.lang.Object_$$_javaassist_11"

      now whats that mean?

      thanks in advance

      Niko