-
1. What to use instead of <a4j:include>?
ilya_shaikovsky Feb 21, 2011 5:18 AM (in response to rjevans2000)unfortunatelly untill include will not be migrated (planned to after final version) you will not be able to use JSF navigation within the subview. Instead you could only emulate navigation using ui:include with src="#{someEL}" and managing that someEl in your actions.
-
2. What to use instead of <a4j:include>?
jbalunas Feb 21, 2011 8:18 AM (in response to ilya_shaikovsky)Ilya - I believe we have a jira in place to create a wiki page describing this in more detail. As you say it is possible ot do this functionality, but manage some minor items yourself.
-
3. What to use instead of <a4j:include>?
rjevans2000 Feb 21, 2011 5:33 PM (in response to jbalunas)Thanks for the replies guys. Do you know of any examples that achieve the wizard behaviour I'm trying to achieve that use richfaces 4?
-
4. What to use instead of <a4j:include>?
ilya_shaikovsky Feb 22, 2011 5:12 AM (in response to rjevans2000)hey just realized that we even not need the custom navigation... (writing sample and will update you as done)
-
5. Re: What to use instead of <a4j:include>?
ilya_shaikovsky Feb 22, 2011 6:47 AM (in response to ilya_shaikovsky)Here is it. Decided to store somewhere except the user thread in order to reuse without searching
-
6. What to use instead of <a4j:include>?
rjevans2000 Mar 2, 2011 5:05 AM (in response to ilya_shaikovsky)This is a great article. However, I am unable to have the a4j:commandButton make a call to a backing bean method.
I am attempting the following behaviour: on clicking Next, the togglePanel changes item AND a backing bean method is called. I have tried using the action parameter on the commandButton, but this doesn't seem to get called when it has a nested toggleControl.
Please can you try this out and let me know how to get it working. Thanks
-
7. What to use instead of <a4j:include>?
ilya_shaikovsky Mar 2, 2011 5:28 AM (in response to rjevans2000)1) you could try to use event="action" for control. Then action/actionListener supposed to be fired(let me know if not)
2) you could use itemChangeListener on the togglePanel.
-
8. What to use instead of <a4j:include>?
rjevans2000 Mar 3, 2011 3:25 PM (in response to ilya_shaikovsky)I can't get option 1) to work:
<a4j:commandButton value="Next" action="#{myBean.myMethod}" >
<rich:toggleControl targetItem="@next" event="action" />
</a4j:commandButton>
myMethod does not get called when I click Next.
Am I missing something?
-
9. What to use instead of <a4j:include>?
rjevans2000 Mar 5, 2011 3:38 AM (in response to rjevans2000)Please can somebody try this and let me know if they have the same problem?
Thanks
-
10. What to use instead of <a4j:include>?
nikh123123 Mar 5, 2011 8:40 AM (in response to rjevans2000)@rory, I think you need to use execute attribute on the <a4j:commandButton> (execute="@this" or execute="@form" as per your need).
-
11. What to use instead of <a4j:include>?
rjevans2000 Mar 5, 2011 10:34 AM (in response to nikh123123)Thanks for the suggestion Nikhil. Unforunately this doesn't work for me.
My problem is as follows:
<a4j:commandButton value="Next" action="#{myBean.myMethod}" >
<rich:toggleControl targetItem="@next" event="action" />
</a4j:commandButton>
The above code changes to the next panel as expected but the action on the commandButton does not get called.
However, the following code DOES work:
<a4j:commandButton value="Next" action="#{myBean.myMethod}" >
</a4j:commandButton>
So it seems that the introduction of the rich:toggleControl component stops the action from firing?
I also get this behaviour when attempting to nest a rich:componentControl tag inside a commandButton.
Any ideas?
-
12. Re: What to use instead of <a4j:include>?
nikh123123 Mar 16, 2011 3:56 AM (in response to rjevans2000)Ok even I confirm this issue @rory. I didn't find a solution yet!
EDIT: Ok this worked for me
<a4j:commandButton value="Next" action="#{myBean.myMethod}" >
<rich:toggleControl targetItem="@next" event="action" disableDefault="false" />
</a4j:commandButton>
-
13. Re: What to use instead of <a4j:include>?
ilya_shaikovsky Mar 17, 2011 5:34 AM (in response to rjevans2000)you're right, the behavior replaces default button ajax JS call with the call to panel state change, and action getting ignored(actually behavior just call the panel to change state, so actually not the button but the panel itself became source of the event.). And workaround is to use itemChangeListener of the togglePanel.