M
MileHighCelt
I would really appreciate any help you can offer on this Struts 1.1
question. I have an ActionForm that contains a bean and the getters
and setters to get it:
<-- class declaration etc)
private ReportBean report;
public ReportBean getReport() {
return report;
}
public void setReport(ReportBean report) {
this.report = report;
}
I put that ActionForm in the session in the Action so that my jsp can
get the form, and then the bean on it. I don't need to iterate over
the bean, it is a one-one mapping for my jsp, but I cannot find any
examples on how to do this. Here is what I have in my jsp so far and
not really sure where to turn:
<%@ taglib uri="/WEB-INF/lib/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/lib//struts-html.tld" prefix="html" %>
<jsp:useBean id="uploadRecords" name="reportform"
class="com.xxx.struts.form.DataReportsForm" scope="request"/>
<do I declare the bean from the formsomehow like
jsp:reportBean name="report" type="com.xxx.struts.form.ReportBean"..?
Now that I have the form from the session, I want to get the reportBean
from the form
<td> <bean:write name="report" property="field1" </td>
<td> <bean:write name="report" property="field2" </td>
I don't know why I can find the solution to this, but I would really
appreciate any advice or direction to a good online source that will
show me how.
thank you,
question. I have an ActionForm that contains a bean and the getters
and setters to get it:
<-- class declaration etc)
private ReportBean report;
public ReportBean getReport() {
return report;
}
public void setReport(ReportBean report) {
this.report = report;
}
I put that ActionForm in the session in the Action so that my jsp can
get the form, and then the bean on it. I don't need to iterate over
the bean, it is a one-one mapping for my jsp, but I cannot find any
examples on how to do this. Here is what I have in my jsp so far and
not really sure where to turn:
<%@ taglib uri="/WEB-INF/lib/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/lib//struts-html.tld" prefix="html" %>
<jsp:useBean id="uploadRecords" name="reportform"
class="com.xxx.struts.form.DataReportsForm" scope="request"/>
<do I declare the bean from the formsomehow like
jsp:reportBean name="report" type="com.xxx.struts.form.ReportBean"..?
Now that I have the form from the session, I want to get the reportBean
from the form
<td> <bean:write name="report" property="field1" </td>
<td> <bean:write name="report" property="field2" </td>
I don't know why I can find the solution to this, but I would really
appreciate any advice or direction to a good online source that will
show me how.
thank you,