You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Patrick Casey <pa...@adelphia.net> on 2005/04/19 23:04:49 UTC

Listener reference question

	I have a page named "GenericList" with a listener named
"rowSelected".

	I have a component called "drawGrid" on said page that draws rows (a
lot of rows). For various reasons, this particular component renders the row
body in java code (there is nothing in drawGrid.html).

	On each of these rows, I want to put a link that references back to
the parent page's rowSelected listener.

	I'm having a bit of a struggle doing so though.  The approach I've
been trying so far is:

      IPage p = (IPage) this.getContainer();
	String url =
cycle.getEngine().getService(Tapestry.DIRECT_SERVICE).getLink(
				cycle, p, parameters).getURL();
	writer.begin("a");
	writer.attribute("href", url);
	writer.closeTag();
	writer.print("select");
	writer.end("a");

	This almost works, but the url that comes out references a null
service e.g. I get:

	../app?service=direct/1/GenericList/null&sp=..

	Where I (unless I'm serious confused as to how tapestry generates
links) think I really want to be getting:

	../app?service=direct/1/GenericList/rowSelected&sp=..

	What's the property way for a component to attach (in java) a link
to a listener in a parent page? 

	--- Pat



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org