-
1. Re: Activate poll right before submit
rapthor Sep 13, 2007 3:25 PM (in response to rapthor)No idea anyone? I just want to enable the a4j:poll whenever the user clicks on the submit button. So this has to work like a chain reaction.
-
2. Re: Activate poll right before submit
fmarwede Sep 13, 2007 3:40 PM (in response to rapthor)Use the rendered attribute of the poll. Here you can set a boolean value with your bean. When the button is clicked, set the value to true and so on. Perhaps this causes the effect you want - or did I get something wrong?
Another thing: I see a limitToList attribute in your code. I tried to use that too but in my context that attribute (set to true) causes that the poll tag do nothing every time. I put this problem in this forum a few weeks ago but nobody answered...so if something don't work and you don't know why, try to get by on it without this attribute.
But I hope this will be commented by the experts of this forum too. -
3. Re: Activate poll right before submit
rapthor Sep 13, 2007 4:57 PM (in response to rapthor)Hi, there's everythin gokay with my poll-tag like this.
The problem is, when I set the rendered-attribute within the submit-button-action-Method, the page IS rerendered AFTER the things that happen within the method. But I have to set the rendered attribute "true" then cause a rerender of the poll-tag and after that proceed with the submit-method. -
4. Re: Activate poll right before submit
fmarwede Sep 14, 2007 5:34 AM (in response to rapthor)Hi,
that means you want the following things happen in this order:
1.) Button is clicked.
2.) Activate the poll to rerender the text
3.) Call the action method of the button.
Next idea: Control the rendered attribute of the poll not with a java boolean from the bean but with a javascript boolean. Set this one with the onclick or onsubmit event of the button...but I don't know if this causes the effect you want. The question is: When exactly the poll "notices" that it has to be rerendered? And I didn't use javascript in the context of JSF this way so far.