Hi,
I have a menu component that extends AbstractComponent. It seems that my
DirectLinks in the menu component does not work. I have 4 different Listener
methods and I have injected the pages that they should go to. If I add
sysout:s to se if I end upp in the listener methods nothing happens. I have
done this:
in MenuComp.java:
public abstract class MenuSystem extends AbstractComponent {
/* */
@InjectState("sessionuserinfo")
public abstract SessionUserInfo getSessionUserInfo();
@InjectPage("HomeAction")
public abstract HomeAction getHomePage();
@InjectPage("ContactUsPage")
public abstract ContactUsPage getContactUsPage();
@InjectPage("ArticlePage")
public abstract ArticlePage getArticlePage();
@InjectPage("ArticleListPage")
public abstract ArticleListPage getArticleListPage();
@Override
protected void renderComponent(IMarkupWriter writer, IRequestCycle
cycle) {
.....
writer.begin("a");
writer.attribute("jwcid", "@DirectLink");
writer.attribute("listener", "listener:onClickDirectLinkHomePage" );
writer.attribute("onmouseover", "hideAllButThis('none', 'none');");
writer.attribute("href", "#");
writer.begin("span");
writer.print(menu.getName());
writer.end(); // end span
writer.end(); // end a
....
}
public HomeAction onClickDirectLinkHomePage() {
return getHomePage();
}
public ContactUsPage onClickDirectLinkContactUsPage() {
return getContactUsPage();
}
public ArticleListPage onClickDirectLinkArticleListPage(Long menuId) {
getArticleListPage().setMenuId(menuId);
return getArticleListPage();
}
public ArticlePage onClickDirectLinkArticlePage(Long articleId) {
getArticlePage().setArticleId(articleId);
return getArticlePage();
}
}
The menu component is rendering correctly, but nothing happens when I try to
click on my DirectLinks. Hopefully I just missed something small, but I cant
see it...
Thanks
Jacob
--
View this message in context:
http://www.nabble.com/DirectLink-in-Abstract-Component-tf2419541.html#a6745562
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]