Hi,
No. Actually the bean is a different bean. NoDataForm is this
public final class NoDataForm extends ActionForm {
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request){
ActionErrors errors = new ActionErrors();
return errors;
}
} // and validate="false"
I don't have any data. So I am just forwarding after setting a bean in the
session.
<bean:write name="reportid" property="reportID"/>
Mohan> <logic:greaterThan name="reportid" property="reportID"
value="19">
Mohan> </logic:greaterThan>
//---------------------Action is this---------------------
ReportIdentifierBean reportBean =
( ReportIdentifierBean
)request.getSession().getAttribute( WebConstants.REPORT_ID );
if( reportBean == null) {
reportBean = new ReportIdentifierBean();
reportBean.setReportID( report );
request.getSession().setAttribute(
WebConstants.REPORT_ID, reportBean );
}
else{
reportBean.setReportID( report );
request.getSession().setAttribute(
WebConstants.REPORT_ID, reportBean);
}
//---------------------Action is this---------------------
Thanks,
Mohan
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:dmkarr@;earthlink.net]
Sent: Friday, November 15, 2002 9:34 AM
To: [EMAIL PROTECTED]
Subject: Re: logic not picking session
>>>>> "Mohan" == Mohan Radhakrishnan <[EMAIL PROTECTED]> writes:
Mohan> Hi,
Mohan> I am sure I am doing something wrong here.
Mohan> <bean:write name="reportid" property="reportID"/>
Mohan> <logic:greaterThan name="reportid" property="reportID"
value="19">
Mohan> </logic:greaterThan>
Mohan> Now if I put a bean in the session with the proper getter method,
the tag
Mohan> above should pick up.
Mohan> Now my action sets the proper value in the bean ( it even prints
it after
Mohan> setting it ) and forwards to a jsp.
Mohan> Is something missing here ?
Mohan> The action is this.
Mohan> <!-- Generic forward -->
Mohan> <action path="/generic"
Mohan>
type="com.hcl.smartmanage.web.action.GenericForwardAction"
Mohan> name="noDataForm"
Mohan> validate="false"
Mohan> scope="session">
Mohan> <forward name="REPORTER"
path="/reports/report.jsp"/>
Mohan> </action>
I'm going to guess you set the "reportID" attribute of your "noDataForm"
object. If so, you need to change the tags to this:
<bean:write name="noDataForm" property="reportID"/>
<logic:greaterThan name="noDataForm" property="reportID" value="19">
</logic:greaterThan>
If that's the wrong guess, we need to see your Action and ActionForm.
--
===================================================================
David M. Karr ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED] ; SCJP
--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>
--
To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>