[prev in list] [next in list] [prev in thread] [next in thread] 

List:       myfaces-user
Subject:    Problem with headerLink
From:       "Hasnain Badami" <hasnainbadami () gmail ! com>
Date:       2006-02-27 18:25:53
Message-ID: 955e5f3b0602271025m23e00b0bre14fa4be9d3e9496 () mail ! gmail ! com
[Download RAW message or body]

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

[Attachment #3 (text/html)]

<div>Hi</div>
<div>&nbsp;</div>
<div>I am setting up a header link component programatically. The code is</div>
<div>&nbsp;</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Div div = new \
Div();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;headerLink = new \
HtmlHeaderLink();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;headerLink.setActionListener(applic \
ation.createMethodBinding(&quot;#{doubleHeadPanelGridController.callFunction}&quot;, \
new Class[] {ActionEvent.class \
}));<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;headerLink.setAction(application.createMethodBinding(&quot;#{doubleHeadPanelGridController.returnAction}&quot;, \
null));<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;headerLink.setImmediate(true);</div> \
<div>&nbsp;&nbsp;&nbsp;&nbsp; </div> <div>&nbsp;&nbsp;&nbsp;&nbsp; HtmlPanelGroup hpg \
= new HtmlPanelGroup();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HtmlOutputText \
collapseToggler = new \
HtmlOutputText();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HtmlOutputText expandToggler = new \
HtmlOutputText();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HtmlOutputText collapseTogglerText \
= new HtmlOutputText(); \
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;collapseToggler.setValue(&quot;&gt;&quot;);<br>&nbsp \
;&nbsp;&nbsp;&nbsp;&nbsp;expandToggler.setValue(&quot;v&quot;);<br>&nbsp;&nbsp;&nbsp;& \
nbsp;&nbsp;collapseTogglerText.setValue(&quot;Interest&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;collapseToggler.setValueBinding(&quot;rendered&quot;, \
 application.createValueBinding(&quot;#{toggle}&quot;));<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;expandToggler.setValueBinding(&quot;rendered&quot;, \
application.createValueBinding(&quot;#{! \
toggle}&quot;));&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hpg.getChildren().add(collapseToggler);
 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hpg.getChildren().add(expandToggler);<br>&nbsp;&nbs \
p;&nbsp;&nbsp;&nbsp;hpg.getChildren().add(collapseTogglerText);<br>&nbsp;&nbsp;&nbsp;& \
nbsp;&nbsp;headerLink.getChildren().add(hpg);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp; \
div.getChildren().add(headerLink);</div> <div>&nbsp;</div>
<div>The problem I am encountering is that the page is reloaded when I click the \
link&nbsp;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. </div>
<div>&nbsp;</div>
<div>hassnain</div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic