Announcement Announcement Module
No announcement yet.
JSF ajax events handling in Spring Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • JSF ajax events handling in Spring

    I am using Primefaces 3.4, Mojarra 2.1 and cannot get ajax events to work properly. Consider the following example:

    <p:dataTable id="customersTable" value="#{customersList}" var="customer">
        <p:ajax event="rowToggle" update="customersTable,:globalGrowl" /> 
        <p:column headerText="Name">
            <h:outputText value=" #{}"></h:outputText>
        <p:column headerText="Documents">
            <p:dataTable id="docsTable" value="#{}" var="doc" >
                <p:column headerText="Document Number">
                    <h:outputText value="#{doc.docNum}"></h:outputText>
    Row toggle sends ajax event to the backend and expects reformatted table back with the row expanded. Spring instead sends back only the state variable.

    I can sort-of make this work by chaining ajax event with RemoteCommand component which actually triggers Spring webflow action and I can use fragment rendering there. This requires at least 2 ajax requests, and it still does not render properly - might be PF/SWF integration issue I suspect.

    Anyway, is there a way to make Spring honor those Ajax event requests? I wonder how these work in pure JSF/Primefaces as their examples do not show any specific processing being done for such a rowToggle event, yet it still renders properly on their end...