richfaces

Prevent double submit with a4j:commandButton

只愿长相守 提交于 2019-12-23 09:26:53
问题 We have a form which has a submit button (input type="submit") and a bunch of a4j:commandButtons which are ajax buttons that translate into input type="button". I'm able to use this jquery code to prevent double submitting of the submit button: $('#createPostingForm').submit(function(){ $(':submit').click(function() { return false; }); }); But how can I also disable the a4j:commandButtons from being submitted more than once? Thanks. 回答1: Ended up adding these attributes to the a4j

Passing action in <rich:modalPanel>

僤鯓⒐⒋嵵緔 提交于 2019-12-23 03:13:19
问题 There is some way to pass action in <rich:modalPanel> . I want to write simple popup with "Yes" and "No" button, and I want to reuse this popup in different pages, that's why I need that different action was invoked when "Yes" button pressed. There is a way to pass some value in <rich:modalPanel> with <a4j:actionparam> : <a4j:commandButton value="See details…" id="det" reRender="popup_dataIdField, …"> <rich:componentControl for="popup" operation="show" event="onclick" /> <a4j:actionparam name

can i use FixViewState.js from omnifaces with richfaces' a4j:ajax (RF4+JSF2.2/mojarra)

北城以北 提交于 2019-12-23 02:01:35
问题 I use the great omnifaces 1.7 workaround FixViewState in order to fix the following issue: viewstate and ViewScope gets lost on ajax render="@form" . The workaround seems to work fine with f:ajax but not with a4j:ajax (richfaces). Is the fix supposed to work with richfaces out-of-the-box? (richfaces version is 4.3.5) maybe related issue logged by a4j:log: error[15:09:31.667]: [status=200] During update: javax.faces.ViewState not found Thanks! 回答1: Tl;dnr: Richfaces-4.x is broken with JSF-2.2

How to upload folder in web application

心不动则不痛 提交于 2019-12-22 21:13:27
问题 I am developing simple application using JSF with richfaces. I want to upload folder(select folder only). I tried, t:inputFileUpload and rich:fileUpload . but both components are support file only. Not support select folder. Is possible to select folder. Help Me. thanks in advance 回答1: The standard HTML <input type="file"> already can't do it. So the <t:inputFileUpload> which just renders exactly that HTML element is out of question. Also, Flash also doesn't allow folder selection due to

How to upload folder in web application

天涯浪子 提交于 2019-12-22 21:12:10
问题 I am developing simple application using JSF with richfaces. I want to upload folder(select folder only). I tried, t:inputFileUpload and rich:fileUpload . but both components are support file only. Not support select folder. Is possible to select folder. Help Me. thanks in advance 回答1: The standard HTML <input type="file"> already can't do it. So the <t:inputFileUpload> which just renders exactly that HTML element is out of question. Also, Flash also doesn't allow folder selection due to

How to use $ for jQuery inside domready when prototype is using $ outside?

我的梦境 提交于 2019-12-22 17:40:41
问题 I'm unable to remove prototype from a JSF framework (RichFaces 3.3.3). And if I try noConflict and try to take over $ it breaks my application framework because its tightly coupled with prototype. So is there a way that I can do this: jQuery(function() { /* some code that within this domready function allows me to use $() within this function and not interfere with $ being used for prototype outside? */ }); 回答1: Yes, it's already passed in as the first parameter to your ready handler, just

Richfaces suggestionbox

浪子不回头ぞ 提交于 2019-12-22 13:32:46
问题 I'm trying to use a List of SelectItems with RichFaces suggestionBox component. The problem is I need to store the id rather than the label of the SelectItem. It seems that the suggestionBox always stores the label and that's causing a problem. Is there a way out of this problem? 回答1: I use something like this: <h:inputText id="suggest" value="#{someBean.someStringValue}" converter="#{myStringValueConverter}"> <a:support event="onblur" ajaxSingle="true"/> </h:inputText> <rich:suggestionbox

Richfaces suggestionbox

穿精又带淫゛_ 提交于 2019-12-22 13:32:06
问题 I'm trying to use a List of SelectItems with RichFaces suggestionBox component. The problem is I need to store the id rather than the label of the SelectItem. It seems that the suggestionBox always stores the label and that's causing a problem. Is there a way out of this problem? 回答1: I use something like this: <h:inputText id="suggest" value="#{someBean.someStringValue}" converter="#{myStringValueConverter}"> <a:support event="onblur" ajaxSingle="true"/> </h:inputText> <rich:suggestionbox

a4j:ajax won't render h:panelgrid

守給你的承諾、 提交于 2019-12-22 12:50:56
问题 This is the code: <h:panelGrid columns="3" style="margin-left: auto; margin-right:auto;"> <f:facet name="header"> <rich:column colspan="2"> <h:outputText value="Ingrese datos del padre" /> </rich:column> </f:facet> <label for="padreRut">RUT</label> <h:inputText id="padreRut" value="#{IngresoAlumno.padre.per_Rut}"> <a4j:ajax event="keyup" render="formPadre" immediate="true" /> <f:validateLongRange minimum="0" /> </h:inputText> <rich:message for="padreRut" ajaxRendered="true" /> </h:panelGrid>

How stop richfaces style?

烈酒焚心 提交于 2019-12-22 11:49:07
问题 I develop this contact form: <!DOCTYPE html> <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich"> <h:form> <h:panelGrid columns="3"> <h:outputLabel for="name" value="Nome (Obrigatório)" /> <h:inputText id="name" value="#{contact.client.name}" /> <h:message for="name" /> <h:outputLabel for="email"