cancel
Showing results for 
Search instead for 
Did you mean: 

HTMLB .. Input field event handling..

Former Member
0 Kudos

Hi guys,

I have a input field htmlb in my jsp. I have to handle on blur event for this.. i.e if a user gives in somethin in the input field and once it looses focus, a event should get triggered. And probably in my case it will be helpful for me if I have this event handler method in the dynpage. For this kind of event handling what should I write in the followin tag

<htmlb:inputfield id="" value="" width=""> plz tell me a tag attribute which supports this event.

Regards,

PP.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

The answer which you gave worked for me.. Thanks siva

Former Member
0 Kudos

hi siva,

setClientEvent .. This kind of things we can set in the dynpage if you take a new instance of InputField.. For Ex: InputField input = new InputField(); input.setClientEvent("");

But I would like to have a tag attribute which I can put it in my JSP

in this.. <hbj:inputfield id="" width="" value=""> I want some tag attribute which can support my blur event. If I am using ClientEvent="" in this above tag, it gives me a error saying that this tagattribute is not supported by taglibrary.. I m seriously stuck up over here..Kindly help...

former_member197348
Active Contributor
0 Kudos

Hi Priyanka,

You can get reference of your input field in JSP into DynPage. Do like this:

Declare input field in JSP

<hbj:inputfield id="input" value="test">

In DynPage, get refernce of the input field

Wherever you want to trigger event

InputField myInputField =(InputField) getComponentByName("input");

myInputField.setClientEvent();

Hope this helps.

regards,

Siva

Note: If you get success, please post the solution before you close this thread.

Message was edited by:

Siva Rama Krushna

former_member197348
Active Contributor
0 Kudos

Hi Priyanka,

You can use setClientEvent of input field. For more help on input field events visit this link

http://help.sap.com/javadocs/NW04S/current/hb/com/sapportals/htmlb/InputField.html

regards,

Siva