1

selectInputText我的jsf页面中有一个在<ice:panelPopup单击按钮时被调用的页面。

我面临的问题是 selectInputText 具有自动完成列表,并且该列表显示在我的 jsf 页面的右下角。如何使自动完成列表显示在 selectInputText 的正下方。下面是我的 selectInputText 的屏幕截图 你可以看到我的列表出现在右下角,但我已经将列表值显示为灰色。

问候

我的 jspx 中的代码

<h:panelGrid id="popupBody2" width="100%" cellpadding="0" cellspacing="0" column="1">
                <ice:form id="frm">                                        
                 <tr>
<td>
                        <h:outputText value="Select City" />                        
                          <ice:selectInputText rows="10" width="300"
                        listVar="city"
                        valueChangeListener="#{bean.method}"
                        listValue="#{bean.list}">
                         <f:facet name="selectInputText">
                   <ice:panelGrid columns="3" columnClasses="cityCol">
                         <ice:outputText value="#city.state}"/>                           
                   </ice:panelGrid>
  </f:facet>
          </ice:selectInputText>           
                    <ice:panelGrid columns="2">                        
                        <ice:outputText id="country" 
                                      visible="false"  value="#{bean.currentCity.country}"/>                       
                    </ice:panelGrid>

更新 1

<f:view xmlns:h="http://java.sun.com/jsf/html"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:ice="http://www.icesoft.com/icefaces/component"
        xmlns:t="http://myfaces.apache.org/tomahawk">
        <ice:outputDeclaration doctypeRoot="HTML"
                doctypePublic="-//W3C//DTD HTML 4.01 Transitional//EN"
                doctypeSystem="http://www.w3.org/TR/html4/loose.dtd" />              
        <html>
        <head>

        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></meta>
        <title>Employees List</title>
        <link rel='stylesheet' type='text/css' href='./xmlhttp/css/xp/xp.css' />
        </head>

更新 2

一个

4

2 回答 2

1

因此我还不能直接发表评论(<50 rep),我将其发布为答案。正如 BalusC 所说,1.8.2 中存在一个错误,导致在 IE8 的其他地方呈现建议列表。这是关于相对/绝对定位的问题。所以解决方案是覆盖 .css 的位置属性iceSelInpTxtList。或者,您可以尝试修改封闭容器(更改位置属性)。我会提供我们的解决方案,但目前我无法访问和搜索代码。

于 2012-02-02T11:58:41.690 回答
1

这可能会帮助你http://jforum.icesoft.org/JForum/posts/list/16636.page

但我发现它只适用于 ie7,所以我稍微更改了代码以在 ie7、8、9 中工作。这是我的代码

if (Prototype.Browser.IE || navigator.userAgent.indexOf("MSIE 8") > -1) {
                                       var savedPos = element.style.position;
                                       element.style.position = "relative";
                                       update.style.left = element.offsetLeft + "px";
                                       update.style.top = (element.offsetTop + element.offsetHeight) + "px";
                                       element.style.position = savedPos;
                                   }
于 2012-08-31T07:36:53.967 回答