-
1. Re: a4j:commandLink not working in dynamically generated rich:tabPanel
nbelaevski Jun 13, 2011 11:10 PM (in response to scott.jones618)Hi Scott,
Does someBean have scope with lifetime longer than request?
-
2. Re: a4j:commandLink not working in dynamically generated rich:tabPanel
scott.jones618 Jun 14, 2011 9:14 AM (in response to nbelaevski)Yes, it's SessionScoped.
@ManagedBean @SessionScoped @Transactional public class SomeBean { //blah, blah... public List<ItemDTO> getItems() { //queries database and returns non-empty list... } public String someAction() { return "fooBar.jsf" } }
I read elsewhere that you should use a4j:htmlCommandLink but that's not available in RichFaces 4.0.0.
-
3. Re: a4j:commandLink not working in dynamically generated rich:tabPanel
ilya_shaikovsky Jun 14, 2011 4:12 PM (in response to scott.jones618)could you try just to check with h:command?
I read elsewhere that you should use a4j:htmlCommandLink but that's not available in RichFaces 4.0.0.
not it should not be the case. it was such workaround for h:commandLink..
-
4. Re: a4j:commandLink not working in dynamically generated rich:tabPanel
scott.jones618 Jun 14, 2011 5:36 PM (in response to ilya_shaikovsky)could you try just to check with h:command?
I tried using h:commandLink and I got an IllegalArgumentException (see this thread: http://community.jboss.org/thread/167979). It was that error that lead me to try a4j:commandLink as a work-around.
-
5. Re: a4j:commandLink not working in dynamically generated rich:tabPanel
williajd Jul 27, 2011 9:09 AM (in response to scott.jones618)I'm seeing exactly the same thing. If you attempt to use any type of commandLink inside a list of some sort the action on that link is not called. I've also tried commandButton and the a4j variations of those.
<rich:list var="venue" value="#{searchManager.results}" type="definitions" stateVar="status"> <h:form> <h:commandLink value="RATE IT" immediate="true" action="#{venueScore.selectVenue}" /> </h:form> </rich:list>
The position of the form also doesn't matter.
<h:form> <rich:list var="venue" value="#{searchManager.results}" type="definitions" stateVar="status"> <h:commandLink value="RATE IT" immediate="true" action="#{venueScore.selectVenue}"> </h:commandLink> </rich:list> </h:form>
If I just have the link by itself (no list) it works.
Any help would be greatly appreciated.
-
6. Re: a4j:commandLink not working in dynamically generated rich:tabPanel
williajd Jul 28, 2011 10:11 AM (in response to williajd)Was able to fix this. The link is not found because the list of results is not available when the link is clicked. Changing the searchManager bean to have an @ViewScope fixed the problem. See here for the source of the answer: http://stackoverflow.com/questions/6844830/hcommandlink-not-working-when-inside-a-list
-
7. Re: a4j:commandLink not working in dynamically generated rich:tabPanel
jeffpoos Nov 1, 2011 2:55 PM (in response to williajd)Hello. I took over work from Scott, the OP. I am still having this error and cannot find a workaround. The Bean is @SessionScoped the list generating the tabs is not changeing. Has anyone else run in to this and been able to fix it. I need to use a h:commandLink btw
-
8. Re: a4j:commandLink not working in dynamically generated rich:tabPanel
healeyb Nov 2, 2011 4:10 AM (in response to jeffpoos)Jeff, can you try using ui:repeat instead of c:forEach? I think it should slot in without having to
change too much code.
edit: sorry, silly suggestion!