10 Replies Latest reply on Sep 10, 2013 1:33 PM by bleathem

    autocomplete in ui:include

    wrdlprmpft

      I am struggling since some time now with issue RF-11469, which is set up for version 4.0.0, but seems still affecting version 4.2.2. The latter seems to me the latest version usable with Seam 2.3 - isn't it?

      I need to stick to Seam 2.x to avoid a large migration project. On the other side I have to adapt to GoogleMaps v3 by using gmaps4jsf 3.0.0, which again requires JSF 2.0. Thus it seems to me that RF 4.2.2. is the only version supporting both these requirements. Is this true?

       

      In order to avoid heavy work load on each revision of RF in future I want to encapsulate component calls to ui:includes.

      Here is my example with the rich:autocomplete:

       

      <ui:component xmlns="http://www.w3.org/1999/xhtml"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:a4j="http://richfaces.org/a4j"
          xmlns:rich="http://richfaces.org/rich"
          xmlns:s="http://jboss.com/products/seam/taglib">
      
      
          <rich:autocomplete id="#{attribute}" mode="cachedAjax" autofill="false" 
              autocompleteList="#{suggestions}" var="suggestion" showButton="true"
              value="#{value}" 
              onmouseover="setField('#{attribute}')"
              onfocus="#{rich:component(attribute)}.setValue(' ');"
              onkeydown="if (#{rich:component(attribute)}.getValue() == ' ') #{rich:component(attribute)}.setValue('');"
              onkeyup="setValue(value)" layout="table">
              
              <a4j:ajax event="keyup" execute="#{suggestionMethod}"
                  render="#{attribute}" />
              <a4j:ajax event="selectitem" ajaxSingle="true"
                  render="#{backing.renderForms}" action="#{backing.checkValue}"
                  oncomplete="javascript:if(#{backing.newEntry}==true) 
                                 {document.getElementById('#{backing.checkEditPanel}').component.show();}">
              </a4j:ajax>
      
          </rich:autocomplete>
      
      </ui:component>
      

       

       

      and its inclusion

       

               <ui:include src="/layout/controlTemplates/comboBox.xhtml">
                      <ui:param name="attribute" value="institutionName" />
                      <ui:param name="value" value="#{addressBacking.institutionName}" />
                      <ui:param name="suggestions"
                          value="#{addressBacking.institutionNames}" />
                      <ui:param name="suggestionMethod" value="#{addressBacking.getInstitutionNames()}" />
                </ui:include>
      

       

      Because of issue RF-11469, I cannot use the autocompleteMethod of the rich:autocomplete tag. Yet the autocomplete list does it. I found a work around to get similar functionality as autocompleteMethod using the a4j:ajax executing the suggestion method and transferring the value to the bean onkeyup. But it seems now I found a further issue. I get the drop down list displayed, but on selecting an item I either get no value or a different value selected than selected in the list into my field. This is not the case, when I use it not included and with the autocompleteMethod.

      Is there a known issue - has anybody an idea what is the reason for that. Do I need something like an f:setPropertyActionListener, as I had with suggestion box, but this is also not working with rich:autocomplete (cf. here)

       

      I would be grateful for any advice

       

      Thanks in advance

       

      Chris

        • 1. Re: autocomplete in ui:include
          bleathem

          What version of JSF are you using?  Early releases of Mojarra 2.1.x had some issues with ui:include.  Also, you could achieve a similar result with composite components if updating your JSF install doesn't fix the problem with the ui:include.

          1 of 1 people found this helpful
          • 2. Re: autocomplete in ui:include
            wrdlprmpft

            Thanks, Brian, for your hint.

             

            When starting, it tells me, that I have Mojarra 2.1.7-jbossorg-1 (20120227). It came with RichFaces 4.2.2.Final and from a SeamGen autogenerated project with Seam 2.3.0.Final. I need something still compatible with Seam 2.x (currently I try to upgrade to Seam 2.3.0.Final). Which RichFaces version or what else updates would you suggest?

             

            Is there an example available, how to achieve a similar include with composite components? I would have following requirements:

            1. The component can be used on multiple places within multiple pages.

            2. It needs to be completed with parameters for identifiers (multiple use in a page) and bean calls from the parent page.

             

            Thanks again

             

            Chris

            • 3. Re: autocomplete in ui:include
              bleathem

              Try using JBoss EAP 6.1 (http://www.jboss.org/products/eap), it will get you Mojarra 2.1.19, which has many fixes in place compared to 2.1.7.

               

              I'd recommend using RichFaces 4.3.2.Final.  There are no restricitons on which RF 4 version you use with Seam 2.3.x as far as I know.

              • 4. Re: autocomplete in ui:include
                manarh

                Yes, Brian is right, the best option is Seam 2.3.1.CR1 with the latest Richfaces 4.3.2.Final. Seam-gen uses some version of JSF2, but it can be updated/changed if you find newer.

                • 5. Re: autocomplete in ui:include
                  wrdlprmpft

                  Dear Brian and Marek, many thanks for your recommendations,

                   

                  First of all it is good to see, that Seam 2.3 is further maintained (the last release is only a few days old). I'm very happy to see that, because I very much liked, what SeamGen autogenerated as a starting point for the development. Basically as a pure application developer I even see roughly another chance to compile a working JEE development project than having such a compilation tool. It is all way too complicated and error prone.

                  I would have many ideas, how more functionality could be autogenerated with the SeamGen tool, but as I heard, it shall be replaced with JBoss Forge, with again a very different concept.

                   

                  Regarding the EAP6.1. I am not sure, that applications developed on that basis can be freely distributed. Thus I first tried to look into upgrade to Seam 2.3.1.CR1 and Richfaces 4.3.2.Final.

                   

                  Unfortunately I had to learn that the "Upgrade to Mojarra 2.1.19" (cf here) is by far not done with upgrade of one or both of these. It is hard to find comprehensive documentation in the web, which dependencies and configurations are necessary for this upgrade, and it seems to affect not only the project, but also the jboss as 7.1.1 (or using another as version 2.0? but this upgrade cycles seem never to end up). It seems many things have grown much more complicated with Jboss AS 7 (cf here). Here the configuration seems even duplicated over two directories: modules/com/sun/jsf-impl/main and modules/javax/faces/api/main. Into both of them you have to put jsf jars and adapt the module.xml. Now, as it is provided with the AS I would consider it logic, that I can throw out the jsf libraries in the project lib. But then I get

                   

                  java.lang.ClassNotFoundException: com.google.common.base.Function

                   

                   

                  Just including again the jsf libraries did not help. I had to check for further dpendencies (cf here):

                  sac-1.3,

                  cssparser-0.9.5

                  google-guava-r08

                  annotations.jar

                  validation-api.jar

                   

                  The error message points to google guava, but I had guava-13.0.1.jar, as already mentioned in

                  So from former experience I tried to rename guava-13.0.1.jar to guava.jar.

                   

                  It seems it helps. But now I have to send this reply because I have to restart my computer.

                   

                  Thanks again

                  Chris

                  • 6. Re: autocomplete in ui:include
                    wrdlprmpft

                    I have now got Mojarra 2.1.19 running:

                     

                    [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-2) Mojarra 2.1.19 ( 20130213-1512 https://svn.java.net/svn/mojarra~svn/tags/2.1.19@11614)

                     

                    But it seems thaat issue RF-11469 is not resolved in Richfaces 4.3.2.Final/Mojarra 2.1.19.

                    I have modified a bit my component to make it more simple and transparent and referring by that to be sure about the syntax.

                     

                    <ui:component xmlns="http://www.w3.org/1999/xhtml"

                        xmlns:ui="http://java.sun.com/jsf/facelets"

                        xmlns:f="http://java.sun.com/jsf/core"

                        xmlns:h="http://java.sun.com/jsf/html"

                        xmlns:a4j="http://richfaces.org/a4j"

                        xmlns:rich="http://richfaces.org/rich"

                        xmlns:s="http://jboss.com/products/seam/taglib">

                     

                        <h:panelGrid columns="4"

                            rendered="#{(rendered!=null) ? rendered : true}">

                     

                            <h:outputText value="#{backing}" />

                            <br />

                            <h:outputText value="#{backing.places}" />

                            <br />

                     

                            <h:commandButton value="clear" onmousedown="setField('#{attribute}')"

                                action="#{backing[clearMethod]}" disabled="#{backing.disabled}"

                                reRender="#{backing.renderForms}" />

                     

                            <rich:autocomplete id="#{attribute}" mode="cachedAjax"

                                autofill="false" autocompleteMethod="#{backing[suggestionMethod]}"

                                var="suggestion" showButton="true" fetchvalue="#{value}"

                                onmouseover="setField('#{attribute}')"

                                onfocus="#{rich:component(attribute)}.setValue('  ');"

                                onkeydown="if (#{rich:component(attribute)}.getValue() == ' ') #{rich:component(attribute)}.setValue('');">

                     

                            </rich:autocomplete>

                     

                        </h:panelGrid>

                     

                    </ui:component>

                     

                    and the call

                     

                     

                              <ui:include src="/layout/controlTemplates/comboBox.xhtml">

                                   <ui:param name="backing" value="#{addressBacking}" />

                                    <ui:param name="suggestionMethod" value="getInstitutionNames" />

                                    <ui:param name="clearMethod" value="clearInstitutionName" />

                                    <ui:param name="attribute" value="institutionName" />

                                    <ui:param name="value" value="#{addressBacking.institutionName}" />

                                </ui:include>

                     

                     

                     

                     

                    and the backing:

                     

                     

                    @Name("addressBacking")

                    @SuppressWarnings({ "unused" })

                    @Scope(ScopeType.CONVERSATION)

                    public class AddressBacking extends CRUDBacking {


                        public List<String> getInstitutionNames() {

                            return institutionNames;

                        }

                        public List<String> getInstitutionNames(String input) {

                            log.info("AddressBacking.getInstitutionNames for " + input);

                            institutionNames = addressValueListService

                                    .generateInstitutionNames(input);

                            return institutionNames;

                        }

                     

                        public void setInstitutionNames(List<String> institutionNames) {

                            this.institutionNames = institutionNames;

                        }

                     

                       public void clearInstitutionName() {

                           

                            log.info("clearInstitutionName called");

                            clearFromInstitutionName(true);

                        }


                       public List<String> suggest(String input) {

                     

                            log.info(

                                    "AddressBacking.suggest: conversation=#0, this=#1 attribute =#2 ",

                                    conversation, this, attribute);

                     

                            addressValueListService.setListTemplate(editing

                                    || (editedAddress == null) ? new Address() : editedAddress

                                    .clone());

                        

                             ...

                        }

                     

                    }

                     

                    When pressing the clear button, the log clearly indicates that the proper method is called. When clicking to the autocomplete button, I receive the error message indicating that backing is resolved to null (= RF-11469)

                     

                    14:20:48,246 INFO  [de.bund.jki.idbbSeam23.action.address.backing.AddressBacking] (http--0.0.0.0-8080-1) AddressBacking.setAttribute: conversation=org.jboss.seam.core.Conversation@6bb60e9a, this=de.bund.jki.idbbSeam23.action.address.backing.AddressBacking@4ab69761, attribute=institutionName

                    14:20:48,289 INFO  [de.bund.jki.idbbSeam23.action.address.backing.AddressBacking] (http--0.0.0.0-8080-4) clearInstitutionName called

                    14:20:48,291 INFO  [de.bund.jki.idbbSeam23.action.address.service.AddressService] (http--0.0.0.0-8080-4) AddressService.getEdited: edited.place = null

                    14:20:50,134 INFO  [de.bund.jki.idbbSeam23.action.address.backing.AddressBacking] (http--0.0.0.0-8080-4) AddressBacking.setAttribute: place

                    14:20:50,137 INFO  [de.bund.jki.idbbSeam23.action.address.backing.AddressBacking] (http--0.0.0.0-8080-4) AddressBacking.setAttribute: conversation=org.jboss.seam.core.Conversation@6bb60e9a, this=de.bund.jki.idbbSeam23.action.address.backing.AddressBacking@4ab69761, attribute=place

                    14:20:55,716 SCHWERWIEGEND [org.richfaces.log.Renderkit] (http--0.0.0.0-8080-4) Target Unreachable, identifier 'backing' resolved to null: javax.el.PropertyNotFoundException: Target Unreachable, identifier 'backing' resolved to null

                        at org.jboss.el.parser.AstValue.getTarget(AstValue.java:38) [jboss-el.jar:1.0_02.CR6]

                        at org.jboss.el.parser.AstValue.invoke(AstValue.java:95) [jboss-el.jar:1.0_02.CR6]

                        at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276) [jboss-el.jar:1.0_02.CR6]

                        at org.richfaces.renderkit.AutocompleteRendererBase.getItems(AutocompleteRendererBase.java:108) [richfaces-components-ui.jar:4.3.2.Final]

                        at org.richfaces.renderkit.AutocompleteRendererBase.encodeItems(AutocompleteRendererBase.java:163) [richfaces-components-ui.jar:4.3.2.Final]

                        at org.richfaces.renderkit.AutocompleteRendererBase.encodeMetaComponent(AutocompleteRendererBase.java:275) [richfaces-components-ui.jar:4.3.2.Final]

                        at org.richfaces.component.AbstractAutocomplete.encodeMetaComponent(AbstractAutocomplete.java:405) [richfaces-components-ui.jar:4.3.2.Final]

                        at org.richfaces.context.ExtendedPartialViewContextImpl$RenderVisitCallback.visit(ExtendedPartialViewContextImpl.java:546) [richfaces-core-impl.jar:4.3.2.Final]

                        at org.richfaces.context.BaseExtendedVisitContext.invokeVisitCallback(BaseExtendedVisitContext.java:321) [richfaces-core-impl.jar:4.3.2.Final]

                        at org.richfaces.context.ExtendedVisitContext.invokeMetaComponentVisitCallback(ExtendedVisitContext.java:68) [richfaces-core-api.jar:4.3.2.Final]

                        at org.richfaces.component.AbstractAutocomplete.visitTree(AbstractAutocomplete.java:391) [richfaces-components-ui.jar:4.3.2.Final]

                        at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jsf-api-2.1.19.jar:2.1]

                        at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jsf-api-2.1.19.jar:2.1]

                        at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jsf-api-2.1.19.jar:2.1]

                        at javax.faces.component.UIForm.visitTree(UIForm.java:371) [jsf-api-2.1.19.jar:2.1]

                        at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jsf-api-2.1.19.jar:2.1]

                        at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jsf-api-2.1.19.jar:2.1]

                        at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jsf-api-2.1.19.jar:2.1]

                        at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jsf-api-2.1.19.jar:2.1]

                        at javax.faces.component.UIForm.visitTree(UIForm.java:371) [jsf-api-2.1.19.jar:2.1]

                        at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jsf-api-2.1.19.jar:2.1]

                        at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jsf-api-2.1.19.jar:2.1]

                        at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jsf-api-2.1.19.jar:2.1]

                        at org.richfaces.context.ExtendedPartialViewContextImpl.processPartialRenderPhase(ExtendedPartialViewContextImpl.java:310) [richfaces-core-impl.jar:4.3.2.Final]

                        at org.richfaces.context.ExtendedPartialViewContextImpl.processPartial(ExtendedPartialViewContextImpl.java:213) [richfaces-core-impl.jar:4.3.2.Final]

                        at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:973) [jsf-api-2.1.19.jar:2.1]

                        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779) [jsf-api-2.1.19.jar:2.1]

                        at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:413) [jsf-impl-2.1.19.jar:2.1.19]

                        at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:124) [jsf-impl-2.1.19.jar:2.1.19]

                        at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:88) [jboss-seam.jar:2.3.0.Final]

                        at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:286) [jsf-api-2.1.19.jar:2.1]

                        at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120) [jsf-impl-2.1.19.jar:2.1.19]

                        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.19.jar:2.1.19]

                        at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) [jsf-impl-2.1.19.jar:2.1.19]

                        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594) [jsf-api-2.1.19.jar:2.1]

                        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.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) [jboss-seam.jar:2.3.0.Final]

                        at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60) [jboss-seam.jar:2.3.0.Final]

                        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Final]

                        at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40) [jboss-seam.jar:2.3.0.Final]

                        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Final]

                        at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90) [jboss-seam.jar:2.3.0.Final]

                        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Final]

                        at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64) [jboss-seam.jar:2.3.0.Final]

                        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Final]

                        at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) [jboss-seam.jar:2.3.0.Final]

                        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Final]

                        at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53) [jboss-seam.jar:2.3.0.Final]

                        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Final]

                        at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) [jboss-seam.jar:2.3.0.Final]

                        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.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:397) [jbossweb-7.0.13.Final.jar:]

                        at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

                        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(Thread.java:662) [rt.jar:1.6.0_22]

                     

                    I also tried other ways of parameter transfer:

                     

                    with

                    autocompleteMethod="#{backing.suggest}"

                     

                    I get the same error message.

                     

                    If I try to transfer the whole method call, the best - but still not a usable result I get with

                     





                    <ui:param name="suggestionMethod" value="#{addressBacking.getInstitutionNames(value)}" />

                     

                    and

                     

                    autocompleteMethod="#{suggestionMethod}"

                     

                    Here I get at least the method and a SQL to the database called, but then it again breaks again with an error message:

                     

                    Identity 'suggestionMethod' does not reference a MethodExpression instance, returned type: java.util.ArrayList: javax.el.ELException:

                     

                     

                    15:23:10,082 INFO  [de.bund.jki.idbbSeam23.action.address.backing.AddressBacking] (http--0.0.0.0-8080-2) AddressBacking.getInstitutionNames for

                    15:23:10,083 INFO  [de.bund.jki.idbbSeam23.action.address.service.AddressValueListService] (http--0.0.0.0-8080-2) AddressValueListService.generateInstitutionNames: value =

                    15:23:10,088 INFO  [de.bund.jki.idbbSeam23.action.address.dao.AddressQuery] (http--0.0.0.0-8080-2) AddressQuery.selectAttribute: selectString = select distinct example.institutionName from Address example where example.institutionName is not null

                    15:23:10,089 INFO  [de.bund.jki.idbbSeam23.action.address.service.AddressValueListService] (http--0.0.0.0-8080-2) AddressValueListService.queryAttributeValueList: value =

                    15:23:10,091 INFO  [de.bund.jki.idbbSeam23.action.address.dao.AddressQuery] (http--0.0.0.0-8080-2) AddressQuery.requery: selectString = select distinct example.institutionName from Address example where example.institutionName is not null

                    15:23:10,092 INFO  [de.bund.jki.idbbSeam23.action.address.dao.AddressQuery] (http--0.0.0.0-8080-2) AddressQuery.requery: sqlString = select distinct example.institutionName from Address example where example.institutionName is not null

                    15:23:10,182 INFO  [de.bund.jki.idbbSeam23.action.address.dao.AddressQuery] (http--0.0.0.0-8080-2) AddressQuery.requery: rendered Ejbql = select distinct example.institutionName from Address example where example.institutionName is not null order by example.institutionName

                    15:23:10,273 INFO  [stdout] (http--0.0.0.0-8080-2) Hibernate:

                    15:23:10,276 INFO  [stdout] (http--0.0.0.0-8080-2)     select

                    15:23:10,276 INFO  [stdout] (http--0.0.0.0-8080-2)         *

                    15:23:10,278 INFO  [stdout] (http--0.0.0.0-8080-2)     from

                    15:23:10,279 INFO  [stdout] (http--0.0.0.0-8080-2)         ( select

                    15:23:10,279 INFO  [stdout] (http--0.0.0.0-8080-2)             count(*) as col_0_0_

                    15:23:10,279 INFO  [stdout] (http--0.0.0.0-8080-2)         from

                    15:23:10,279 INFO  [stdout] (http--0.0.0.0-8080-2)             idbb.ADDRESS address0_

                    15:23:10,280 INFO  [stdout] (http--0.0.0.0-8080-2)         where

                    15:23:10,282 INFO  [stdout] (http--0.0.0.0-8080-2)             address0_.INSTITUTION is not null )

                    15:23:10,283 INFO  [stdout] (http--0.0.0.0-8080-2)     where

                    15:23:10,283 INFO  [stdout] (http--0.0.0.0-8080-2)         rownum <= ?

                    15:23:10,370 INFO  [stdout] (http--0.0.0.0-8080-2) Hibernate:

                    15:23:10,371 INFO  [stdout] (http--0.0.0.0-8080-2)     select

                    15:23:10,373 INFO  [stdout] (http--0.0.0.0-8080-2)         distinct address0_.INSTITUTION as col_0_0_

                    15:23:10,376 INFO  [stdout] (http--0.0.0.0-8080-2)     from

                    15:23:10,376 INFO  [stdout] (http--0.0.0.0-8080-2)         idbb.ADDRESS address0_

                    15:23:10,376 INFO  [stdout] (http--0.0.0.0-8080-2)     where

                    15:23:10,377 INFO  [stdout] (http--0.0.0.0-8080-2)         address0_.INSTITUTION is not null

                    15:23:10,377 INFO  [stdout] (http--0.0.0.0-8080-2)     order by

                    15:23:10,377 INFO  [stdout] (http--0.0.0.0-8080-2)         address0_.INSTITUTION

                    15:23:10,482 SCHWERWIEGEND [org.richfaces.log.Renderkit] (http--0.0.0.0-8080-2) /layout/controlTemplates/comboBox.xhtml @24,111 autocompleteMethod="#{suggestionMethod}": Identity 'suggestionMethod' does not reference a MethodExpression instance, returned type: java.util.ArrayList: javax.el.ELException: /layout/controlTemplates/comboBox.xhtml @24,111 autocompleteMethod="#{suggestionMethod}": Identity 'suggestionMethod' does not reference a MethodExpression instance, returned type: java.util.ArrayList

                        at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:111) [jsf-impl-2.1.19.jar:2.1.19]

                        at org.richfaces.renderkit.AutocompleteRendererBase.getItems(AutocompleteRendererBase.java:102) [richfaces-components-ui.jar:4.3.2.Final]

                        at org.richfaces.renderkit.AutocompleteRendererBase.encodeItems(AutocompleteRendererBase.java:163) [richfaces-components-ui.jar:4.3.2.Final]

                        at org.richfaces.renderkit.AutocompleteRendererBase.encodeMetaComponent(AutocompleteRendererBase.java:275) [richfaces-components-ui.jar:4.3.2.Final]

                        at org.richfaces.component.AbstractAutocomplete.encodeMetaComponent(AbstractAutocomplete.java:405) [richfaces-components-ui.jar:4.3.2.Final]

                        at org.richfaces.context.ExtendedPartialViewContextImpl$RenderVisitCallback.visit(ExtendedPartialViewContextImpl.java:546) [richfaces-core-impl.jar:4.3.2.Final]

                        at org.richfaces.context.BaseExtendedVisitContext.invokeVisitCallback(BaseExtendedVisitContext.java:321) [richfaces-core-impl.jar:4.3.2.Final]

                        at org.richfaces.context.ExtendedVisitContext.invokeMetaComponentVisitCallback(ExtendedVisitContext.java:68) [richfaces-core-api.jar:4.3.2.Final]

                        at org.richfaces.component.AbstractAutocomplete.visitTree(AbstractAutocomplete.java:391) [richfaces-components-ui.jar:4.3.2.Final]

                        at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jsf-api-2.1.19.jar:2.1]

                        at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jsf-api-2.1.19.jar:2.1]

                        at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jsf-api-2.1.19.jar:2.1]

                        at javax.faces.component.UIForm.visitTree(UIForm.java:371) [jsf-api-2.1.19.jar:2.1]

                        at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jsf-api-2.1.19.jar:2.1]

                        at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jsf-api-2.1.19.jar:2.1]

                        at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jsf-api-2.1.19.jar:2.1]

                        at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jsf-api-2.1.19.jar:2.1]

                        at javax.faces.component.UIForm.visitTree(UIForm.java:371) [jsf-api-2.1.19.jar:2.1]

                        at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jsf-api-2.1.19.jar:2.1]

                        at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jsf-api-2.1.19.jar:2.1]

                        at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) [jsf-api-2.1.19.jar:2.1]

                        at org.richfaces.context.ExtendedPartialViewContextImpl.processPartialRenderPhase(ExtendedPartialViewContextImpl.java:310) [richfaces-core-impl.jar:4.3.2.Final]

                        at org.richfaces.context.ExtendedPartialViewContextImpl.processPartial(ExtendedPartialViewContextImpl.java:213) [richfaces-core-impl.jar:4.3.2.Final]

                        at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:973) [jsf-api-2.1.19.jar:2.1]

                        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779) [jsf-api-2.1.19.jar:2.1]

                        at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:413) [jsf-impl-2.1.19.jar:2.1.19]

                        at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:124) [jsf-impl-2.1.19.jar:2.1.19]

                        at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:88) [jboss-seam.jar:2.3.0.Final]

                        at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:286) [jsf-api-2.1.19.jar:2.1]

                        at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120) [jsf-impl-2.1.19.jar:2.1.19]

                        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.19.jar:2.1.19]

                        at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) [jsf-impl-2.1.19.jar:2.1.19]

                        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594) [jsf-api-2.1.19.jar:2.1]

                        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.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) [jboss-seam.jar:2.3.0.Final]

                        at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60) [jboss-seam.jar:2.3.0.Final]

                        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Final]

                        at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40) [jboss-seam.jar:2.3.0.Final]

                        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Final]

                        at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90) [jboss-seam.jar:2.3.0.Final]

                        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Final]

                        at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64) [jboss-seam.jar:2.3.0.Final]

                        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Final]

                        at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) [jboss-seam.jar:2.3.0.Final]

                        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Final]

                        at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53) [jboss-seam.jar:2.3.0.Final]

                        at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Final]

                        at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) [jboss-seam.jar:2.3.0.Final]

                        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.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:397) [jbossweb-7.0.13.Final.jar:]

                        at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

                        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(Thread.java:662) [rt.jar:1.6.0_22]

                     

                    Conclusion:

                    The upgrade of Richfaces/JSF to 4.3.2.Final/Mojarra 2.1.19 does obviously not relolve issue RF-11469. The use of <rich:autocomplete/> in a component included with <ui:include/> is still not possible.

                     

                    I would be very grateful, if I would get notified on the availability of a version with this issue resolved or a viable work around.

                     

                    Best wishes and thanks again

                    Chris

                    • 7. Re: autocomplete in ui:include
                      cadubad

                      Try to create the code below in any place in your code. I place it in my footer.xhtml. It's worked for me.

                       

                      <h:selectOneMenu rendered="false" >

                                                              <f:ajax />

                                                    </h:selectOneMenu>

                      • 8. Re: autocomplete in ui:include
                        bleathem

                        We are having some trouble reproducing this issue in the referenced jira (RF-11469).

                         

                        What if you change the scope of your backing bean to a non Seam scope (ie a JSF 2 native scope).  Does that help?  (knowing this would help narrow down/isolate the problem).

                        • 9. Re: autocomplete in ui:include
                          wrdlprmpft

                          Brian, thanks a lot for your request and that you are still dealing with that. I was a bit out of it during the last weeks. Indeed you are challenging me, as I never wrote a JSF application without Seam.

                          Using not a Seam scope it seems to me I have to annotate my backing with @ManagedBean and e.g. @SessionScoped. But I run into several problems of non accessible properties with that. Also I do not know, whether I would need to create a different project (e.g. new JSF Project), because all my configuration files are for using Seam.

                          Do you have in mind a simple solution to implement what you are suggesting?

                          Thanks in advance

                          Chris

                          • 10. Re: autocomplete in ui:include
                            bleathem

                            try starting with the RichFaces "simpleapp" archetype to build a reproducer without any extraneous dependencies.

                             

                            See: http://maven.apache.org/guides/introduction/introduction-to-archetypes.html