Thanks solprovider,

I used Lenya 2.0.3 version.

I think that Read DOM Session Transformer is not valid for resolve my
problem because I set "MyUser" object in session in a .java class and not
from the WriteDomSession.

I think that I need get  'MyUser.getName()'  in a pipeline and then get it
in a xsl file.
 
 For example, with the "chosenlanguage" parameter:

"Sitemap.xmap "

<map:transform
src="fallback://lenya/modules/sitetree/xslt/navigation/sitetree2nav.xsl"
label="navtree">
          <map:parameter name="chosenlanguage"
value="{request-param:language}"/>
          <map:parameter name="defaultlanguage"
value="{page-envelope:default-language}"/>
          <map:parameter name="extension" value="html"/>
</map:transform>

and then in "example.xsl" I can get "choselanguage" parameter:

 .
 .
<td><input type="text" name="language" value="{$chosenlanguage}"
size="5"/></td>
 .
 .

 Any ideas are grateful.










solprovider-2 wrote:
> 
> You might try the "Read DOM Session Transformer":
> http://cocoon.apache.org/2.1/userdocs/readdomsession-transformer.html
> 
> I have not used this Transformer.  I created an XSP to generate user
> information and aggregated for processing with XSL.  Better methods
> are likely.
> 
> Which version of Lenya is being used?  The answer is very likely to
> affect possible solutions.
> 
> solprovider
> 
> On 1/8/09, Frank Hamilton <[email protected]> wrote:
>>  I´m create an usecase that put  "myUser" object in to
>>  org.apache.cocoon.environment.Session. This is for my own login task in
>>  Lenya. This usecase create "myUser" object from my own BD (if the user
>> exist
>>  in BD), and put it in Session.
>>
>>  My question is: Can I get myUser.getName() from session in
>> page2htmlHome.xsl
>>  (for example)?. I need this to put the name of loger user in the header
>> of
>>  my publication.
>>
>>  Thanks, and excuse my poor English.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-get-session-Attribute-tp21351269p21369609.html
Sent from the Lenya - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to