Error messages making queryString disapprear in jsf - jsf

I have issue from client end with jsf 1.2 as explained below
I am navigating on click on command button to the url below
test/editProject.jsf?value=123
If any field are missing I am using addErrorMessage('id','string') and returning fail in validation method. The error message is displayed under that component.. I am fine till this..
The problem is the url is displayed as
test/editProject.jsf
Here the value queryString is missing..if the user correct the error and click on save it works fine..it is working as per jsf cycle
Issue
My client is pressing enter on the browser url tab which has the url test/editProject.jsf. I told him to use F5 button to refresh but he didn't agreed.. any idea how to retrieve the query string back on getting error message.
I have used redirect in my project but I think here its not good idea to use..
Please let me known if you any solution for this..
Thanks for help.

Related

How can display a text and clear form when it was submitted in Kentico?

I need when a user submit a form this will be clear and display a text.
Hi, can it be possible? Thanks
In the general settings for the Form you can do either Clear Form or Display Text, not both.
If you need both, I would suggest maybe redirecting to a URL, have the URL the same as the form, but with a querystring added, then on page load check for the querystring value and display the message if it exists. Otherwise you will have to edit the web part.
Keep in mind if you go the QueryString route, if they submit the form and get a validation error, your logic for displaying the message if the QueryString value exists will have to handle this, otherwise you are going to keep displaying it when it wasn't a success.
The easiest route would probably be just display a message with a link to reload the form.

Embedded sender view with go back to previous page issue on send=0

I added embedded sender view to my site. If I set default to drag&drop view (send=1), everything is working fine. I can press go back to document view.
After submitting, it will redirect to the return url that I provide.
However, if I set the default to document view (send=0), when I press the go back. I receive a blank page.
thanks for posting this. I believe this is a bug and should be fixed. we'll update this thread when we have a proper fix in place. thanks!

Avoid Resubmit data cakephp page when refresh

i am fighting from some days about avoing resubmit data in a cake view when i refresh the page.
I will explain the data process
One view with an to /quotes/select/
saving data in function select
When i arrive to the page select.ctp i have the problem on the refresh. Everytime i refresh a new quote is saved into the DB.
In this case no forms. Is there a solution?
Working on this matter i found the Security Component and i would like to use for the "Forms". I tried to use but i get the following error:
Missing Helper
Error: SecurityHelper could not be found.
Error: Create the class SecurityHelper below in file: app/View/Helper/SecurityHelper.php
Where can i find it? Thank in advance.
Considering that you have something similar to this:
if ($this->Quotes->save($quote)) {
$this->Flash->success(__('Your quote has been saved.'));
}
You can add a redirect to the same page which will clear the POST request that is left in the browser
if ($this->Quotes->save($quote)) {
$this->Flash->success(__('Your quote has been saved.'));
return $this->redirect([]); // <----- Redirects to same page
}

PhaseListener : beforePhase method not called on form submit

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.

What procedure does default form submit button handler follow?

I've set (and confirmed in the database) nodes under the content type miniapps to have the alias content/miniapps/9999/test (where 9999 is a node's actual id, and test is the node's title. Everything works fine when a new node is added - i.e. I get redirected to the proper page. However, when I edit that page and press Submit, I get the "page not found" error. If I manually enter the above path in the browser I go to the proper page. This happens even though every conceivable permission has been set, and in fact happens on my (the super admin) content. Any guidance or suggestions on why the wrong redirect appears to be assigned by the form submit button handler. Thank you very much.

Resources