I have a component with an embedded DirectLink in the template. The
component's java class has the listener. (These are both given lower down
this e-mail)
Debugging this application, I put a breakpoint on the doShowDetails method,
and try and see what happens.
I have the component embedded (as a first level component) in a list on the
home page, and clicking on the link it creates, causes the listener to fire
(I hit my breakpoint).
I also have the component embedded (several component levels down) inside the
Details page itself. When I click on the link that is created in this case,
the doShowDetails method never hits the breakpoint and the home page is
displayed.
Anyone any idea what I am doing wrong here - or indeed any tips on how to
debug .
The URLs created by the Direct Link both look similar, if slightly different
(I have friendly URLs set up with the .do extension as the state-less
extension for direct service)
URL from home page:-
<a href="/famtree/Home,$Surname.$DirectLink.do?sp=1"
class="surname">Chandler</a>
URL from details page:-
<a href="/famtree/Details,$FamilyList.$Children.$Child.$Surname.
$DirectLink.do?sp=3" class="surname">Chandler</a>
Template:-
<span jwcid="@DirectLink"
listener="listener:doShowDetails"
parameters="ognl:person.id"
class="surname"
><span jwcid="@Insert"
value="ognl:person.surname"
>Chandler</span></span>
Java class:-
package uk.org.chandlerfamily.tapestry.components;
import org.apache.tapestry.annotations.*;
import org.apache.tapestry.BaseComponent;
import org.apache.tapestry.IPage;
import uk.org.chandlerfamily.sqlmap.famtree.PersonSummary;
import uk.org.chandlerfamily.tapestry.famtree.Details;
@ComponentClass
public abstract class Surname extends BaseComponent {
@Parameter
public abstract PersonSummary getPerson();
@InjectPage("Details")
public abstract Details getDetailsPage();
public IPage doShowDetails(int personId) {
Details details = getDetailsPage();
details.setPersonId(personId);
return details;
}
}
There is NO component specification.
--
Alan Chandler
http://www.chandlerfamily.org.uk
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]