I was positively surprised how easy it was to get a table with a dynamic number
of columns working with trinidad, jstl and facelets.
Now whenever the user clicks on a command link in a table cell I'd like to 
update
a separate form with details of the data represented by that cell - using PPR on
that form.
It is working (sometimes) using the code below.
The problem is, that I only conditionally render the link.
PPR fails completely for all cells in a row if the command link isn't rendered
in the first column of that row.
Seems to me PPR is canceled somehow, because of a problem with the id of the 
trigger
component, which does not differ from one column to the next.

Any solution? I'd take a workaround, as well :-)

<tr:table id="scoreEntries" var="summary" 
value="#{scoreCardHome.scoreEntrySummaries}">

    <c:forEach var="i" begin="0" end="#{monthRange.monthsCount - 1}">

        <tr:column headerText="#{monthRange.monthTexts[i]}">
            <tr:commandLink id="selectDetails"
                            action="#{scoreCardHome.selectDetails}"
                            partialSubmit="true"
                            text="#{summary.details[i].score}"
                            rendered="#{summary.details[i].persistent">
                <f:param name="parameterId" value="#{summary.parameterId}"/>
                <f:param name="yearMonth" value="#{monthRange.yearMonths[i]}"/>
            </tr:commandLink>
            <tr:outputText value="%" rendered="#{summary.details[i].none}"/>
            <tr:outputText value="?" rendered="#{summary.details[i].new"/>
        </tr:column>

    </c:forEach>

</tr:table>

<tr:panelFormLayout partialTriggers="scoreEntries:selectDetails">
    ...
</tr:panelFormLayout>

Reply via email to