<f:setPropertyActionListener > doesnot invoke setpropert eve

UI Components for JSF
Post Reply
KKL
Posts: 8
Joined: 26 Apr 2011, 20:55

26 Apr 2011, 21:05

target property "selectedProperty" is not called every time. I am using
f:setPropertyActionListener inside data table and I see that setPreporty is called not every time. On first select I see in logs that preporty is beint set properly..but after a while it doesn't call setProprty..below is the sample code

<p:column style="width: 10px"
...
<f:setPropertyActionListener
value="#{ma}"
target="#{bean.selectedProperty}" />
</p:commandButton>
</p:column>

Rainer
Posts: 8
Joined: 21 Mar 2011, 17:28

27 Apr 2011, 08:13

Hi,

it is difficult to guess from what you have provided...
Since the listener is registered only once when the component is created try
to update the component
<p:commandButton update="idOfDatatable"

Rainer
Primefaces 3.0.M3
MyFaces 2.1.3
GAE

KKL
Posts: 8
Joined: 26 Apr 2011, 20:55

27 Apr 2011, 15:51

Here is the detailed code that I am using

<p:column style="width: 10px" headertext="Route Points" rendered="#{messageAggregator.messageAggregatorId ne null}">
<p:commandButton update= "rpTable" oncomplete="RoutingPointsDialog.show()" image="ui-icon ui-icon-search" title="show Routing Points">
<f:setPropertyActionListener value="#{messageAggregator}"
target="#{messageAggregatorBean.selectedMessageAggregator}" />
</p:commandButton>
</p:column>

.....Below is the code where I am expecting part to be updated. I tried replacing update= "rpTable" with "rpPanel", "displayRoutingPoints". What I see is setProperty is called in some cases and stops working all of a suddent. Every time I click, I see previous output and setProperty is not invoked.

<p:outputPanel id="rpPanel">
<p:dialog styleClass="popUp"
header="Routing Points for Message Aggregator : #{messageAggregatorBean.selectedMessageAggregator.aggregator}"
id="rpDialog" widgetVar="RoutingPointsDialog" width="650" visible="#{not empty facesContext.maximumSeverity and messageAggregatorBean.showDialog}">
<p:message id="routingPMsg" for="routingPMsg"/>
<h:panelGrid id="displayRoutingPoints" width="100%"> <p:dataTable id="rpTable" var="rp" styleClass="mainTable"
value="#messageAggregatorBean.selectedMessageAggregator.messageAggregatorRoutePointList}"
rowEditListener="#{messageAggregatorBean.onRowRPEdit}"
rowStyleClass="#{empty rowIx or rowIx mod 2 ne 0 ? 'even-row' : 'odd-row'}"
onRowEditUpdate="routingPMsg"
rowIndexVar="rowIx">
.....

Rainer
Posts: 8
Joined: 21 Mar 2011, 17:28

28 Apr 2011, 16:48

Hi,

Have you tried running an example from the showcase such as http://primefaces-rocks.appspot.com/ui/ ... Column.jsf ?


Rainer
Primefaces 3.0.M3
MyFaces 2.1.3
GAE

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 27 guests