-
1. Re: How to keep component state on page? (rich:panelMenu)?
philip142au.philip_andrew.hotmail.com Dec 17, 2008 3:39 PM (in response to philip142au.philip_andrew.hotmail.com)I want to clarify, it is ok if it is on the same page. Its when I go to a different page, it forgets its state.
How can I pass the state across?I see a selectedChild attribute on it, would I be able to use this?
-
2. Re: How to keep component state on page? (rich:panelMenu)?
luxspes Dec 17, 2008 6:37 PM (in response to philip142au.philip_andrew.hotmail.com)See this thread, you only hope right now is to use an iframe or frames.
-
3. Re: How to keep component state on page? (rich:panelMenu)?
joblini Dec 17, 2008 11:46 PM (in response to philip142au.philip_andrew.hotmail.com)
I see a selectedChild attribute on it, would I be able to use this?Yes, I would try binding selectedChild to a bean in conversation scope. Sounds just like selectedTab (for a TabPanel), which works like a charm!
-
4. Re: How to keep component state on page? (rich:panelMenu)?
joblini Dec 17, 2008 11:48 PM (in response to philip142au.philip_andrew.hotmail.com)You may also need to add something like this to pages.xml if you are doing redirects:
<param name="selectedTab" value="#{commonController.selectedTab}" />
-
5. Re: How to keep component state on page? (rich:panelMenu)?
philip142au.philip_andrew.hotmail.com Dec 18, 2008 4:01 AM (in response to philip142au.philip_andrew.hotmail.com)It sounds like the right idea, thanks - but do you have an example of doing it using the tabs?
I'm very interested to see a similar example to copy.
-
6. Re: How to keep component state on page? (rich:panelMenu)?
joblini Dec 18, 2008 4:22 AM (in response to philip142au.philip_andrew.hotmail.com)Geez, do you want a donut with that ;-)
<rich:tabPanel switchType="ajax" selectedTab="#{commonController.selectedTab}">
@Name("commonController") @Scope(ScopeType.CONVERSATION) public class CommonController extends EntityController { protected String selectedTab; public String getSelectedTab() { return selectedTab; } public void setSelectedTab(String selectedTab) { this.selectedTab = selectedTab; } }
-
7. Re: How to keep component state on page? (rich:panelMenu)?
joblini Dec 18, 2008 4:26 AM (in response to philip142au.philip_andrew.hotmail.com)PS Doesn't need to extend EntityController, nothing special here, just a getter and setter and you're good to go!
-
8. Re: How to keep component state on page? (rich:panelMenu)?
vladimir.kovalyuk Dec 18, 2008 10:20 AM (in response to philip142au.philip_andrew.hotmail.com)FYI, in case you have a long running conversation you will propagate it to /MemberActivityList.xhtml.
-
9. Re: How to keep component state on page? (rich:panelMenu)?
philip142au.philip_andrew.hotmail.com Dec 18, 2008 3:17 PM (in response to philip142au.philip_andrew.hotmail.com)Hi Ingo,
Yes please give me a donut, I've spend over a day full time trying many combinations and what you suggested and it didn't work for me.
My next step will be to try what you suggested for the tab panel to make sure that I can do it AT LEAST with the tab panel. Then I will go back to this rich:panelMenu. I'm about to go insane.
Thanks, Philip
-
10. Re: How to keep component state on page? (rich:panelMenu)?
joblini Dec 18, 2008 6:19 PM (in response to philip142au.philip_andrew.hotmail.com)Hi Philip, have you tried setting breakpoints on the getter and setter in your backing bean? Are these methods being called?
-
11. Re: How to keep component state on page? (rich:panelMenu)?
philip142au.philip_andrew.hotmail.com Dec 20, 2008 4:52 AM (in response to philip142au.philip_andrew.hotmail.com)Hi, It calls get method a lot but never sets it to a different value.
sad -
12. Re: How to keep component state on page? (rich:panelMenu)?
philip142au.philip_andrew.hotmail.com Dec 20, 2008 5:00 AM (in response to philip142au.philip_andrew.hotmail.com)I don't have time for this - $ via paypal or some transfer if you can solve it for me please, email me philip_andrew at the hotm place to discuss. -
13. Re: How to keep component state on page? (rich:panelMenu)?
philip142au.philip_andrew.hotmail.com Dec 21, 2008 2:55 AM (in response to philip142au.philip_andrew.hotmail.com)(please help... begs)
-
14. Re: How to keep component state on page? (rich:panelMenu)?
joblini Dec 21, 2008 5:36 AM (in response to philip142au.philip_andrew.hotmail.com)Post your code, will work for donuts :-)