Nick Westgate wrote:
> Hi Martin.
>
> A typical way to do this in previous Tapestry versions is to have
> some simple logic functions in your component class to provide a
> boolean result ("this link is to the current page") which is used
> for each link's disabled parameter, and to select a string supplied
> to an informal CSS "style" parameter on each link.
>
> T5 would be the same, except that the core PageLink component needs
> a few tweaks to be fit for your task - so roll your own from that -
> and you will have to create an equivalent of the old getPageName().
> BTW, you can use resolver.resolvePageClassNameToPageName(pageClassName) to get page name for given page class name, where resolver is org.apache.tapestry.services.ComponentClassResolver. Current page class name could be retrieved as resources.getPage().getComponentResources().getComponentModel().getComponentClassName(), where resources is org.apache.tapestry.ComponentResources injected in component. That's how my menu is working. -- WBR, Ivan S. Dubrov
signature.asc
Description: OpenPGP digital signature
