You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jim Steinberger <st...@dynedge.com> on 2006/02/17 00:27:52 UTC
"Manually" calling listeners.
I'm looking for a way to embed listener-calling URLs directly in the
page, rather than in an <a>-tag ala the DirectLink component. Is that
currently possible in a relatively straightforward way?
e.g.
<script ..>
function simulatedLink() {
window.location='<span jwcid="@Insert"
...some_magic_that_results_in_the_same_URL_that_a_DirectLink_would_gener
ate ... />';
}
</script>
Thanks,
Jim
Re: "Manually" calling listeners.
Posted by Jesse Kuhnert <jk...@gmail.com>.
Yeah, I think the most correct way to do it would be using the LinkFactory +
DirectServiceParameters to construct the link the same way that DirectLink
does, but without having those sources in front of me right now I know that
the quick and dirty method would be if you defined a DirectLink you wanted
to use the url of, and then call
"ognl:yourDirectLink.getLink(requestCycle).getURL()"
(Might want to double check method signatures for ILink )
jesse
On 2/16/06, Jim Steinberger <st...@dynedge.com> wrote:
>
> I'm looking for a way to embed listener-calling URLs directly in the
> page, rather than in an <a>-tag ala the DirectLink component. Is that
> currently possible in a relatively straightforward way?
>
> e.g.
>
> <script ..>
> function simulatedLink() {
> window.location='<span jwcid="@Insert"
> ...some_magic_that_results_in_the_same_URL_that_a_DirectLink_would_gener
> ate ... />';
> }
> </script>
>
>
>
> Thanks,
>
> Jim
>
>
>
>
>
Re: "Manually" calling listeners.
Posted by Ron Piterman <rp...@gmx.net>.
thought about using external link + a switch parameter ?
say you pass 2 params to your external page and in the activate method
you check the first's value, and use it to decide what to do, passing
the second as parameter...
you will have to use the link factory to generate the link anyway, but
its quite straight forward that way...
however, you can not use the same technique when using components, which
might be a prob.
cheers,
Ron
Jim Steinberger wrote:
> I'm looking for a way to embed listener-calling URLs directly in the
> page, rather than in an <a>-tag ala the DirectLink component. Is that
> currently possible in a relatively straightforward way?
>
> e.g.
>
> <script ..>
> function simulatedLink() {
> window.location='<span jwcid="@Insert"
> ...some_magic_that_results_in_the_same_URL_that_a_DirectLink_would_gener
> ate ... />';
> }
> </script>
>
>
>
> Thanks,
>
> Jim
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org