7 Replies Latest reply on Nov 6, 2013 3:14 PM by Brian Leathem

    rich:autocomplete doesn't render

    Jordan Baucke Newbie

      I am attempting to include a <rich:autocomplete> tag on my page to perform a predictive search and use an object result to display some information.

       

      The autoCompleteMethod method runs, however, when the result is returned to the page, the usual "popup" of the results rendered doesn't display.

       

      I've also reworked it with a List<String> results - with the same results.

       

      The only components that include autocomplete that seem to function normally is the less-functional b:autoComplete (from Richfaces Bootstrap) any suggestions?

       

      I would post my code - but the editor here is absolutely awful.

        • 1. Re: rich:autocomplete doesn't render
          Brian Leathem Master

          Hard to say without seeing code.  Have you followed the showcase example?

          http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=autocomplete&skin=blueSky

           

          Please file bugs/complaints about your issues with the forum editor:

          https://issues.jboss.org/browse/ORG

          (It's much more meaningful coming from you than us)

          • 2. Re: rich:autocomplete doesn't render
            Jordan Baucke Newbie

            Yes, copy and and pasting the code here doesn't yield much of a result.

             

            However, when the component is rendered I do get the following exception:

            NetworkError: 500 Internal Server Error - http://localhost:8080/rfRes/inputBackgroundImage.png.jsf?v=4.3.1-SNAPSHOT&db=eAFjZL!AwPj!PwMDAxM..."

            I believe this is somehow rated.

             

            I will attempt to post the XHTML markup and the matching code again:

             

            <h:richcomplete autocompleteMethod="#{bean.searchForAccounts}" var="twitter" fetchValue="#{twitter.name}" layout="table">
            
            

             

            public List searchForAccounts(String prefix) throws TwitterException {
                List twitterUserResults = new ArrayList();
                try {
                    twitterUserResults = twitter.searchUsers(prefix, 0);
                } catch (TwitterException e1) {
                    // TODO Auto-generated catch block
                    e1.printStackTrace();
                }
                return twitterUserResults;
            }
            
            
            • 3. Re: rich:autocomplete doesn't render
              Brian Leathem Master

              What version if RichFaces are you using?  What implementation and version of JSF?  Any errors in your server log (include the stacktrace if so)

              • 4. Re: Re: rich:autocomplete doesn't render
                Jordan Baucke Newbie

                RichFaces 4.3.1

                JSF 2.2.0-m13

                 

                It seems there is an error when I attempt to render the component

                 

                
                
                11:39:10,208 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/].[FacesServlet]] (http-localhost-127.0.0.1-8080-1) Servlet.service() for servlet FacesServlet threw exception: java.lang.IllegalArgumentException: Width (2000) and height (0) cannot be <= 0
                  at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknown Source) [rt.jar:1.7.0_25]
                  at java.awt.image.BufferedImage.<init>(Unknown Source) [rt.jar:1.7.0_25]
                  at org.richfaces.resource.ImageType.createARGBImage(ImageType.java:100) [richfaces-core-api-4.3.3.Final.jar:4.3.3.Final]
                  at org.richfaces.resource.ImageType.access$200(ImageType.java:34) [richfaces-core-api-4.3.3.Final.jar:4.3.3.Final]
                  at org.richfaces.resource.ImageType$2.createImage(ImageType.java:44) [richfaces-core-api-4.3.3.Final.jar:4.3.3.Final]
                  at org.richfaces.resource.ImageType.createImage(ImageType.java:115) [richfaces-core-api-4.3.3.Final.jar:4.3.3.Final]
                  at org.richfaces.resource.Java2DUserResourceWrapperImpl.paintAndWrite(Java2DUserResourceWrapperImpl.java:154) [richfaces-core-impl-4.3.3.Final.jar:4.3.3.Final]
                  at org.richfaces.resource.Java2DUserResourceWrapperImpl.getInputStream(Java2DUserResourceWrapperImpl.java:64) [richfaces-core-impl-4.3.3.Final.jar:4.3.3.Final]
                  at org.richfaces.resource.CachedResourceImpl.initialize(CachedResourceImpl.java:176) [richfaces-core-impl-4.3.3.Final.jar:4.3.3.Final]
                  at org.richfaces.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:173) [richfaces-core-impl-4.3.3.Final.jar:4.3.3.Final]
                  at javax.faces.webapp.FacesServlet.service(FacesServlet.java:637) [jsf-api-2.2.0-m03.jar:2.2.0-m03-]
                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]
                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
                  at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]
                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
                  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]
                  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]
                  at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
                  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]
                  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]
                  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]
                  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]
                  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]
                  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]
                  at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
                  at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_25]
                
                • 5. Re: Re: rich:autocomplete doesn't render
                  Brian Leathem Master

                  Can you try with JSF 2.1?

                  • 6. Re: Re: rich:autocomplete doesn't render
                    Jordan Baucke Newbie

                    I'm not directly responsible for choosing the versions of JSF we use - I can try it on my personal machine but don't know if I can have the entire project downgraded-

                    • 7. Re: rich:autocomplete doesn't render
                      Brian Leathem Master

                      I meant moreso just as a check.  If it works on 2.1 but not 2.2 then we have a better idea of where the issue lies.