I am using Icefaces and I want to clear all my Ice:messages(validation Messages) on click of reset button.I am using type="reset" in my Ice:commandButton without any actionListener.
Can anyone help me plzz..
Thanks in advance !
Either put your messages in the form (this attribute is ment to reset a form) or solve the validation errors and refresh the page.
Related
I have a form with action attribute and within: input text and submit. When the user presses submit, the information they provided will be used to send a text message using Twilio. My question is how do I do this without reloading the page or going to another a page? Instead, I would rather have a cool small animation that displays whether it sent successfully or not, with the page remaining the same.
Thank you for your help. Much appreciated!
I basically did what zeronone said with listener on submit event, but instead wrote "return false;" preventing the page reload. I then included ajax, and the rest of the code remained basically the same.
How to show "Please wait" message for <h:commandButton> ? . I knew how to show this modalPanel for <a4j:____Button>. This request for an existing application which has close to 40 pages , out of 40, 10 of them implemented using a4j:commandButton and remaining h:commandButton . Adding common a4j:status in default layout (tiles) solve for all a4j:commandbutton.
Converting <h:commandbutton> to <a4j:commandButton> and add <redirect> would solve this issue, but is there any other way to accomplish this ? Any issues apart from increasing load ( two request for single submit) ?
Another Solution would be Adding
`onclick = "Richfaces.showModalPanel('progressWaitModalPanel')"`
in All h:CommandButton
where progressWaitModalPanel is the modalPanel for "Please wait" - Any issues with this approach?
I would like to implement in one place and slight modification in each page if required, but not interested in refactor the entire application.
Thanks for your time.
environment :
Richfaces 3.1.6 , myfaces 1.1.7
As I understood you: When a user clicks a h:commandButton, the "please wait" panel shall be shown.
You are right, on Ajax-Requests, the a4j:status component gets triggered and shows the mentioned message. I don't know any comparable mechanism for a normal/non-AJAX page-request (nothing more is a h:commandButton in the end).
Personally I would either go with your mentioned onclick-solution (lots of buttons to be changed, I guess) or would try playing around with something like
<h:form onsubmit="Richfaces.showModalPanel('progressWaitModalPanel')">
...
</form>
which might reduce the number of places to be changed.
Hope it helps...
With plain Jsf postback to same page (with return null in method) from commandLink, I am ending up with two duplicate entries in browser history. One entry with url with ending # and one with url without ending #. Please help if you have any idea why this could happen and advice avoiding it.
I am assuming this is not a standard behavior with JSF postback request. Please help confirming it.
Also please suggest where I could be going wrong. I am using Myfaces 2.1
Also any pointer to debug this scenario is very much appreciated.
Thanks very much for your help.
I have found out my issue. As I had expected, it is not the issue with JSF as such. I have commandLinks with onclick method, for disabling all the hyperLink controls to prevent repeated submits. That method is also setting location.href = "#" before returning true, and this was the cause of double entries in browser back history. Posting the answer, hoping it will help others with same scenarios. Thanks all for viewing this question.
I am using valiDationEngin for validating fields. I clicked submit button with empty fields and validation prompts appeared. After entering data, prompts are not closing. Can someone help? Thanks!
Never mind. I found solution myself. I just need to initialize vallidationEngine.
$('form[name=ajaxForm]').validationEngine();
I'm trying to set the focus to an inputText which has an error. When I click to navigate to my form from another page then my beforePhase() code is hit. However in the form once I click submit my beforePhase() code is not hit.
Are the requiredMessage/validatorMessage attributes on my inputText element preventing it from reaching my beforePhase() code?
Any ideas?
Thanks
Problem was the client side validation prevented it from getting that far. Turned off client side validation(jsValidation="false") and now it works.