2 Replies Latest reply on May 23, 2007 11:43 AM by Olivier Hanny

    Suggestion box positionning

    Olivier Hanny Newbie

      I'm using a suggestion box and it works well, except that the suggestion box is not displayed under the related input text.
      It looks like the "left" attribute of the div element corresponding to the suggestion box is not correctly calculated (3px instead of 268px)

      Thanks for help if you have an idea.

      Here's my code :

      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
      <%@ taglib uri="http://richfaces.ajax4jsf.org/rich" prefix="rich"%>
      
      <html>
       <head>
       <style type="text/css">
       <!--
       .box1 {
       width: 750px ;
       }
       .centered {
       position: relative;
       text-align: center ;
       margin: auto;
       }
       #box2 table {
       width: 100%;
       }
       -->
       </style>
       </head>
      
       <body>
       <f:view>
       <div class="centered"><div class="box1 centered">
       <div id="box2">
      
       <h:form>
       <h:panelGrid columns="1">
       <h:inputText value="#{suggestionBox.property}" id="text"/>
       <rich:suggestionbox id="suggestionBoxId" for="text" tokens=",["
       rules="#{suggestionBox.rules}"
       suggestionAction="#{suggestionBox.autocomplete}"
       var="result"
       fetchValue="#{result.text}"
       rows="#{suggestionBox.intRows}"
       first="#{suggestionBox.intFirst}"
       minChars="#{suggestionBox.minchars}"
       shadowOpacity="#{suggestionBox.shadowOpacity}"
       border="#{suggestionBox.border}"
       width="#{suggestionBox.width}"
       height="#{suggestionBox.height}"
       shadowDepth="#{suggestionBox.shadowDepth}"
       cellpadding="#{suggestionBox.cellpadding}">
       <h:column>
       <h:outputText value="#{result.text}" />
       </h:column>
       </rich:suggestionbox>
      
       </h:panelGrid>
       </h:form>
      
       </div>
       </div></div>
      
       </f:view>
       </body>
      </html>