If you put a direct link into your component and then put the listener
method into your component's Java file, you're done.
This is code from a custom component:
Page spec:
<component id="editGradesLink" type="DirectLink">
<binding name="listener" expression="listeners.editGradesLink"/>
<binding name="parameters"
expression="components.sectionsTable.currentRow.courseSectionId"/>
</component>
Java file:
public void editGradesLink(IRequestCycle cycle) {
EditGrades page = (EditGrades)cycle.getPage("grades/EditGrades");
page.setCourseSectionId((Integer)cycle.getServiceParameters()[0]);
cycle.activate(page);
}
Tim Sawyer wrote:
Hi all,
I'm new at this, so be gentle. :)
I'm writing a component, and I want to render some links (like DirectLink) from
within the component, that call listener methods in my component.
I have the Tapestry In Action book and I'm looking at the DirectArea component
stuff in Chapter 6, but I'm stumped as to how to link to my own methods, rather
than specifying the methods as parameters to the component.
Can anyone nudge me in the right direction?
Thanks,
Tim.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]