cancel
Showing results for 
Search instead for 
Did you mean: 

Binding UI elements to Java Listeners

Former Member
0 Kudos

Hi All,

Can someone please give me the possibility of binding a WD UI element to a Java listener?

(Please consider this as a continuation of the discussion at )

I know as such this is not possible in WD, but any workarounds ???

Thanks in advance,

Best Regards,

Nibu.

Message was edited by: Nibu Wilson

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Maksim,

Thanks for your reply. Sorry, I should have made my query more clear. What I want is to create a new event & add a corresponding listener for it. The reply you gave helps in binding already defined events like 'onEnter' to a java listener. What if I want a listener to always listen to some input field and display the no: of characters entered???

Best Regards,

Nibu.

Former Member
0 Kudos

Nibu,

It is just impossible:

1. It is impossible to introduce new events without subclassing UI control (obvious, I hope)

2. It is impossible to sublass UI control (undocumented + extremely complex)

3. It requires very complex client-side support via scripting (sure, "very complex" in generic case) and it not exists in current WD client rendering model.

VS

former_member182372
Active Contributor
0 Kudos

Sorry, you can use only predefined set of actions in dynpro. You can only limit number of characters entered using your own custom type.

former_member182372
Active Contributor
0 Kudos

Hello,

Create action handler with 2 parameters - actionname and elementID.

Iterate through your UI elements and bind available actions to one action handler and add action mapping to UI element ID and to type of action (onEnter, onAction etc.)

After you can create map with vector of listeners as value and action name as key.

In action handler (which is only one for all UI elements) you can extract list of listeners using actionname and call each of them passing UI element ID.

Regards, Maxim R.

Former Member
0 Kudos

Hi,

It is impossible to bind key listeners to UI elements in webdynpro. Some sort of client side eventing is required for

that.

Hope this helps you

Regards

Rohit