I want to populate a DynaActionForm before dispatching to a JSP, however
the following doesn't work:

DynaActionForm requestForm = new DynaActionForm();
requestForm.set("subject", subject);
requestForm.set("content", content);     
requestForm.set("courseId", cForm.getCourseId());
requestForm.set("courseName", cForm.getName());        

I get a NPE at the first .set - here is my configuration:

        <form-bean name="requestForm"
type="org.apache.struts.action.DynaActionForm">
            <form-property name="action" type="java.lang.String"/>
            <form-property name="courseId" type="java.lang.String"/>
            <form-property name="courseName" type="java.lang.String"/>
            <form-property name="type" type="java.lang.String"/>
            <form-property name="subject" type="java.lang.String"/>
            <form-property name="content" type="java.lang.String"/>
            <form-property name="message" type="java.lang.String"/>
        </form-bean>

Should it?

Thanks,

Matt


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to