3 Replies Latest reply on Jun 9, 2015 6:06 AM by Michal Petrov

    rich:dataScroller : Ajax call is not working in websphere.

    pradeep panda Newbie

      Hi Team

       

      I am trying the below code for rich:dataScroller inside rich:dataTable having an ajax call using a4j:ajax(see in bold part) which is working fine in tomcat but it did not work when I deployed the same on websphere. I mean the ajax call is not happening to refresh the dataTable on the page number change. Please look at the below code and highlighted part in bold. Currently using richface4.5.5 version

       

       

      <h:form id="extdform">

        <h:panelGrid id="extdgrid" columns="2"

        styleClass="otContentAreaAlign">

        <rich:dataTable styleClass="tables" id="wrList2" rows="#{tableManagedBean.rows}"  var="worldRecord" value="#{tableManagedBean.worldRecords}" rowClasses="odd,even">

                                      <f:facet name="header" id="filterheaderfacet">

                                          <rich:columnGroup id="filtergroup">

                                              <rich:column id="filtereventcoulmn">

                                                  <h:outputText id="filtereventcolumnvalue" value="Event"/>

                                              </rich:column>

                                              <rich:column id="filterperfcolumn">

                                                  <h:outputText id="filterperfcolumnvalue" value="Performance"/>

                                              </rich:column>

                                              <rich:column id="filterathletecolumn">

                                                  <h:outputText id="filterathletecolumnvalue" value="Athlete name"/>

                                              </rich:column>

                                              <rich:column id="filterplacecolumn">

                                                  <h:outputText id="filterplacecolumnvalue" value="Place"/>

                                              </rich:column>

                                              <rich:column id="filterdatecoulmn">

                                                  <h:outputText id="filterdatecolumnvalue" value="Date"/>

                                              </rich:column>

                                          </rich:columnGroup>

                                      </f:facet>

                                      <rich:column id="feventcoulmn">

                                       <f:facet name="header">

                                   

                                       </f:facet>

                                          <h:outputText id="feventcolumnvalue" value="#{worldRecord.event}" style="width:32px"/>

                                      </rich:column>

                                      <rich:column id="fperfcolumn">

                                          <h:outputText id="fperfcolumnvalue" value="#{worldRecord.performance}"/>

                                      </rich:column>

                                      <rich:column id="fathletecolumn">

                                          <h:outputText id="fathletecoulmnvalue" value="#{worldRecord.athlete.name}" style="width:160px"/>

                                      </rich:column>

                                      <rich:column id="fplacecolumn">

                                          <h:outputText id="fplacecolumnvalue" value="#{worldRecord.place}" style="width:100px"/>

                                      </rich:column>

                                      <rich:column id="fdatecolumn">

                                          <h:outputText id="fdatecolumnvalue" value="#{worldRecord.date}">

                                              <f:convertDateTime type="date"/>

                                          </h:outputText>

                                      </rich:column>

                                      <f:facet name="footer">

                                           <h:panelGrid columns="4" styleClass="ftrPnlGrid">

                                              <h:panelGroup>

                                                  <h:outputText value="Total:"/>

                                                  <h:outputText value="#{tableManagedBean.totalRecords}"/>

                                              </h:panelGroup>

                                              <h:panelGroup>

                                                 <rich:dataScroller styleClass="ftrDs" id="scroller" page="#{tableManagedBean.page}"

        for="wrList2" maxPages="3" fastControls="hide">

        <f:facet name="first">

        <div class="first" />

        </f:facet>

        <f:facet name="first_disabled">

                               <div class="first_disabled" />

                           </f:facet>

        <f:facet name="next">

        <div class="next" />

        </f:facet>

        <f:facet name="next_disabled">

                               <div class="next_disabled" />

                           </f:facet>

        <f:facet name="previous">

        <div class="previous" />

        </f:facet>

        <f:facet name="previous_disabled">

                               <div class="previous_disabled" />

                           </f:facet>

        <f:facet name="last">

        <div class="last" />

        </f:facet>

        <f:facet name="last_disabled">

                               <div class="last_disabled" />

                           </f:facet>

        <f:facet  name="pages">

        <div style="position:relative !important;display:inline-block !important;width:114px">

        <div style="position: absolute;top: -39px;" >

        <h:outputText value="Page" />

      <h:inputText value="#{tableManagedBean.page}" id="sc1" size="2" styleClass="text small" style="margin-left: 9px; text-align:right;"

        disabled="#{tableManagedBean.totalPage eq 1}" onkeypress="allowOnlyNumbers(event);">

        <a4j:ajax event="change" render="wrList2"></a4j:ajax>

        </h:inputText>

      <h:outputText value="/ #{tableManagedBean.totalPage}" style="margin-left: 6px; font-weight: normal; color:#474747 !important;"/>

        </div>

        </div>

        </f:facet>

        </rich:dataScroller>

                                              </h:panelGroup>

                                              <h:panelGroup>

                                                  <h:selectOneMenu id="slctPager"

                                                       value="#{tableManagedBean.currentRowsPerPage}" styleClass="small"

                                                       valueChangeListener="#{tableManagedBean.valueChangeListener}">

        <f:selectItems value="#{tableManagedBean.selectItems}" />

        <a4j:ajax event="change" render="wrList2"/>

        </h:selectOneMenu>

                                              </h:panelGroup>

                                              <h:panelGroup >

                                               <div style="width:100px">

                                                <h:outputText value="Items per page"/>

                                               </div>

                                              </h:panelGroup>

                                           </h:panelGrid>

                                      </f:facet>

                                  </rich:dataTable>

        </h:panelGrid>

        </h:form>

       

       

       

       

      Error log

      ----------------------

       

      Caused by: java.lang.NoSuchFieldError: javax/faces/component/visit/VisitHint.SKIP_ITERATION

      at org.richfaces.component.UIDataAdaptor.requiresRowIteration(UIDataAdaptor.java:1402)

      at org.richfaces.component.UIDataAdaptor.visitTree(UIDataAdaptor.java:1314)

      at javax.faces.component.UIComponent.visitTree(UIComponent.java:793)

      at javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1051)

      at javax.faces.component.UIForm.visitTree(UIForm.java:290)

      at javax.faces.component.UIComponent.visitTree(UIComponent.java:793)

      at javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1051)

      at javax.faces.component.UIComponent.visitTree(UIComponent.java:793)

      at javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1051)

      at org.apache.myfaces.lifecycle.DefaultRestoreViewSupport.processComponentBinding(DefaultRestoreViewSupport.java:92)

      at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:142)

      at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:172)

      at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:119)

      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:189)