Dave Newton <[EMAIL PROTECTED]> [051130 17:43]:
> >If I write in my jsp page <bean:write name="sourceDate"/> the correct 
> >string
> >is shown in the HTML output. So I'm sure that the value for sourceDate is
> >correctly handed over to the jsp page.
> >
> >Is there a way to easily fix this?
>
> The property in an html:text tag is expecting a sourceDate property in 
> whatever type of ActionForm you're using, not a scoped attribute.

So this means instead of:

request.setAttribute("sourceDate", srcDate);

I should use:

MyForm myForm = (MyForm) form; // ActionForm form in the constructor
myForm.setSourceDate(srcDate);

But I guess that I have to tell the jsp page about the form in the
struts-config.xml. At the moment the relevant parts in the struts-config
look as follows:


                <form-bean name="docForm" type="org.contineo.forms.DocForm"/>
...
                <action path="/EditDoc"
                        
type="org.contineo.actions.documan.document.EditDocAction">
                        <forward name="editdoc"
                                 path="/pages/editDoc.jsp"
                                 redirect="false"/>
...
                <action input="/EditDoc.do"
                        name="docForm"
                        path="/ChangeDoc"
                        
type="org.contineo.actions.documan.document.ChangeDocAction"
                        validate="false"/>

The second step already works, I can access the form content in
ChangeDocAction.


Sebastian

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

Reply via email to