I use primefaces-4.0 and get really weird behavior.
Layouts are collected there layoutMateriaMB.listaLayouts, and I repeat it, creating p:dataGridwhere each column represents the layout, and f:setPropertyActionListenerthis column sets the selected layout to the Bean. The first column works fine; when clicked, it calls the setLayout method in layoutMateriaMB, however, all other columns do not work. The set method is simply not being called, and I do not understand why this is happening.
Here follows my code:
<p:dataGrid var="layout" value="#{layoutMateriaMB.listaLayouts}" columns="5" rows="1" paginator="false">
<p:column>
<p:panel header="#{layout.valor}" style="text-align:center">
<h:panelGrid columns="1" style="width:100%">
<h:graphicImage library="imagens/layouts" name="#{layout.imagem}" width="100" />
<p:commandLink update=":form:grid-layout" oncomplete="" title="Selecionar" rendered="#{layoutMateriaMB.layout ne layout}">
<h:outputText value="Selecionar" title="Selecionar" />
<f:setPropertyActionListener value="#{layout}" target="#{layoutMateriaMB.layout}" immediate="true"/>
</p:commandLink>
<h:outputText value="Selecionado" title="Selecionado" rendered="#{layoutMateriaMB.layout eq layout}" style="color:#313964; font-weight:bold;"/>
</h:panelGrid>
</p:panel>
</p:column>
</p:dataGrid>
, . ans rows="1" rows="5".
, . , . - , , ..:)