cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yves Vindevogel <yves.vindevo...@implements.be>
Subject Re: End of Session in Sitemap
Date Mon, 12 Jun 2006 12:57:48 GMT
Ok, tnx
I'm gonna try to do this.

Ard Schrijvers wrote:
> in your map:components in map:selectors define:
>
> <map:selector name="simple" 
>     src="org.apache.cocoon.selection.SimpleSelector"/>
>
> in your sitemap, do something like: 
>
> <map:select type="simple">
>    <map:parameter name="value" value="{session-attr:username}"/>
>       <map:when test="">
>         <map:generate src="inlogform.xml"/>
>        </map:when>
>        <map:otherwise>
> 	  <!-- when session not empty -->
> 	  <map:generate src="query.xml">
> 		<map:parameter name="username" value="{session-attr:username}"/>
>         </map:generate>    
>         <map;transform type="sql"/>    
> 	 </map:otherwise>
> etc etc
>
> Hope this helps...
>
> Regards Ard
>
>
>   
>> Don't know, that's what I was asking (kind of)
>>
>> Ard Schrijvers wrote:
>>     
>>> Can't you use a map:selector to test wether the session is empty? 
>>>
>>> Regards Ard
>>>
>>>   
>>>       
>>>> Hi,
>>>>
>>>> My session object contains the data of the database it has 
>>>>         
>> to connect 
>>     
>>>> to.  When the session expires, I get an error when trying 
>>>>         
>> to connect.
>>     
>>>> I could capture this in my code, but I would rather do it in 
>>>> my sitemap.
>>>>
>>>> Can I do this ?
>>>>
>>>> I would like to start a different generator based up the session 
>>>> variable "database"
>>>>
>>>> Regards
>>>> Yves Vindevogel
>>>>
>>>>
>>>>     
>>>>         

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message