I was also using Woodstock's button but than I switched to change all my buttons to use JSF tags. Advising you to do the same thing ;) Woodstock is an old component library and it has almost no support at all.
I am trying to solve this problem for days but couldn't find a proper solution. People suggested to use Ajax but I couldn't implement it. I had to open this thread because the other thread was not going any further and also the topic has changed.
I have a jspf page in which I am using facelets. I have a form with input values and a button. When user clicks on the button I want to check the validation and give user a feedback.
report.java:
but it is giving:
error. However I am using JSF 2.0 and as far as I know JSF 2.0 has Ajax support included. What am I doing wrong?
thanks for your detailed answer. I tried adding f:ajax tag (because my component library is a little bit old - Woodstock, and I couldn't find enough documentation about Ajax support of Woodstock). But I got:
message. But my project is JSF 2.0. Isn't there a support for Ajax in JSF 2.0?
I am already doing the validation in JSF. I just want to display an (like you do with JS) alert box to say that "The report is being generated" after the validation if everything is fine. How can I do that?
I have a form in JSF 2.0 whose input fields have validation checks and there is a submit button. Right now when I click on the submit button I get an alert box (generated by JS) saying that my report order is being processed (to give a feedback to the user). This alert box is displayed without the neccessary validation checks for the input fields. I can do the validation check in the back bean but how can I replace the behaviour of my alert box? Can I trigger a JS action from back bean? I spent quite a lot time in web searching for a solution to this problem. If anyone has any reccommendation about which way to proceed, I will be happy to listen. Thanks in advance.
but now there is another problem :
when I clicked on the button, the value of the button changes but immediately after that the page is re-rendendered and the button looses its value, returns to the old state..
but it is still not working. I even tried the exact path of the button:
it did not worked either.
I also tried this:
but it gave no results, alert box did even not show up.
It looks like I can not reach the button element at all. Can this be because of Woodstock component library? I mean the button is from this library, maybe I can not reach its elements via JS?
sorry I was a little bit tired when writing an answer. What I meant by "name of the button" was the text on the button. I want to click on the button, select all checkboxes in the table below it and click on it again and unselect the checkboxes. Meanwhile when clicked on once I want to change the label of the button from Select All to Unselect All. But
seems not working. Do you have any ideas why this is not working?
Thanks in advance.
first, thanks a lot for your answer. Now I understood that I was in the wrong way.
I tried double-click handling on the client-side with the following code:
js:
jsf:
I am trying to change the name of the button when it is clicked once. But it is not working. Do you have any opinion about why this is not working?
I am tring the application in Mozilla Firefox.
Hi Marcos, first, thanks for answering You are one of the brave ones to answer this question!
yes, there is a "render" attribute. I tried render="true" but still it is not working..
I have a button which I want to use for selecting all checkboxes in my datatable.
Jsf:
java:
selectSingleCBEvent is collecting the row numbers of this checkbox to delete them afterwards. I want to select all checkboxes and delete the corresponding reports. When I click on the button, selectedCB's selected attribute turns to true, but in my form I can not see the change. I tried adding