cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <>
Subject Re: [xsp-session-fw][authentication] getting role
Date Wed, 21 Jan 2004 11:29:54 GMT
On 21.01.2004 12:23, Stephanie Zohner wrote:

> Hi,
> This is a bug, in my opinion. I already posted it in the dev mailing list
> (but haven't got an answer yet).

Does an entry on bugzilla exist? Antonio, I don't want to point on you, 
but wasn't that your extension (getxml)??


> Here's my work around: Think of "role", instead of "name"
> <xsp:logic>
> org.w3c.dom.DocumentFragment fragment = <xsp-session-fw:getxml as="object"
> context="authentication" path="/authentication/data/name"/>
> StringBuffer name = new StringBuffer();
> for(int i = 0; i&lt; fragment.getChildNodes().getLength(); i++){
> name.append(fragment.getChildNodes().item(i).getNodeValue());			
> }			
> </xsp:logic>
> Now the whole string is saved in the variable "name", you can use now for
> your perpose.
> Hope that helped,
> Good luck,
> Stephanie
>>I'm using the Authentication framework and was trying to retreive the 
>>'role' of a user by using the session. (just using the sitemap parameter 
>>{role} works fine)
>>In an XSP I used the following line:
>>String role = <xsp-session-fw:getxml  context="authentication"  
>>path="/authentication/role" as="string"/>;
>>I expected to get the full value of 'role', but got only a part of it. 
>>Apparently that line does not get every text node from the role element, 
>>but just the first one.
>>(If I retreive it as a documentfragment, all is fine but I do want it as 
>>a string and don't want to parse the node itself!)
>>Is this a bug?? If not, what is the meaning of the 'as="string"'??

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message