Hi,
I am new to portal area. My current project needs to use
struts framework to design a
java application as a portlet. The problem I am facing is, I can't pass the selected value of a dropdown box to the next portal page, it kept giving me null.
My
jsp looks like:
<%@page contentType="text/html; charset=windows-1252"%>
<%@ taglib uri="/WEB-INF/pdk-struts-html.tld" prefix="html" %>
<html:form action="/portal/TransferPricingSearch.do">
<table>
<tr>
<td>Products and Services</td>
<td>
<html:select property="productServiceStr" size="1">
<html
ptionsCollection property="productServiceList" value="value" label="name"/>
</html:select>
</td>
</tr>
<tr>
<td>LID</td>
<td><html:text property="lid" /></td>
</tr>
</table>
<html:submit/>
</html:form>
And my search action who handles submit looks like:
public class TransferPricingSearchAction extends Action
{
Logger logger = Logger.getLogger(this.getClass().getName());
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
{
logger.debug("Entering TransferPricingSearchAction");
TransferPricingHomeForm TPHomeForm = (TransferPricingHomeForm)form;
String productServiceStr = TPHomeForm.getProductServiceStr();
String lidStr = TPHomeForm.getLid();
logger.debug("lidStr: " + lidStr);
logger.debug("productServiceStr: " + productServiceStr);
return (mapping.findForward(productServiceStr ));
}
}
Right now, the log file indicates that the value of productServiceStr which is the dropdown always returns null when I try to go to the next portal page. However, the value of lid which uses the html:text tag pass value fine.
Does anyone has similar problems, it seems to me it is the tag problem. But I have no idea how to fix it.
Thanks
Jenni