-
1. Re: using links with themeSelector instead of selectOneMenu
gavin.king Nov 3, 2006 1:01 PM (in response to basel)Use h:commandLink
-
2. Re: using links with themeSelector instead of selectOneMenu
basel Nov 3, 2006 2:21 PM (in response to basel)Where can I specify that the value of themeSelector.theme be set to thm.value? How would using h:commandLink be different from s:link and h:outputLink?
Here is what I have currently:<c:forEach items="#{themeSelector.themes}" var="thm"> <h:commandLink action="#{themeSelector.select}" value="#{thm.value}"> <f:param name="" value="#{thm.value}"/> </h:commandLink> </c:forEach>
I am not sure what the value of the name attribute of f:param should be. -
3. Re: using links with themeSelector instead of selectOneMenu
gavin.king Nov 3, 2006 2:36 PM (in response to basel)Oh if that is what you are trying to do then the easiest way is to use a page parameter in Seam 1.1.
-
4. Re: using links with themeSelector instead of selectOneMenu
basel Nov 4, 2006 5:25 AM (in response to basel)Gavin,
Could you please be more specific? Does that mean I'll have to add @RequestParameter to the getTheme method of the current ThemeSelector in Seam 1.1 and recompile it?
What I am trying to do is to list the themes in one single line as links instead of having them in a drop down menu with a button. Something like this:Select Theme: original | dark | custom
where original, dark and custom are links to existing themes defined in components.xml and having associated .properties files similar to the blog example in Seam 1.1 Beta 1. -
5. Re: using links with themeSelector instead of selectOneMenu
gavin.king Nov 4, 2006 2:00 PM (in response to basel)No, I said a page parameter, not a request parameter. These are defined in pages.xml. Read the Seam 1.1 documentation.
-
6. Re: using links with themeSelector instead of selectOneMenu
basel Nov 5, 2006 10:04 AM (in response to basel)I am lost Gavin. Are you suggesting that I used a page parameter for every page in my web application?
It would be nice to have the following in components.xml:<component name="themeSelector"> <property name="availableThemes"> <value>original</value> <value>dark</value> <value>custom</value> </property> <property name="cookieEnabled>true</property> <property name="currentTheme">dark</property> </component>
Here, the currentTheme can be used to set the theme variable of the ThemeSelector class. -
7. Re: using links with themeSelector instead of selectOneMenu
gavin.king Nov 5, 2006 1:24 PM (in response to basel)OK, if you want to do it that way, just use:
<component name="themeSelector"> <property name="availableThemes"> <value>original</value> <value>dark</value> <value>custom</value> </property> <property name="cookieEnabled>true</property> <property name="theme">#{param.themeName}</property> </component>