javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-2479

Datatable does not rerender on Ajax Call from a seleceOneMenu

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Works as designed
    • Affects Version/s: None
    • Fix Version/s: 2.1.12, 2.2.0-m05
    • Component/s: ajax
    • Labels:
      None

      Description

      Datatable does not re-render on Ajax Call from an event raised by selectOneMenu when a valueChange is seen through user.

      The backing bean DivisionsListBean is SessionScoped.

      <h:form id="divisionContactForm">
      		<h:selectOneMenu id="DivisionSelectorDropDown"
      			value="#{DivisionsListBean.selectedDivisionName}">
      			
      			<f:selectItems value="#{DivisionsListBean.divisionsNames}"></f:selectItems>
      			
      			<f:ajax event="change" render="contactsTable" execute="@this"/>
      		</h:selectOneMenu>	
      
      		<br />		
      		
      		<h:dataTable id="contactsTable" 
      			value="#{DivisionsListBean.divisionContactList}" 
      			var="con">			
      
      			<h:column>
      				<f:facet name="header">
      					<h:outputText value="Name" />
      				</f:facet>
      
      				<h:outputText value="#{con.contactName}" />				
      
      			</h:column>						
      			
      		</h:dataTable>
      
      	</h:form>
      

        Activity

        Hide
        rogerk added a comment -

        Test Case proving it works.

        Show
        rogerk added a comment - Test Case proving it works.
        Hide
        rogerk added a comment -

        Committed to MOJARRA_2_1X_ROLLING branch:
        Adding test/agnostic/ajax/src/main/java/com/sun/faces/test/agnostic/ajax/AjaxTable.java
        Adding test/agnostic/ajax/src/main/webapp/selectOneMenuDataTable.xhtml
        Adding test/agnostic/ajax/src/test/java/com/sun/faces/test/agnostic/ajax/Issue2479IT.java
        Transmitting file data ...
        Committed revision 10405.

        Show
        rogerk added a comment - Committed to MOJARRA_2_1X_ROLLING branch: Adding test/agnostic/ajax/src/main/java/com/sun/faces/test/agnostic/ajax/AjaxTable.java Adding test/agnostic/ajax/src/main/webapp/selectOneMenuDataTable.xhtml Adding test/agnostic/ajax/src/test/java/com/sun/faces/test/agnostic/ajax/Issue2479IT.java Transmitting file data ... Committed revision 10405.
        Hide
        rogerk added a comment -

        Committed to trunk:
        Adding test/agnostic/ajax/src/main/java/com/sun/faces/test/agnostic/ajax/AjaxTable.java
        Adding test/agnostic/ajax/src/main/webapp/selectOneMenuDataTable.xhtml
        Adding test/agnostic/ajax/src/test/java/com/sun/faces/test/agnostic/ajax/Issue2479IT.java
        Transmitting file data ...
        Committed revision 10406.

        Show
        rogerk added a comment - Committed to trunk: Adding test/agnostic/ajax/src/main/java/com/sun/faces/test/agnostic/ajax/AjaxTable.java Adding test/agnostic/ajax/src/main/webapp/selectOneMenuDataTable.xhtml Adding test/agnostic/ajax/src/test/java/com/sun/faces/test/agnostic/ajax/Issue2479IT.java Transmitting file data ... Committed revision 10406.
        Hide
        rogerk added a comment -

        Test checked into 2.1.12 and 2.2-m05.

        Show
        rogerk added a comment - Test checked into 2.1.12 and 2.2-m05.
        Hide
        rogerk added a comment -

        Works as designed. See test case.
        Also, in your example, you need to fully qualify the id of the table in the render target -
        including the form (you did not specify prependId=false).

        Show
        rogerk added a comment - Works as designed. See test case. Also, in your example, you need to fully qualify the id of the table in the render target - including the form (you did not specify prependId=false).

          People

          • Assignee:
            rogerk
            Reporter:
            malikalamgirian
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: