Skip to Content
0
Former Member
Jun 21, 2011 at 04:36 AM

Event Handling in Abstract Portal Component

30 Views

Hi Friends,

I am using HTMLB Classlib in an Abstract Portal Component to develop a Dropdownlistbox. Now I want to handle the event of change of selection in this dropdown. However, this event is not getting captured. Sample code is as follows:

public class dropdownsimple extends AbstractPortalComponent

{

public void onClick(Event event)

{

}

public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)

{

IPageContext myContext1 = PageContextFactory.createPageContext(request, response);

Form myForm = myContext1.createFormDocument("CRMForm");

GridLayout myGrid = new GridLayout();

DropdownListBox drp = new DropdownListBox("drp");

drp.addItem("Key 1","Item 1");

drp.addItem("Key 2","Item 2");

drp.setOnSelect("onClick");

myGrid.addComponent(1, 1, drp);

myForm.addComponent(myGrid);

myContext1.render();

}

}

I am able to see the dropdown box along with values when I preview the PAR iView created from this component. Please let me know how to capture the event of change of selection in the dropdown?

Edited by: Shetul Chothani on Jun 21, 2011 6:37 AM