Thanks a lot, that was the solution, however now I have another problem.
<xsp-session-fw:getxml as="string" context="authentication"
path="/authentication/data/name"/>
returns not the whole string, I put in the authentication context, but only
the first 7 chars, or so .
For example, when I put "Stephanie Zohner" in the context, only "Stephan" is
returned.
I looked into the generated Java Code. This is the code fragment, that is
generated out of the <xsp-session-fw:getxml> Tag.
XSPSessionFwHelper.getXML(this.manager,
String.valueOf("authentication"),
String.valueOf("/authentication/data/name"))).getFirstChild().getNodeValue())
);
It takes only the first child node of the returned XML Fragment. However
"Stephanie Zohner" is shared among 3 child nodes.Taking only the first node
results in extracting only the first of three parts of my name.
This happens when I use the "as= 'string'". If I use "as= 'object'" I would
get the entire string, but then again I get an eeption (as you have
predicted), because a String is expected by the my method and not an DocumentFragment.
Is it a bug, that only the first node is taken when using the attribute ''as
= 'string''?
Are there any work arounds?
Thanks in advance,
Stephanie
>
>
>
>
> try <xsl:copy-of select="node()"/> instead. That should copy the
> <xsp-session-fw:getxml ...> into the output, where it will later get tu
> rned
> into some kind of java expression (hopefully!) by the xsp-session-fw
> logicsheet. However, I think you want to change your getxml tag as
> attribute to as="string", or else it looks like you will get an
> org.w3c.dom.DocumentFragment instead of String, and get an exception
> anyway!
>
> -Christopher
>
>
>
> Hi,
>
> I have big problems with my custom logicsheet, hopeyou can help:
>
> I would like to read the user name from the authentication context and
> use
> it as a parameter for a method call of my Helper Class.
>
> However, at the time the template wants to replace <xsl:value-of
> select="."/>with the value from the authentication context, there is
> no
> (text) value.
>
> So that in the end, the XSP is transformed to:
>
> BlockerHelper.getInstance().setEditorName();
>
> This throughs an exception, because a String value is expected as metho
> d
> parameter.
>
>
> Every hint is appreciated,
>
> Thanks Stephanie
>
>
>
> My xsp:page looks like this:
> -----------------------------------------------------------------------
> -----
>
> <xsp:page xmlns:xsp="http://apache.org/xsp"
> xmlns:blocker="http://test.de/blocker" xmlns:xsp-session-fw="
> http://apache.org/xsp/session-fw/1.0">
> <page>
> <xsp:logic>
> <!--some java logic -->
> <blocker:set>
> <xsp-session-fw:getxml as="object" context="authentication"
> path="/authentication/data/name"/></blocker:set>
> </xsp:logic>
> </page>
> </xsp:page>
> -----------------------------------------------------------------------
> -----
>
>
> The XSL-Template in my logicsheet looks like this:
>
> -----------------------------------------------------------------------
> -----
>
> <!-- other templates -->
> <xsl:template match="blocker:set">
>
> <xsp:logic>BlockerHelper.getInstance().setEditorName(<xsl:value-of
> select="."/>);
> </xsp:logic>
> </xsl:template>
> <!-- other templates -->
> -----------------------------------------------------------------------
> -----
>
>
> --
> +++ GMX - die erste Adresse f�r Mail, Message, More +++
> Neu: Preissenkung f�r MMS und FreeMMS! http://www.gmx.net
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
+++ GMX - die erste Adresse f�r Mail, Message, More +++
Neu: Preissenkung f�r MMS und FreeMMS! http://www.gmx.net
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]