does not work On my jsf 2.1 page, the jsf 2.1 page has the following button:

<f: setPropertyActionListener ... / "> does not work

On my jsf 2.1 page, the jsf 2.1 page has the following button:

<p:commandButton value="#{msg['button.halt']}" action="#{viewBean.haltTask}" ajax="false"> <f:setPropertyActionListener target="#{myBean.disabled}" value="false" /> </p:commandButton> 

At another point in the application, I read the value using

  ... <f:validateBean disabled="#{myBean.disabled}" /> ... 

Now the dot works as expected, meaning that the isDisabled () method is being called on myBean. Recording with setPropertyActionListner does not work. The setter is never called. MyBean has a "Region" request. Everything works in the Servlet 3 container on Tomcat 7 with EL 2.2.x.

Does anyone have a hint of what might be a mistake?

Yours faithfully,

Florian

+4
source share
1 answer

try changing the scope of myBean to viewcope,

also take a look at BalusC's answer in this f thread : setPropertyActionListener sets the value to zero instead of the intended value

+2
source

Source: https://habr.com/ru/post/1381298/


All Articles