1

当鼠标悬停时,我试图突出显示表格的行。这是代码:

<div style="position: relative; top: 120px; left: 300px">
        <h:panelGrid columns="2">

            <h:form>


                <rich:extendedDataTable onrowmouseover ="this.style.backgroundColor='yellow'"
                            onrowmouseout="this.style.backgroundColor='white'"  value="#{moneyTransferManager.allAccounts}" var="accounts"
                                         selection="#{extTableSelectionBean.selection}" id="table" frozenColumns="2"
                                         style="height:170px; width:484px;">
                    <a4j:ajax execute="@form" event="selectionchange" listener="#{extTableSelectionBean.selectionListener}"
                              render=":res"/>
                    <f:facet name="header">
                        <h:outputText value="Hesaplarım"/>
                    </f:facet>
                    <rich:column width="120px;">
                        <f:facet name="header">
                            <h:outputText value="Hesap Numarası"/>
                        </f:facet>
                        <h:outputText value="#{accounts.accountNumber}"/>
                    </rich:column>
                    <rich:column width="120px;">
                        <f:facet name="header">
                            <h:outputText value="Para Birimi"/>
                        </f:facet>
                        <h:outputText value="#{accounts.accountCurrency}"/>
                    </rich:column>
                    <rich:column width="120px;">
                        <f:facet name="header">
                            <h:outputText value="IBAN"/>
                        </f:facet>
                        <h:outputText value="#{accounts.iban}"/>
                    </rich:column>
                    <rich:column width="120px;">
                        <f:facet name="header">
                            <h:outputText value="Bakiye"/>
                        </f:facet>
                        <h:outputText value="#{accounts.balance}"/>
                    </rich:column>
                </rich:extendedDataTable>
            </h:form>
            <a4j:outputPanel id="res">
                <rich:panel header="Seçilen Hesap:" rendered="#{not empty extTableSelectionBean.selectionItems}">
                    <rich:list type="unordered" value="#{extTableSelectionBean.selectionItems}" var="sel">
                        <h:outputText value="#{sel.accountCurrency} - #{sel.iban} - #{sel.balance}"/>
                    </rich:list>
                </rich:panel>
            </a4j:outputPanel>



            <rich:panel styleClass="top">
                <div style="position: relative; left: -3px; top: 23px">
                    <h:outputText style=" font-size: 12px; font-weight: bold; " value="Yapmak istediğiniz işlem .."></h:outputText>  
                </div>
                <h:form>
                    <div style="position: relative; left: 160px; top: -3px">
                        <rich:select value="#{transactionManager.selection}" defaultLabel="Bir işlem seçin...">
                            <f:selectItem  itemValue="0" itemLabel="Hesap Hareketlerini Listele" />  
                        </rich:select>    

                    </div>
                    <div style="position: relative; left: 380px; top: -22px">
                        <h:commandButton action="#{transactionManager.accountActivity()}" value="Devam" style="color: #000000; font-weight: bold; width: 70px; height: 21px; background-color: grey; -moz-border-radius: 0px; -webkit-border-radius: 15px;"></h:commandButton>
                    </div>
                </h:form>  
            </rich:panel>



        </h:panelGrid>

    </div>

问题是,只有 1-2 列或 3-4 列一起突出显示,如下所示:

在此处输入图像描述

谁能告诉我这个问题?谢谢

4

1 回答 1

1

这是由frozenColumns属性引起的。如果要选择所有行,请将其删除。

于 2013-07-16T21:22:44.737 回答