You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Lincoln Stoll <ls...@internode.on.net> on 2004/11/10 18:29:36 UTC
Calling service from listener
Hi All,
Sorry if this is a stupid question, but can't seem to find an answer
anywhere.. Is is possible to call a service from a listener method? I needed
an excel download (well, csv at the moment..) in my app, so implemented a
service to handle this, which works great when linked in from a ServiceLink
component, so all is good there. But now I want to have a form submit, do
some processing, then send the user to service. I can't see an obvious way..
So can anyone share any hints they may have?
Cheers,
Linc.
Re: Calling service from listener
Posted by Michael Henderson <mh...@mac.com>.
Hi,
Or activate a VERY custom page that does all of it's own rendering
and have that page stream back the bytes of your CSV
Or, why not use a tapestry component to generate your CSV, something
like:
<span jwcid="@Foreach" source="ognl:rows" element="ognl:row">
<span jwcid="@Foreach" source="ognl:row.columns"
element="ognl:column">"<span jwcid="@Insert"
value="ognl:column.value">",</span>
</span>
Of course you would have to be careful with whitespace and stop the
comma printing at the end of the line
Tapestry uses XML markup, but you do not have to emit tag based markup
from you components
Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: Calling service from listener
Posted by Lincoln Stoll <ls...@internode.on.net>.
Thought about that.. Problem is generating the Url, I pass a custom object
in to it, which I'm guessing tapestry serializes and places in the request.
I was hoping there was an easy way to make tapestry do it, but I guess if I
grab the source and see how its created, then just throw a redirectexception
to it, that should cover it.
Cheers,
Linc.
-----Original Message-----
From: Michael Henderson [mailto:mhinca@mac.com]
Sent: Thursday, November 11, 2004 4:40 AM
To: Tapestry users
Subject: Re: Calling service from listener
Hi,
Redirect?
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Calling service from listener
Posted by Michael Henderson <mh...@mac.com>.
Hi,
Redirect?
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org