-
1. Re: <rich:panelBar> which one is the selected panelBarItem ?
nbelaevski May 7, 2009 7:56 PM (in response to christo976)Hi,
Try "selectedPanel" attribute. -
2. Re: <rich:panelBar> which one is the selected panelBarItem ?
christo976 May 11, 2009 4:53 AM (in response to christo976)Ok, I will try.
Thanks for your help.
Chris -
3. Re: <rich:panelBar> which one is the selected panelBarItem ?
christo976 May 11, 2009 5:27 AM (in response to christo976)Unfortunately, it doesn't work. The "selectedPanel" value is always null.
What did I miss ?<rich:panelBar id="panel_bar" binding="#{emailParamCtrl.panelBar}"> <rich:panelBarItem id="validation" name="validation"> <a4j:include viewId="/pages/parametrage/parametrage-editor.xhtml"/> </rich:panelBarItem> <rich:panelBarItem id="remind" name="remind"> <a4j:include viewId="/pages/parametrage/parametrage-editor.xhtml"/> </rich:panelBarItem> </rich:panelBar>
-
4. Re: <rich:panelBar> which one is the selected panelBarItem ?
nbelaevski May 11, 2009 5:57 AM (in response to christo976)rich:panelBar is switching in client mode only, so it doesn't update server on its state itself; you should add a4j:support or fire request by another means.
-
5. Re: <rich:panelBar> which one is the selected panelBarItem ?
leolo Aug 25, 2009 9:50 AM (in response to christo976)"nbelaevski" wrote:
rich:panelBar is switching in client mode only, so it doesn't update server on its state itself; you should add a4j:support or fire request by another means.
I'm facing the same issue "how to bring panelBar-client-mode-state-change" to the backing beans.
You said, one should add a4j:support, how does this look like?
I tried:<rich:panelBar> <a4j:form> <a4j:support action="#{backingBean.panelChanged}" event="onclick"/> </a4j:form> <rich:panelBarItem id="1">...</rich:panelBarItem> <rich:panelBarItem id="2">...</rich:panelBarItem> <rich:panelBar>
Doesn't work. The doc of <a4j:support> says, that "wiring with events dynamically attached on the client side is not supported. "
Any idea, how I can add a4j:support in this case?
Regards, LeoLo -
6. Re: <rich:panelBar> which one is the selected panelBarItem ?
ilya_shaikovsky Aug 25, 2009 10:43 AM (in response to christo976)Seems you trying to rely on some kind of magic in your snippet. Support should be pointed to component event. And I'm not sure what could be expected using such code.
Actually you should use something like this<rich:panelBar height="400" width="500" selectedPanel="#{userBean.name}"> <a4j:support event="onitemchange"/> <b>But</b> thanks to your post next issues was opened: https://jira.jboss.org/jira/browse/RF-7763 https://jira.jboss.org/jira/browse/RF-7764 Vote for the first one - it will add new event to resolve the state saving problem.
-
7. Re: <rich:panelBar> which one is the selected panelBarItem ?
ilya_shaikovsky Aug 25, 2009 10:44 AM (in response to christo976)Seems you trying to rely on some kind of magic in your snippet. Support should be pointed to component event. And I'm not sure what could be expected using such code.
Actually you should use something like this<rich:panelBar height="400" width="500" selectedPanel="#{userBean.name}"> <a4j:support event="onitemchange"/>
But thanks to your post next issues was opened:
https://jira.jboss.org/jira/browse/RF-7763
https://jira.jboss.org/jira/browse/RF-7764
Vote for the first one - it will add new event to resolve the state saving problem. -
8. Re: <rich:panelBar> which one is the selected panelBarItem ?
leolo Aug 25, 2009 11:10 AM (in response to christo976)voted...so even dumb questions have their right to exist and maybe lead to improvements. :)
An easy way for the panelBar-statesaving for me would be the valueChangeListener of rich:panelBar.
What is the semantic of this attribute? Is there a meaning behind the behaviour?
To me it looks like that the valueChange-Event is always "one change behind" the real change.
event.oldValue points to the penultimate panelBarItem, event.newValue points to the lastly clicked panelBarItem, but not to the currently clicked panelBarItem.
Is this a bug or a desired behaviour?
Regards, LeoLo -
9. Re: <rich:panelBar> which one is the selected panelBarItem ?
ilya_shaikovsky Aug 25, 2009 11:22 AM (in response to christo976)the problem that for now only cancelable events fired before switching exist.. So no way to send request after switch performed actually :( Some dirty hacks like combination of setTimeout and jsFunction probably will works but it seems this not a good solution..