cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Pietschmann" <>
Subject Accessing BrowserSelector results from an Action
Date Thu, 31 Mar 2005 19:19:39 GMT
I'll try to keep it as short as possible:

Say you have a BrowserSelector in your Sitemap:

<map:selector name="renderer"
	<browser name="desktop" useragent="MSIE 6.0"/>
	<browser name="desktop" useragent="Gecko"/>
	<browser name="pocketcolor" useragent="PPC"/>
	<browser name="mobile" useragent="OPWV-SDK"/>	

Furthermore there's an action which does something, depending on what the
browser is.
At the moment I'm using the selector in the sitemap, to tell my action which
browser is currently requesting:
<map:select type="browser">
	<map:when test="desktop">
		<map:act type="updateModel">
			<map:parameter name="format" value="xHTML"/>
	<map:when test="pocketcolor">
		<map:act type="updateModel">
			<map:parameter name="format" value="cHTML"/>
	<map:when test="pocket">
		<map:act type="updateModel">
			<map:parameter name="format" value="cHTML"/>

Well, instead of passing a different parameter value for each case it would
be much easier for me if I could save this map:select, just specify my
action once and somehow access the BrowserSelector value from within my

How can I access the values the BrowserSelector has chosen?


View raw message