Please let me have a problem, please help me when I change a value in its input and then I event blur of a button Submit the block to me, so I have to click the button twice. I want to have action in my input with one click on my button and also submit my button
The same problem when my input is in the change value and then I click on my command links. The action of my Blur Event could stop clicking on my link
& lt; H: inputText id = "idInputQuantite" read-only = "#converter =" bigDecimalConverter "executed =" @ this "styleClass =" # {component.valid? '': 'InvalidInput'} "style =" # {component.valid? '': 'Border: Medium is completely red,'}; Cursor: hand, "value =" # {infoPiece.quantite} "onFocus =" if (this.readOnly) {this.blur ();} & gt; & Lt; F: Legalization ID = "Superfine Volume Validate" / & gt; & Lt; F: attribute name = "libTypePiece" value = "# {infoPiece.libPiece}" /> & Lt; a4j: ajax event = "submit stigma" to = "@ execute form" = "@ all" listener = "# {saisieEnquetesCtrl.contCohQuant}" oncomplete = "modifyVal (); updateOrigineQuant (); focusErrorInput ();" /> & Lt; / H: inputText> & Lt; a4j: CommandButton rendered = "# {saisieMoisModel.modeModification}" action = "# {saisieEnquetesCtrl.enregistrer}" id = "idValider" value = "Valider" onmouseover = "affichVerifPanel ()" onmouseout = "hideVerifPanel (); mouseout () ; "Render =" @ form "execute =" @ this "incomplete =" save_gellet (); " Style = "margin-top: 20px; margin-left: 300px; background: # fad-adc; font-family: aerial; font-weight: bold;" & Gt; & Lt; / A4j: CommandButton & gt; & Lt; A4j: CommandLink style = "float: right; padding-right: 40px;" Submit = "@ form" action = "# {saisieEnquetesCtrl.clickChFerElementDebut}" onclick = "if (checkIfSaved ()) {# {rich :. component ( 'savePopupDebut')} show (); return false;}" oncomplete = "InitTable ();" & gt; & Lt; / A4j: commandLink & gt;
After
one solution may be to remove & lt; A4j: ajax event = "blur"
and adding change & lt; H: In
, while & lt inputText
; H: inputText onBlur = "myFunc ();" ..... myFunc
will look like
var myTimer; Function myFunc () {myTimer = setTimeout (function () {$ ('# myHiddenButtonId'). Click ();}, 500); }
where myHiddenButtonId
a & lt has an ID, a4j: CommandButton
, something like this:
& lt; A4j: commandButton id = "myHiddenButtonId" style = "display: none;" & Gt; & Lt; a4j: render ajax execute = "@" form = "@ all" listener = "# {saisieEnquetesCtrl.contCohQuant}" oncomplete = "modifyVal (); updateOrigineQuant (); focusErrorInput ();" /> & Lt; / A4j: CommandButton & gt;
The above solutions will work fine, but know that if you click on the other ajax, your stigma will activate later ...
Comments
Post a Comment