4 Replies Latest reply on Jun 5, 2008 8:29 AM by e2krauss

    1 suggestionbox pointed to multiple inputfields

    jor010

      Hi,

      I'm sorry if this is a dumb question, but i don't know how to get the following to work:

      I succesfully created a suggestionbox which points to the ID of a certain inputfield. What i've got now is that the user fills in his studentnumber in the inputfield, the suggestion box gives suggestion (3 columns: studentnumber, name and class). When the user chooses from the suggestionbox, the studentnumber appears in the inputfield.

      Now what I want is that name and class appear in 2 different inputfields with different IDs ofcourse (those 2 inputfields shouldnt be editable by the user btw).

      I searched on these forums, google and the richfaces dev-guide, but i just cannot find it.

      i really would appreciate some help!

        • 1. Re: 1 suggestionbox pointed to multiple inputfields
          jor010

          Hmm...I'm now trying to do it via Javascript..but I cannot get that to work either. There must be a way to do this just with the suggestionbox component right?....

          • 2. Re: 1 suggestionbox pointed to multiple inputfields
            tkuehne

            Hi.

            Did you solve your problem with filling multiple inputfields with help of a suggestionbox?

            If not, I could send you some code snippets per email, that work for me.

            I also have a problem with suggestionbox on my own - I try to use multiple boxes on one page. But I only get suggestions for the first box, that I click into...

            Tobias.

            • 3. Re: 1 suggestionbox pointed to multiple inputfields

              Iam getting the following error while implementing the suggestion box in my jsf application(my JSF implementation is Sun RI ) :

              WebApp E [Servlet Error]-[Faces Servlet]: java.lang.NullPointerException
              at org.ajax4jsf.org.w3c.tidy.ParserImpl$ParseBlock.parse(ParserImpl.java:2362)
              at org.ajax4jsf.org.w3c.tidy.ParserImpl.parseTag(ParserImpl.java:224)
              at org.ajax4jsf.org.w3c.tidy.ParserImpl$ParseRowGroup.parse(ParserImpl.java:2830)
              at org.ajax4jsf.org.w3c.tidy.ParserImpl.parseTag(ParserImpl.java:224)
              at org.ajax4jsf.org.w3c.tidy.ParserImpl$ParseTableTag.parse(ParserImpl.java:2650)
              at org.ajax4jsf.org.w3c.tidy.ParserImpl.parseTag(ParserImpl.java:224)
              at org.ajax4jsf.org.w3c.tidy.ParserImpl$ParseBlock.parse(ParserImpl.java:2488)
              at org.ajax4jsf.org.w3c.tidy.ParserImpl.parseTag(ParserImpl.java:224)
              at org.ajax4jsf.org.w3c.tidy.ParserImpl$ParseBody.parse(ParserImpl.java:999)
              at org.ajax4jsf.org.w3c.tidy.ParserImpl.parseTag(ParserImpl.java:224)
              at org.ajax4jsf.org.w3c.tidy.ParserImpl$ParseHTML.parse(ParserImpl.java:507)
              at org.ajax4jsf.org.w3c.tidy.ParserImpl.parseDocument(ParserImpl.java:3430)
              at org.ajax4jsf.org.w3c.tidy.Tidy.parse(Tidy.java:384)
              at org.ajax4jsf.org.w3c.tidy.Tidy.parse(Tidy.java:282)
              at org.ajax4jsf.org.w3c.tidy.Tidy.parseDOM(Tidy.java:625)
              at org.ajax4jsf.framework.ajax.xmlfilter.tidy.TidyParser.parseHtmlByTidy(TidyParser.java:98)
              at org.ajax4jsf.framework.ajax.xmlfilter.tidy.TidyParser.parseHtml(TidyParser.java:203)
              at org.ajax4jsf.framework.ajax.xmlfilter.FilterServletResponseWrapper.parseContent(FilterServletResponseWrapper.java:607)
              at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:212)
              at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
              at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
              at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
              at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
              at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:761)
              at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:673)
              at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:498)
              at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)
              at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
              at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
              at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455)
              at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:113)
              at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:454)
              at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:383)
              at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
              at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
              at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
              at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
              at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
              at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
              at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
              at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
              at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)

              can any one of you send me the code snippet of your working suggestion box , and are you guys implementing it in JSF(Sun RI).
              I would appreciate if you can sned in your jsp source , ation class code snippets.

              your help is appreciated
              thanks in advance

              • 4. Re: 1 suggestionbox pointed to multiple inputfields
                e2krauss

                Hi,

                can anyone send me a solution for this situation, because i now have the same problem.

                Elke