【问题标题】:Can not click on Paginator Button无法点击分页器按钮
【发布时间】:2015-09-09 00:28:12
【问题描述】:

我正在使用 JSF 和 Richface 版本 4.3.7 并尝试制作分页器但它们不可点击 :( 我使用了所以第一个和最后一个值可见但它们不可点击。首先我使用 a4j:keepAlive 但看起来像在richface4中无效我是jsf的新手,所以如果你帮助我谢谢我在哪里做错了?

 <ui:composition xmlns="http://www.w3.org/1999/xhtml"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:a4j="http://richfaces.org/a4j"
        xmlns:rich="http://richfaces.org/rich">

    </style>
        <h:form>
        <h:panelGrid columnClasses="acent">
        <rich:dataScroller id="sc2" for="List" reRender="sc1" maxPages="7" page="#{RichLazyDataModelImpl.getCurrentPage()}">
        <f:facet name="first">
                        <h:outputText value= "first" styleClass="scrollerCell"/>
              </f:facet>
              <f:facet name="last">
                        <h:outputText value="Last" styleClass="scrollerCell"/>
              </f:facet>
    </rich:dataScroller>

            <rich:dataTable width="483" id="List" columnClasses="col"
                value="#{RichLazyDataModelImpl.getDataList()}" var="category">
                <f:facet name="header">
                    <rich:columnGroup>
                        <h:column>
                            <h:outputText styleClass="headerText" value="Mobile" />
                        </h:column>
                        <h:column>
                            <h:outputText styleClass="headerText" value="message" />
                        </h:column>
                        <h:column>
                            <h:outputText styleClass="headerText" value="Status" />
                        </h:column>
                        <h:column>
                            <h:outputText styleClass="headerText" value="time" />
                        </h:column>
                    </rich:columnGroup>
                </f:facet>

                <h:column>
                    <h:outputText value="#{category.getMsg_mobile()}" />
                </h:column>
                <h:column>
                    <h:outputText value="#{category.getMessage()}" />
                </h:column>
                <h:column>
                    <h:outputText value="#{category.getDirection()}" />
                </h:column>
                <h:column>
                    <h:outputText value="#{category.getMsg_time()}" />
                </h:column>
            </rich:dataTable>
           </h:panelGrid> 
        </h:form>

    </ui:composition>

【问题讨论】:

  • 你的资源没有被加载,你在用&lt;h:head&gt;吗?
  • Thanx @Makhiel 否 这是整个代码不使用

标签: jsf jsf-2 pagination richfaces


【解决方案1】:

尝试像这样在页脚中使用分页

    <f:facet name="footer">
<rich:dataScroller render="List">
</rich:dataScroller>
</f:facet>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-12-03
    • 1970-01-01
    • 1970-01-01
    • 2020-06-12
    • 2011-07-14
    • 2011-08-20
    • 1970-01-01
    相关资源
    最近更新 更多