The best place to ask programming/development questions, imo. UPDATE: stackoverflow is the *worst* place to *ask* questions (if your first question/comment doesn't get any up-rating/response, then u can't ask anymore questions--ridiculously unrealistic), but a great reference for finding answers.

My Music (Nickleus)

20140114

[SOLVED] primefaces p:rowToggler and p:rowExpansion not working, not toggling

 i was near pulling my hair out when i couldn't get a simple table row toggle (DataTable row expansion) working. nothing was happening when i clicked on the toggle icon image. my colleague took a look at it and finally discovered the problem:
the p:rowToggler was inside an embedded p:column:

<p:dataTable...>
    <p:column...>
        <h:panelGrid...>
            <p:column...>
                <p:rowToggler />
                ...
            </p:column>

        </h:panelGrid>
    </p:column>
    ...
    <p:rowExpansion>
        <p:dataTable...>
            <p:column...>
            ...
            <p:column>
            ...
    <p:rowExpansion>
</p:dataTable>


the solution was easy--just remove the embedded p:column:

<p:dataTable...>
    <p:column...>
        <h:panelGrid...>
            <p:rowToggler />
            ...
        </h:panelGrid>
    </p:column>
    ...
    <p:rowExpansion>
        <p:dataTable...>
            <p:column...>
            ...
            <p:column>
            ...
    <p:rowExpansion>
</p:dataTable>

No comments:

Post a Comment