ajax4jsf

JSF a4j:commandButton not working when 'disabled' is set

余生颓废 提交于 2019-12-12 20:25:49
问题 When I include a 'disabled' attribute on an a4j:commandButton, the button's action is not performed. Taking the 'disabled' attribute out causes it to work properly. I am not doing any special validation (that I'm aware of) and am not seeing any validation error messages. Here is part of my page: <t:dataTable id="myTable" var="region" value="#{MyPageBackingBean.regions}" width="100%"> ... <a4j:commandButton value="Update" action="#{region.doUpdate}" oncomplete="alert('done');" disabled="#{

Tag Library supports namespace: https://ajax4jsf.dev.java.net/ajax, but no tag was defined for name: support

痞子三分冷 提交于 2019-12-12 19:23:31
问题 When I tried to add <a4j:support> tag to JSF 2.0, I got the following error Tag Library supports namespace: https://ajax4jsf.dev.java.net/ajax, but no tag was defined for name: support How is this caused and how can I solve it? 回答1: The namespace URI https://ajax4jsf.dev.java.net/ajax is recognizable as the one from Ajax4jsf 1.x which existed in the prehistory, long before Ajax4jsf was acquired by RichFaces 3.x at 2006. Ajax4jsf 1.x is an ancient tag library which was targeted at JSF 1.1 on

JSF forms when submit

核能气质少年 提交于 2019-12-12 06:36:24
问题 If we have several forms like below and when i finally press submit button, it should send all the values from "froms1 to forms3" to the server. Is it something possible? I am using primefaces. <h:form id="forms1"> <inputText ......... </h:form> ...... <h:form id="forms2"> ...... </h:form> ....... <h:form id="forms3"> ..... </h:form> <p:commandButton value="submit" action="#{bean.action}" onSubmit="this.forms1,this.forms2,this.forms3" partialSubmit="true" /> 回答1: it is not a good idea to

using A4J, how do I rerender a javascript function, and call it after rerendering?

天大地大妈咪最大 提交于 2019-12-11 07:49:50
问题 for example, I've tried <a4j:region id="scriptSuggested" > <f:verbatim> <script> reallyUpdateIt = function () { // javascript code that changes after aj4 ajax call is triggered } </script> </f:verbatim> <a4j:jsFunction reRender="scriptSuggested" ignoreDupResponses="true" ajaxSingle="true" name="updateSuggestionValues" action="#{bean.action}" oncomplete="reallyUpdateIt();"> <a4j:actionparam name="userInput" assignTo="#{bean.input}" /> </a4j:jsFunction> </a4j:region> I would expect that calling

ajax4jsf doubles <body> and <head> tags in modern browsers [duplicate]

丶灬走出姿态 提交于 2019-12-11 06:31:47
问题 This question already has an answer here : Why usage of any a4j element in jsf add to page code second body and head tags? (1 answer) Closed 3 months ago . I'm trying to fix an error with a web application, which uses JSF (myfaces 1.1), facelets, tomahawk and ajax4jsf. In modern browsers, like Firefox 12+ or Chrome, there are duplicated <body> and <head> tags (can be seen with FireBug). Obviously, it is generated by javascript, because the source of the pages does not have it. The problem

Jsf RichFaces a4j:support migration to a4j:ajax

拟墨画扇 提交于 2019-12-11 04:49:17
问题 I have problem with converting this code from JSF 1.2 application to equivalent in JSF 2.x application <h:selectOneMenu id="type" value="#{bean.type}"> <f:selectItems value="#{bean.typeList}"/> <a4j:support event="onchange" ajaxSingle="false" immediate="true" reRender="myForm"> <a4j:actionparam name="type" value="this.value" assignTo="#{bean.type}" noEscape="true"/> </a4j:support> </h:selectOneMenu> How this code snippet works. Depending on selected value in #{bean.type} , my page display

Richfaces combobox on selection changed event

走远了吗. 提交于 2019-12-11 01:54:08
问题 I have this code: <richfaces:comboBox value="#{ChoixContratBean.selectedFormule"} suggestionValues="#{ChoixContratBean.formules}"> <a4j:support event="onmouseover" action="#{ChoixContratBean.getDescriptionFormule}" reRender="reponse" /> </richfaces:comboBox> I would like that when the user hovers with the mouse the different values in the combo, a new description of the product appears in : <jsf:outputText id="reponse" value="#{ChoixContratBean.descriptionFormuleSelected}" /> No event is

Sending parameter to a Controller

一世执手 提交于 2019-12-10 17:48:01
问题 I got this: <a4j:commandLink action="#{searchBean.someMethod}" reRender="search"><span><h:graphicImage value="/home/img/icons/red.gif" width="12" height="12" /> Street</span></a4j:commandLink> And on my Bean, I got a method: public void someMethod(String string){ doStruff(); } Is it possible to send a String as parameter to my method? 回答1: You can send param with <f:param> like this <a4j:commandLink action="#{searchBean.someMethod}" reRender="search"> <span> <h:graphicImage value="/home/img

Richfaces a4j:loadScript clears jQuery plugins on ajax calls

故事扮演 提交于 2019-12-10 16:36:40
问题 I'm loading jQuery embedded into RichFaces with: <a4j:loadScript src="resource://jquery.js"/> Next, I'm loading the FancyBox jQuery plugin with: <script type="text/javascript" src="/App/fancybox/jquery.fancybox-1.3.4.pack.js"/> The plugin works ok when the page is first loaded, however after executing an ajax call with <a4j:jsFunction name="myMethod" data="#{myController.jsonDataToReturn}" action="#{myController.doSomething()}" oncomplete="populateData(data);"> <a4j:actionparam name=

Duplicate Id. JSF

自古美人都是妖i 提交于 2019-12-10 15:21:47
问题 I have a problem with JSF. Can anyone say why this doesn't work? <h:selectOneListbox id="lang" size="5" value="#{MbInstitution.node.lang}" valueChangeListener="#{MbInstitution.changeLanguage}" rendered="#{MbInstitution.view}" > <a4j:support event="onchange" reRender="shortDesc, fullDesc"/> <f:selectItems value="#{MbInstitution.languagesByInstitute}"/> </h:selectOneListbox> <h:selectOneListbox id="lang" size="5" disabled="#{!MbInstitution.managingNew}" value="#{MbInstitution.node.lang}"