p:focus and paginator on datatable

Components, Ajax Framework, Utilities and More.
Post Reply
ianwelch
Posts: 4
Joined: 23 May 2011, 13:33

11 Jul 2011, 11:47

When using the p:focus to get focus on the global filter in a datatable the paginator dissapears and the filter doesn't get activated - so the filter doesn't force the table to show the correct information.

Code: Select all

   <h:form styleClass="jsfcrud_list_form">
                <h:panelGroup id="messagePanel" layout="block">
                    <p:messages id="growl" showDetail="true" autoUpdate="true" />
                </h:panelGroup>
                <p:ajaxStatus >  
                    <f:facet name="start">
                        <p:graphicImage  value="/resources/ajaxloading.gif" />
                    </f:facet> 
                    <f:facet name="complete">    
                        <h:outputText value="" />  
                    </f:facet> 
                </p:ajaxStatus> 
                <h:outputText escape="false" value="#{bundle.ListMechOrdersEmpty}" rendered="#{mechOrdersController.items.rowCount == 0}"/>
                <h:panelGroup rendered="#{mechOrdersController.items.rowCount > 0}">
                    <div style="overflow: auto; width: auto; height: auto">
                        <p:dataTable value="#{mechOrdersController.items}" var="item" style="width: 200%" 
                                     paginator="true" rows="10"
                                     rowStyleClass="#{item.needsAttention == true ? 'needsAttention' : null}"
                                     paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                                     rowsPerPageTemplate="5,10,15,20"  
                                     paginatorAlwaysVisible="false">
                            <p:ajax event="rowEdit" listener="#{mechOrdersController.rowEditListener}" update="growl"/>
                            <f:facet name="header">  
                                <p:outputPanel>  
                                    <h:outputText value="Parts Require Attention:" />  
                                    <p:focus for="globalFilter" />
                                    <p:inputText onfocus="itemsTable.filter()" immediate="true" id="globalFilter"  value="Yes" style="width:150px" />  
                                </p:outputPanel>  
                            </f:facet>
                            <p:column sortBy="#{item.partsNo}" filterBy="#{item.partsNo}" filterMatchMode="contains">
                                <f:facet name="header">
                                    <h:outputText value="#{bundle.ListMechOrdersTitle_partsNo}"/>
                                </f:facet>
                                <h:outputText value="#{item.partsNo}"/>
                            </p:column>
.
.
.
This worked well in primefaces 2.1, is there anything I can do to get it working in 3.0.M2?

Thanks
Ian Welch
Primfaces Version 3.0.M2
JSF 2.0
Glassfish 3.1

Post Reply
  • Information
  • Who is online

    Users browsing this forum: Bing [Bot] and 49 guests