Hrm.  Somehow I didn't notice until now that all the Link components
take an ILinkRenderer parameter.  Sorry about that:


public class RawURLLinkRenderer implements ILinkRenderer {
    public void renderLink(IMarkupWriter writer,
                           IRequestCycle cycle,
                           ILinkComponent linkComponent) {
        writer.print(linkComponent.getLink(cycle).getAbsoluteURL(),
true);
    }
}


<script ..>
function simulatedLink() {
  window.location='<span jwcid="@PageLink" page="CompanyEdit"
renderer="ognl:new ...RawURLLinkRenderer()" />';
}
</script>


So beautiful. ^_^

Jim

-----Original Message-----
From: Jim Steinberger [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 16, 2006 6:28 PM
To: Tapestry users
Subject: "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 

 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to