2 Replies Latest reply on Dec 12, 2009 5:01 AM by swario

    redirecting and suggestionBox

      Hi all!
      I have a suggestionbox and I also use it with an optical bar code reader. I want my application to redirect the user to a page if the suggestion finds a record linked at the bar code.
      I'm using Seam. Then i use the pages.xml file to navigate my pages.
      My suggestionPage.xhtml page is:

       [...]
       <rich:suggestionbox height="400" width="1000" selfRendered="true"
       for="my inputText" suggestionAction="#{personList.suggest}"
       var="person"
       ...
       />
      

      My pages.xhtml is:
      [...]
      <page view-id="/personSearch.xhtml" login-required="true">
       <navigation from-action="#{personList.suggest}">
       <redirect view-id="/redirectingPage.xhtml" />
       </navigation>
      </page>
      [...]
      

      Doesn't work.Does Anybody have ideas? tnx

        • 1. Re: redirecting and suggestionBox
          ilya_shaikovsky

          I can't realize that case.. The user typing inside a field and suddenly getting redirected to another page?

          Or you want him to be redirected only after the suggestion returned and he selected something from the list? then you should add support inside suggestion and define action there.

          • 2. Re: redirecting and suggestionBox

             

            "ilya_shaikovsky" wrote:
            I can't realize that case.. The user typing inside a field and suddenly getting redirected to another page?

            Or you want him to be redirected only after the suggestion returned and he selected something from the list? then you should add support inside suggestion and define action there.


            my suggestionBox is used to retrieve records by partial user-input but also I use a bar code reader, if the suggest method find a record associated to the readen bar code, i want the redirection to a specific page without selecting or else. Automatically. I'm having difficulties in particular on the pages.xml. Which action must be called?
            the method in the class?
            or
            the method called by the page? in this case "personList.suggest"?