Hi
I'm newbie in cocoon
I have an Action that return a message.
I want show this message a the end of execution in a web page.
I find this solution
Action ....
public Map act(Redirector aRedirector, SourceResolver aResolver, Map
aObjectModel, String aSource, Parameters aParameters) throws Exception
{
HashMap result = new HashMap();
result.put("message", "EXIST");
return result;
}
In Sitemap
<map:match pattern="Test">
<map:act type="testAction">
<map:generate type="serverpages" src="ShowMessage.xsp">
<map:parameter name="message" value="{message}" />
</map:generate>
<map:transform src="Message.xsl" />
<map:transform type="encodeURL" />
<map:serialize />
</map:act>
</map:match>
And ShowMEssage.xps
<xsp:page language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:esql="http://apache.org/cocoon/SQL/v2"
xmlns:xsp-request="http://apache.org/xsp/request/2.0"
xmlns:xsp-session="http://apache.org/xsp/session/2.0"
create-session="true"
xmlns:util="http://apache.org/xsp/util/2.0"
xmlns:infoutil="http://www.unifactor.com/infocomm/util/1.0">
<page xmlns:session="http://apache.org/cocoon/session/1.0">
<content>
<info>
<message>
<xsp:expr><util:get-sitemap-parameter name="message" /></xsp:expr>
</message>
</info>
</content>
</page>
</xsp:page>
Is this a good way for do that?
Alternative?
If I want show this
message = "aaa... \n bbb... \n ccc..."
like this
aaa...
bbb...
ccc...
what I have to do ?
Thanks
njko
--
View this message in context:
http://www.nabble.com/Show-Formatted-message-tf3922686.html#a11123171
Sent from the Cocoon - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]