Hi All,
I need to refresh my JSP on the selection of option from the dropdown box.I need to perform this action without the any click on link or button.So i have gone through the WDK doc and found that onchange is the option for that while using <dmf:dropdownlist>
So i have the following lne in my JSP. <dmf:dropdownlist name='<%=FreewayDashboard.PRJTSTATUS_DROPDOWN_CONTROL_NAME%>' value='11' onchange='onSetMaxResults' tooltipnlsid='MSG_SRCLANG_LABEL_TT'> <dmf:option value='1' nlsid='MSG_DRAFT'/>
<dmf:option value='2' nlsid='MSG_IN_PRODUCTION'/>
...
<dmf:option />
</dmf:dropdownlist>
and the following method in the Java file:
public void onSetMaxResults(DropDownList list) {
int projectStatus;
try {
list = (DropDownList) getControl("__PRJTSTATUS_DROPDOWN_CONTROL_NAME");
projectStatus = Integer.parseInt(list.getValue());
System.out.println("This is selectedPrjtStatus ## inside testForWsSuccess()" + projectStatus);
switch (projectStatus){
case 1 : ptSummary = (obtain from webservice call) ;break;
case 1 : ptSummary = (obtain from webservice call) ;break;
default: System.out.println("Invalid value.");break;
}
// use the 'ptSummary' value obtained
}
catch (Exception ex) {
// TODO handle custom exceptions here
ex.printStackTrace();
}
}
But i am unable to trigger the onchange event.The function never gets called.
Could you please help me where i am going wrong.
Thanks & Regards
Vishnu S