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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -