Good afternoon everyone,
Here goes:
To start I've got a a DAO class that pumps the results from a a PROC into a list. The results include manufacturer data: mfgLongName, mfgShortName, Entity and Status.
When I fire off my action, I call the DAO class to return the List and then I put the List into scope:
*********************************************************
public class MfrAdminToolAction extends BaseAction{
public ActionForward doPerform(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception
{
MfrAdminToolDDInfo mfrInfo = new MfrAdminToolDDInfo();
mfrInfo.setServletContext(getServlet().getServletContext());
try {
request.setAttribute(IWSConstants.MFR_MANU_LIST, getMFRforDropdown(mfrInfo));
} catch (Exception ex)
{
WSUtils.getSystemLogger().error("", ex);
}
return mapping.findForward("success");
}
public List getMFRforDropdown(MfrAdminToolDDInfo mfrInfo) throws NullParameterError, BlankParameterError, ServiceFailure
{
MfrAdminToolDAOSQLServer daoSQLServer = new MfrAdminToolDAOSQLServer();
List searchResults = daoSQLServer.getMFRforDropdown(mfrInfo);
return searchResults;
}
}
**************************************************************
I now populate my dropdown with a var from my scope object in
JSP.
**************************************************************
<td>
<c:if test="${empty requestScope.mfrManuList}" >
<div style="text-align: left">
<fmt:message key="prompt.eps.noresultstodisplay"/>
</div>
</c:if>
<html:select property="<%=IWSPageDefs.MFG_LONG_NAME %>">
<html:options collection="<%=IWSConstants.MFR_MANU_LIST %>" property="<%=IWSPageDefs.MFG_LONG_NAME %>" labelProperty="<%=IWSPageDefs.MFG_LONG_NAME %>"/>
</html:select>
</td>
*************************************************************
My question is how do I pull the record data from my scope object associated to the MFG_LONG_NAME selected from from the dropdown. Also, do I use the onchange event for the dropdown to fire off some javascript to do this? I want to display the related data in the following controls:
****************************************************************
<td valign="TOP">
<html:text property="<%=IWSPageDefs.ENTITY %>" size="32,1" maxlength="50"/>
</td>
<td>
<html:checkbox property="<%=IWSPageDefs.STATUS%>" value="yes" />
</td>
*****************************************************************
Thanks in advance,
Chris G