-
1. Re: Action not called for commandLink when it is included in
sergeysmirnov May 16, 2008 2:09 PM (in response to kjohnston)the information you provided is not enough to make any suggestion. The ui:include itself could not be a reason.
-
2. Re: Action not called for commandLink when it is included in
kjohnston May 16, 2008 2:34 PM (in response to kjohnston)More information. Looks like it is a problem when the ui:include is inside a ui:fragment tag:
It works fine if the ui:include is not inside a ui:fragment. However, if I have a conditional include like this:
<h:panelGroup id="content">
<ui:fragment rendered="#{test.a}" >
<ui:include src="/pages/config/testAjax.xhtml"/>
</ui:fragment>
<ui:fragment id="b" rendered="#{test.b}">
<ui:include src="/pages/config/testAjax.xhtml"/>
</ui:fragment>
</h:panelGroup>
Where testAjax.xhtml is
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:rich="http://richfaces.ajax4jsf.org/rich"
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">
<h:form>
<a4j:commandLink id="test" action="#{bean.go}">Go</a4j:commandLink>
</h:form>
Then the "go" method is never invoked. -
3. Re: Action not called for commandLink when it is included in
kjohnston May 16, 2008 2:45 PM (in response to kjohnston)Hm, getting closer I think.
The 'go' method is actually called for the *first* included page, but just not the second. -
4. Re: Action not called for commandLink when it is included in
kjohnston May 16, 2008 3:21 PM (in response to kjohnston)Nevermind - I found a better way to do what I wanted.
I am now using the rich:tab control. Everything is working fine. -
5. Re: Action not called for commandLink when it is included in
kjohnston May 16, 2008 4:28 PM (in response to kjohnston)How about that - the same problem occurs with the tab panels. If I make the panel with the actions the first panel that is loaded, the action works fine. But if the panel is the second panel loaded, the action does not work.
-
6. Re: Action not called for commandLink when it is included in
kjohnston May 16, 2008 5:17 PM (in response to kjohnston)If I set the switchType to 'client' the actions do work in the second tab, even when it is not the first tab displayed.