Hi,
this is relative fundamental, but I haven't seen an answer in any
documentation or tutorial.

My Question is 'How can I change the Actionform in an Action?'
Description:
I do a request to findEntity.do and submit a SearchEntityForm.
With the values in it I try to find an entity in the backend and, on
success, forwarding to editEntity.jsp which is using the EditEntityForm.

I tried this:
        aValue = (SearchEntityForm) form;
        dataobjekt = EntityFassade.findByValue(aValue);
        // Change the Type of the form-object
        form = new EditEntityForm(); 
        form.setAnotherValue(dataobjekt.getAnotherValue());

result is:
        The typechange works but has no Data in it.
        All I see is an empty form in editEntity.jsp 
        
My struts-config looks like this:

   <action path="/findEntity.do" 
            type="FindEntityAction"
            name="SearchEntityForm" 
            scope="request" 
            input="/SearchEntity.jsp"
            validate="true" >

            <forward name="failure" path="/SearchEntity.jsp" />
            <forward name="success" path="/EditEntityForm.jsp" />
    </action>

I'm using Struts 1.1beta1

Thanks in advance 

Sven

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

Reply via email to