I want to create a please wait message
In my page I have a command button that triggers some action versus the database.
During this actions occur I want to do something like:
- disable the command button to avoid other clicks;
- display some "please wait" message on a text field linked to a
SessionBean property.
When done a " well done message"
The first problem I meet (maybe I did not understand very well the jsf request lifecycle) is how to disable the button.
I've tryed something like that in the command button action:
...........
this.textArea1.setDisabled(true)
((SessionBeanDb)getBean("SessionBeanDb")).setOutputRequest (" !!! wait !!!");
FacesContext.getCurrentInstance().renderResponse();
.......
...... make db2 requests...........
this.textArea1.setDisabled(false)
it does not work at all, I would like to understand why if someone could please help. I prefere to find this kind of solution if possible.
After that I've tryed wit hjava script solution. I add one more DIV that appears when user clicks the command button. Scenario: when user clicks the button, the JavaScript function is called.
I find the error: Attribute onclick invalid for tag button according to TLD
I do not like very much mixing javaScript with jsf so I prefere the jsf solution if any.
Thank you all very much
Anna

