如何在ADF中设置滚动条位置

时间:2013-10-09 07:08:57

标签: oracle-adf jdeveloper

我正在使用JDeveloper 11.1.1.7.0。

我有两个面板的jsff片段。 左侧面板包含链接,右侧面板将根据左侧面板上单击的链接显示数据。

左侧面板中的链接使用迭代器渲染,此迭代器位于panelGroupLayout中,布局=“scroll”。

当我向下滚动到左侧面板的末尾并单击链接时,右侧面板中的内容正在正常加载,但左侧面板的滚动条重置为顶部。因此,我无法在左侧面板中看到所选链接。

有没有办法将滚动条固定在同一位置?

<af:panelGroupLayout id="pgl3" layout="horizontal" valign="top" inlineStyle="height:200px;" styleClass="AFStretchWidth">
    <af:panelGroupLayout layout="scroll" halign="left" id="pgl4" inlineStyle="width:100px;"
        partialTriggers="i1:cl1">
        <af:iterator value="#{pageFlowScope.headerBean.links}" id="i1" var="link">
            <af:commandLink actionListener="#{pageFlowScope.headerBean.linkCliked}" id="cl1" inlineStyle="border: solid 1px black;"
                            partialSubmit="true">
                <af:outputText value="#{link}" id="ot6" 
                               styleClass="selectedLinkStyle"
                               rendered="#{pageFlowScope.headerBean.selectedLink}"/>
                <af:outputText value="#{link}" id="ot7" 
                               styleClass="unselectedLinkStyle"
                               rendered="#{not pageFlowScope.headerBean.selectedLink}"/>
                <f:attribute name="selectedLinkName"
                                         value="#{link}"/>
            </af:commandLink>
        </af:iterator>
    </af:panelGroupLayout>
    <af:panelGroupLayout layout="vertical" styleClass="AFStretchWidth" halign="right"
                         id="pgl5" inlineStyle="border: solid 1px black;height:200px;"
                         partialTriggers="i1:cl1">
        <af:outputText value="#{pageFlowScope.headerBean.linkData} id="ot5"/>
    </af:panelGroupLayout>
</af:panelGroupLayout>

2 个答案:

答案 0 :(得分:0)

尝试删除 pgl4 的partialTriggers属性 或者考虑使用Active Data

答案 1 :(得分:0)

您还可以使用[{3}}所述的scrollComponentIntoViewBehavior,但这是12c中的新功能