You're right Leonardo!

I've solved the problem anyway :p

On my html page I've added a directlink component whose behaviour I
wanted imitate.

        <span jwcid="@Foreach" source="ognl:getMapAreas(profileRow.startDate,
profileRow.endDate, 150,100)" value="ognl:mapArea">
                <span jwcid="[EMAIL PROTECTED]" disabled="true"
listener="listener:doShowDailyTotal"
parameters="ognl:{mapArea.startDate, mapArea.endDate}"/>
                <area jwcid="[EMAIL PROTECTED]" shape="rect"
coords="ognl:getCoords(mapArea)" href="ognl:getURL()"/>
        </span>

In the @Any component I have an href which calls a method in my page class.

The definition of the method in the page class is

    public String getURL() {

        return 
((DirectLink)getComponent("directlink")).getLink(getRequestCycle()).getURL();

    }

Now I have the URL I need to do exactly want I want. I can't believe
this actually worked :)

I've seen an example of what Geoff talked about, but I couldn't work
out how to imitiate the directlink behaviour I wanted.



On 14/11/05, Leonardo Quijano Vincenzi <[EMAIL PROTECTED]> wrote:
> Heheh I don't want to be rude or something, but you did ask for a
> 'pointer' and that's what Geoff gave you. But it's not that hard, trust me.
>
> You should checkout how to inject services in the Tapestry's Manual. I
> think that can help you out.
>
> --
> Ing. Leonardo Quijano Vincenzi
> Director Técnico
> DTQ Software
>
>
> Jabbar wrote:
> > Thanks for you answer Geoff, but I need an example. I've been using
> > tapestry for a while but don't consider myself as a expert, like
> > yourself :)
> >
> > On 14/11/05, Geoff Longman <[EMAIL PROTECTED]> wrote:
> >
> >> get a reference to the Direct service and call the getLink() method.
> >> then call getUr() on the ILink that's returned (Tapestry 3 but T4
> >> should have similar sematic).
> >>
> >> Geoff
> >>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Thanks

Jabbar Azam

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

Reply via email to