You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Hasnain Badami <ha...@gmail.com> on 2006/02/27 19:25:53 UTC
Problem with headerLink
Hi
I am setting up a header link component programatically. The code is
Div div = new Div();
headerLink = new HtmlHeaderLink();
headerLink.setActionListener(application.createMethodBinding("#{
doubleHeadPanelGridController.callFunction}", new Class[] {ActionEvent.class
}));
headerLink.setAction(application.createMethodBinding("#{
doubleHeadPanelGridController.returnAction}", null));
headerLink.setImmediate(true);
HtmlPanelGroup hpg = new HtmlPanelGroup();
HtmlOutputText collapseToggler = new HtmlOutputText();
HtmlOutputText expandToggler = new HtmlOutputText();
HtmlOutputText collapseTogglerText = new HtmlOutputText();
collapseToggler.setValue(">");
expandToggler.setValue("v");
collapseTogglerText.setValue("Interest");
collapseToggler.setValueBinding("rendered",
application.createValueBinding("#{toggle}"));
expandToggler.setValueBinding("rendered",
application.createValueBinding("#{! toggle}"));
hpg.getChildren().add(collapseToggler);
hpg.getChildren().add(expandToggler);
hpg.getChildren().add(collapseTogglerText);
headerLink.getChildren().add(hpg);
div.getChildren().add(headerLink);
The problem I am encountering is that the page is reloaded when I click the
link but neither the action listener nor the action method is called. I even
tried using h:messages but it gives me no error. Any help shall be highly
appreciated.
hassnain