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:
- 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. - from managedbean calling
setdisabledmethod on buttonuicomponent((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
Post a Comment