struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Efftinge, Sven" <SEffti...@lohndirekt.de>
Subject change an Actionform
Date Thu, 11 Jul 2002 09:27:24 GMT
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:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message