tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olve Hansen <olve.han...@intermedia.uib.no>
Subject Re: Get a list of pages in current application?
Date Mon, 05 Sep 2005 08:24:13 GMT
fre, 02,.09.2005 kl. 16.52 -0700, skrev Patrick Casey:

>  
>             Is there a way to get a list of all the pages in the current
> application? Preferably one that can be accessed statically so I can get the
> list outside of the response cycle?
> 


We have in a way short-circuited the page specification scheme, where we
have a plugins, which in turn makes a set of pages available.
When the engine starts, these plugin pages are registered in tapestry,
and Then they can be retrieved later on.
This works in tapestry 3, in v 4 I really don't know (yet - anyone who
can shed some light on this?)

	private void registerPage(String specPackagePath, BLink bLinkPage) {
		IApplicationSpecification applicationSpecification =
getSpecification();

		applicationSpecification.setPageSpecificationPath(
		        bLinkPage.getPageName(), specPackagePath +
bLinkPage.getSpecificationPath()
		);

		
	}

The BLink is our frameworks notion of a page, knowing the path and a
page name, among other things. 

Later you can get a list of all registered pages in tapestry, if you
have access to the engine:
		IApplicationSpecification applicationSpecification =
getSpecification();
                applicationSpecification.getPageNames(); 


Hth.

Olve S. Hansen

Mime
View raw message