I believe the code Mark gave works only if the parameters are what
Tapestry calls "squeezable," meaning that they can be encoded as a
string in the URL. If your parameters aren't serializable, or
shouldn't be serialized, write a custom SqueezeAdaptor.
http://www.google.com/search?q=tapestry+squeeze+adaptor
And I *still* think you need to study the source code for
ExternalService. It will answer a lot of the questions you're asking,
and get you thinking along the right lines.
Did you look at it yet?
Paul
On Aug 29, 2005, at 9:51 AM, Mark Alcocer Flores wrote:
No, actually, I just gave you and example, inside the array of
parameters, you can pass any amount
of parameters or an object of anykind. Try it with more parameters
and it will work.
Mark.
No good. That means that your service is developed only for
passing String reportId and Integer reportType arguments. I want
it to be generic service, capable of passing all kinds of
parameters, same as you can pass any kind/amount of argument to
IActionListener in case of DirectLink.
-Vjeran
----- Original Message ----- From: "Mark Alcocer Flores"
<[EMAIL PROTECTED]>
To: "Tapestry users" <[email protected]>
Sent: Monday, August 29, 2005 4:16 PM
Subject: Re: The hardest problem ever
From what I have read and understand I think you could do
something like this:
Lets say you have a Foreach component and inside you have links
to an special service
<tr jwcid="@Foreach" source="ognl: reports" value="ognl: report"
element="tr">
<td><span jwcid="@Insert" value="ognl: report.id"> 12345 </span></
td>
<td><span jwcid="@Insert" value="ognl: report.name"> Special
Report </span></td>
<td>
<a jwcid="@ServiceLink" service="reportService" parameters='ognl:
{report.id, report.type}'> See
Report
</a>
</td>
</tr>
this way you can send parameters to your service and in the
service you will get them by doing
somthing like this:
public void service(IEngineServiceView engine, IRequestCycle
cycle, ResponseOutputStream output)
throws ServletException, IOException {
Object[] parameters = getParameters(cycle);
String reportId = (Integer) parameters[0];
Integer reportType = (String) parameters[1];
// Your call to your PDF service
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]