What you want to do is very similar to a the redirect-after-post form
submission pattern.
The string used with @InjectObject is broken into two parts; the
prefix and the value.
The prefix identifies how the value is parsed and interpreted.
The "service:" prefix is built-in to HiveMind, and references a
HiveMind service by its fully qualified id.
Tapestry adds additional prefixes; there's an "engine-service:" prefix
that references a Tapestry engine service by its service name (i.e.,
"page" or "direct"). This is better and eaiser than figuring out the
corresponding HiveMind service id.
Thanks for infos.
@InjectObject("engine-service:page")
public abstract IEngineService getPageService();
Works OK.
If you look at documentation at
http://tapestry.javaforge.com/tapestry-flash/ , you'll see an example
of how to use this for a redirect-after-post.
Unable to get the source code for it. It seems that there is a SVN
problem on the site...
Could you check?
Try:
http://javaforge.com/proj/sources/sccFileLog.do?proj_id=220&filename=tapestry-flash%2Ftrunk
In your case, I would suspect that the proper service would be
"external", so that your destination pages can implement the
IExternalPage interface (and the activeExternalPage() method). Inside
that method, you can get query parameter values from the request cycle
object.
How? I think that I should do something like:
- getServicePage().getLink(false, getPageName()).getAbsoluteURL()
but that would just give me the URL of the current page. I would like to
pass a param like 'status=Success' so I would do:
- String[] str = {"status", "Success"};
- ExternalServiceParameter param = new
ExternalServiceParameter(getPageName(), str);
- getServicePage().getLink(false, param).getAbsoluteURL()
Right? But that throws an Exception saying that ExternalServiceParameter
is not compatible with a String...
What next?
As I understand your external credit card page, you'll invoke
getLink() three times on the external service, getting back ILink
objects for three different pages (or the same page with three
different sets of listener parameters ... or whatever works for you).
Yes, that's the idea. But I don't understand how to pass the parameter
status=xxx
Thanks for your great help.
-jec
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]