commandlink

h:commandButton not working inside h:dataTable

帅比萌擦擦* 提交于 2019-11-27 08:09:34
I am trying to execute an action through commandButton inside a dataTable , but the action is not invoked when the commandButton is placed inside the datatable as shown below <h:form> <h:dataTable value="#{bean.list}" var="item"> <h:column> <h:commandButton value="submit" action="#{bean.submit}" /> </h:column> </h:dataTable> </h:form> When I move the commandButton out of dataTable , the action is successfully executed. What is the problem when commandButton is inside datatable? The commandLink has the same problem. BalusC This problem can happen when the list behind #{bean.list} is not exactly

h:commandButton not working inside h:dataTable

落爺英雄遲暮 提交于 2019-11-26 22:17:21
问题 I am trying to execute an action through commandButton inside a dataTable , but the action is not invoked when the commandButton is placed inside the datatable as shown below <h:form> <h:dataTable value="#{bean.list}" var="item"> <h:column> <h:commandButton value="submit" action="#{bean.submit}" /> </h:column> </h:dataTable> </h:form> When I move the commandButton out of dataTable , the action is successfully executed. What is the problem when commandButton is inside datatable? The

Clicking h:commandLink causes Uncaught ReferenceError: mojarra is not defined

大兔子大兔子 提交于 2019-11-26 17:06:49
问题 I am aware of this post and I double checked all the possibilities there. I'm using JSF 2.0 with Mojarra implementation on Glassfish 3. I'm trying to use two simple <h:commandLink> tags to change the application language. This is the .xhtml page: <!DOCTYPE html> <html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"> <h:head> <title> <h:outputText value = "#{appMessage['page.welcome']}" /> </title> <f:metadata> <f

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

How can I pass selected row to commandLink inside dataTable or ui:repeat?

假装没事ソ 提交于 2019-11-25 21:43:45
问题 I\'m using Primefaces in a JSF 2 application. I have a <p:dataTable> , and instead of selecting rows, I want the user to be able to directly execute various actions on individual rows. For that, I have several <p:commandLink> s in the last column. My problem: how can I pass a row ID to the action started by the command link so that I know which row to act on? I tried using an <f:attribute> : <p:dataTable value=\"#{bean.items}\" var=\"item\"> ... <p:column> <p:commandLink actionListener=\"#