cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass parameter (tray name) to event handler for Trays?

0 Kudos

Hi,

I've several UI tray elements in my view and all these elements are associated with the action onToggleTrays.

I want to capture the name of the Tray and state of tray(expanded/collapsed).

For this when I try to add parameters to this event handler method, through IWD ParameterPassing, I can add only the expanded property. I'm not able to add the UI element (tray name).

Can you please suggest how to add/pass tray name and tray state to the event handler method?

Regards

Sagar Nanda

Accepted Solutions (1)

Accepted Solutions (1)

monalisa_biswal
Contributor
0 Kudos

create a parameter for the action OnToggle say "id".

In wdDoModifyView get the reference of tray element and map its id to this parameter.

IWDTray tray=(IWDTray)view.getElement("Tray1");

tray.mappingOfOnToggle().addParameter("id",tray.getId());

IWDTray tray2=(IWDTray)view.getElement("Tray2");

tray2.mappingOfOnToggle().addParameter("id",tray2.getId());

Hope it helps.

Answers (1)

Answers (1)

Former Member
0 Kudos

What do you exactly want to achieve?

Armin

0 Kudos

Hi,

I want to capture the name/id of the UI element which fired this event and tray state.

Regards

Sagar

Former Member
0 Kudos

But what do you want to do with the tray ID inside the event handler?

Armin