commandbutton

Trying to understand immediate=“true” skipping inputs when it shouldn't

*爱你&永不变心* 提交于 2019-11-26 01:43:16
问题 Just when I thought I had understood immediate... *sigh* Consider the following JSF page: <h:inputText value=\"#{testBean.text}\" required=\"true\" /> <h:commandButton actionListener=\"#{testBean.doFoo}\" value=\"Do Foo\" /> <h:commandButton immediate=\"true\" actionListener=\"#{testBean.doBar}\" value=\"Do Bar\" /><br /> <h:outputText value=\"#{testBean.didSomething}\" /> And this backing bean: public class TestBean { private String didSomething = \"Nothing done yet\"; // + getter public

p:commandbutton action doesn&#39;t work inside p:dialog

狂风中的少年 提交于 2019-11-26 01:38:12
问题 I have a p:dialog and there is a panel inside it. The problem is \"Save\" button\'s action method is not working. It doesn\'t even calls the method. I can reach the method def. with ctrl+lm so there is no problem with method name. <h:body> <h:form id=\"createAppUserForm\" prependId=\"false\"> .... <p:dialog id=\"newRoleDialogId\" header=\"Add New Role\" resizable=\"true\" draggable=\"true\" widgetVar=\"newRoleDetailsDialog\" appendToBody=\"true\" > <p:panel id=\"newRoleDialogPanel\"> <p

commandButton/commandLink/ajax action/listener method not invoked or input value not set/updated

*爱你&永不变心* 提交于 2019-11-26 01:17:09
问题 Sometimes, when using <h:commandLink> , <h:commandButton> or <f:ajax> , the action , actionListener or listener method associated with the tag are simply not being invoked. Or, the bean properties are not updated with submitted UIInput values. What are the possible causes and solutions for this? 回答1: Introduction Whenever an UICommand component ( <h:commandXxx> , <p:commandXxx> , etc) fails to invoke the associated action method, or an UIInput component ( <h:inputXxx> , <p:inputXxxx> , etc)

h:commandButton/h:commandLink does not work on first click, works only on second click

旧城冷巷雨未停 提交于 2019-11-25 23:08:47
问题 We have an ajax navigation menu which updates a dynamic include. The include files have each their own forms. <h:form> <h:commandButton value=\"Add\" action=\"#{navigator.setUrl(\'AddUser\')}\"> <f:ajax render=\":propertiesArea\" /> </h:commandButton> </h:form> <h:panelGroup id=\"propertiesArea\" layout=\"block\"> <ui:include src=\"#{navigator.selectedLevel.url}\" /> </h:panelGroup> It works correctly, but any command button in the include file doesn\'t work on first click. It works only on