jsf - Disable dynamically created button from managed bean -


i have problem dynamicaly created commandbutton in primefaces.

i want disable button after user click (submit). i've tried in 2 ways:

  1. by adding widgetwar (commandbutton.setwidgetvar("pony");) property commandbutton , setting onclick behaviour (commandbutton.setonclick("pf('pony').disable();");). widgetvar property unique among elements on page. approach doesn't work - button after click turns disable , goes enable.
  2. from managedbean calling setdisabled method on button uicomponent ((commandbutton) component).setdisabled(true);. doesn't work.

is there other way disable commandbutton java code or missing something? i'm generating page dynamically cannot use disabled property in xhtml. set commandbutton update property update parent p:outputpanel.

thanks in advance.

my button after click turns disable , goes enable.

that happen if ajax update covers button itself. exclude button , specify parts really need updated.


Comments

Popular posts from this blog

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -