-
1. Re: Problem with: a4j:commandLink with both onclick and actionListener
jbize May 17, 2012 7:58 AM (in response to jbize)A reader on StackOverflow said that downgrading to Richfaces 3.3 fixed this problem for him. I really can't do that, though it suggests that it is definately a bug. Can someone verify that it is a known bug please? If so, has it been fixed in the latest stable release, 4.2.2.Final?
At this point, I would prefer to have a workaround. Do I need to bind the tabPanel and manipulate it in a backing bean?
-
2. Re: Problem with: a4j:commandLink with both onclick and actionListener
jbize May 23, 2012 2:09 PM (in response to jbize)Well, I upgraded to 4.2.2.Final and it still doesn't work.
This is the question on StackOverflow.
If this is not supported, I wish one of the Richfaces developers would just tell me and save me the trouble of trying.
-
3. Re: Problem with: a4j:commandLink with both onclick and actionListener
mcmurdosound May 23, 2012 3:11 PM (in response to jbize)1 of 1 people found this helpfulonclick is to early and if you return true, how should the ajax request been send?
Okay, I must say, I only have experience with richfaces 3.3.x
But I think an option could be switching the tab in your backing bean:
Use the FacesContext current instance, find the tabPanel and call the switchTo function (if there is such a thing) and add the tabPanel to the rerender queue.
(this is what I would try in richfaces 3.3.3)
-
4. Re: Problem with: a4j:commandLink with both onclick and actionListener
jbize May 23, 2012 3:55 PM (in response to jbize)Ok,
I added a second f:setPropertyActionListener to set the TabPanel's activeItem to EditTab. Then I added oncomplete="location.reload(true);" to refresh everything and redraw with the correct active tab.
It works, but I'd still like to hear a better approach.
Thanks for responding Christian.
-
5. Re: Problem with: a4j:commandLink with both onclick and actionListener
mcmurdosound May 23, 2012 4:39 PM (in response to jbize)Does simple rerending of only the tabpanel / your output containers not work or why do you have to reload the whole page?
-
6. Re: Problem with: a4j:commandLink with both onclick and actionListener
jbize May 24, 2012 3:15 PM (in response to mcmurdosound)The render= didn't seem to work. Any ideas?
-
7. Re: Problem with: a4j:commandLink with both onclick and actionListener
yyq2009 May 24, 2012 10:17 PM (in response to jbize)Hi, I think you should use oncomplete, and investigate why swith part js not work, and even more you can write a js function to swith tab.