BUG: CommandLinks in Portlets require stacked ActionListeners

Hello,

Okay, after hours of fustration with JSF Portlets in Java Studio Creator 2 Update 1 with Liferay I have finally figured out what the hell was going on.

The problem: Setting the ActionListener property of dynamically created links does not trigger page navigation cases.

The solution (horrible):

Simply create two method bindings to two methods:

For Example:

//an action event method binding.

rosterLinkMB = (MethodBinding) this.getApplication().createMethodBinding("#{PortletPage1.emailRoster_action}", args);

//a regular method binding

navMB = (MethodBinding) this.getApplication().createMethodBinding("#{PortletPage1.button1_action}",null);

Then, when you create the hyperlinks assign navMB to the Action property, and the rosterLinkMB to the ActionListener property.

Then, create the methods like this:

public String emailRoster_action(ActionEvent ae){

/*

* do link ID selection and logic here

*/

returnnull;//always return null.

}

public String button1_action(){

//do the navigation here.

return"someCase";

}

This way, the actionlistener will get called first then the action. You can find out what link was selected and all that and then process the navigation.

Can someone please confirm this for me? I can post a testcase if needbe.

JLS

[1944 byte] By [InterruptRequest] at [2007-11-26 10:35:03]
# 1
hi,Could you please log this issue as a bug . The bug form requests for appropriate info to reproduce the bug.Bug report url: http://developers.sun.com/prodtech/javatools/jscreator/support/index.jspClick on Bug Report / Feature RequestThanksK
kish@sun at 2007-7-7 2:45:10 > top of Java-index,Development Tools,Java Tools...