5 Replies Latest reply on Nov 7, 2008 9:51 AM by janson12

    suggestionbox - wrong rendering

    amoun

      hello!

      i am using a suggestionbox inside a panelgrid:

      <h:panelGrid border="1" columns="3">
      <f:facet name="header">
      <h:outputText value="Bestellung hinzufügen" escape="false" />
      </f:facet>
      <h:outputText value="Company" />
      <h:inputText id="company"
      label="Unternehmen"
      value="#{Order.customer.company}"
      required="true"
      size="20" />
      <rich:suggestionbox for="company"
      height="200"
      width="200"
      suggestionAction="#{Order.autocompleteCompany}"
      var="suggest">
      <h:column>
      <h:outputText value="#{suggest.company}"/>
      </h:column>
      </rich:suggestionbox>
      <h:outputText value="Straße: " escape="false" />
      <h:inputText id="street"
      label="Straße"
      value="#{Order.customer.street}"
      required="true"
      size="30" />
      <rich:message for="street" errorClass="errorMessage">
      <f:facet name="passedMarker">
      <h:graphicImage value="/images/passed.gif" />
      </f:facet>
      <f:facet name="errorMarker">
      <h:graphicImage value="/images/error.gif" />
      </f:facet>
      </rich:message>

      ...

      </h:panelgrid>

      The suggestionbox should appear under the company textbox. Instead it appears on the left top of the page. It seams that the <h:column> will be rendered as an own column in the panelgrid instead as an element of the suggestionbox.
      Take a look: http://www.sls.io/screenshot_suggestionbox.jpg

      any ideas how to solve that?

      - amoun

        • 1. Re: suggestionbox - wrong rendering
          nbelaevski

          Hi,

          Do you use a4j:include?

          • 2. Re: suggestionbox - wrong rendering
            amoun

            yes,

            i am actually using it twice.
            the structure in my web app looks like this:

            *****mainPage*****
            <f:view>
            <h:form id="main">
            <a4j:include viewId="/includes/add.jsp" />
            </h:form>
            </f:view>

            *****add*****
            <rich:tabPanel id="customerOrderProcedure" value="1" switchType="ajax">
            <a4j:keepAlive beanName="Order" ajaxOnly="true" />
            <rich:tab name="1" label="Kunde">
            <a4j:include viewId="chooseCustomer.jsp" />
            </rich:tab>
            <rich:tab name="2" label="Bestellinformationen">
            <a4j:include viewId="addOrder.jsp" />
            </rich:tab>
            <rich:tab name="3" label="Produktauswahl">
            <a4j:include viewId="chooseProducts.jsp" />
            </rich:tab>
            </rich:tabPanel>

            and "chooseCustomer.jsp" contains the code i have already posted..

            - amoun

            • 3. Re: suggestionbox - wrong rendering
              ilya_shaikovsky

              set please ajaxRendered="false" on include component and reRender it explicitly when navigation need only.

              • 4. Re: suggestionbox - wrong rendering
                amoun

                jap, thats it.

                works fine now.

                thank you.

                - amoun

                • 5. Re: suggestionbox - wrong rendering

                  i had the same problem when swtching to 3.2.2.
                  With ajaxRendered="false" the layout problem seemed to be fixed, however, aj4:commandButtons don't work together with faces-navigation now. when i press another h:commandButton the page that should have been loaded by the a4j button is shown then. any clues?