cancel
Showing results for 
Search instead for 
Did you mean: 

Getting the value of one control in another controls event handler in HTMLB

Former Member
0 Kudos

Hi

I am practicing on the error handling in Dynpages using HTMLB. For that i have taken one inputfield and submit button. Value is mandatory for that input field. When i click on submit button i need to check that input field is empty or not in the buttons event handler.

How can i get that input field value in buttons event handler.

note: I am using Dynpages not JSP Dynpages.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi sandeep:

If you want to recover the value of a inputfield, you want to this the next thing:

Example of the input field HTMLB control:

<hbj:inputField id="MY_INPUTFIELD" type="string" maxlength="10" design="SMALL">

Now i think that you has a button that fired an action in the action method you can recover the value of MY_INPUTFIELD:

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

String value = myInputField.getValue().toString();

it's all.

good luck

<%strFechaEjecucionID = myContext.getParamIdForComponent(FechaEjecucion);%>

</hbj:inputField>

Answers (0)