struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Efftinge, Sven" <SEffti...@lohndirekt.de>
Subject AW: change an Actionform
Date Fri, 12 Jul 2002 08:13:43 GMT
Hey Everybody!?

I think this is a thing that every Strutsdeveloper should know?
By the way, Jon, your way didn't work for me as you can see in in my last
posting.
So, please tell me how would YOU solve this problem?
many thanks in advance,
Sven

-----Urspr√ľngliche Nachricht-----
Von: Efftinge, Sven [mailto:SEfftinge@lohndirekt.de]
Gesendet: Donnerstag, 11. Juli 2002 15:50
An: 'Struts Users Mailing List'
Betreff: AW: change an Actionform


Ok, here it is:
<struts-config>
<!-- ============ Form-Beans ============================== -->
  <form-beans>
    <form-bean name="EditForm" 
               type="EditForm" />
    <form-bean name="SearchForm"
               type="SearchForm" />
  </form-beans>


  <!-- ========== Action Mapping Definitions ==============================
-->
  <action-mappings>
    <action path="/searchEntity" 
            type="SearchEntityAction"
            name="SearchForm" 
            scope="request" 
            input="/SearchPage.jsp"
            validate="false" >

            <forward name="failure" path="/SearchPage.jsp" />
            <forward name="success" path="/EditPage.jsp" />
    </action>
  </action-mappings>
</struts-config>

Here are the two jsp-formulars :

SearchPage.jsp:

	<html:form action="/searchEntity">
            <html:text property="value"/>
            <html:submit/>    
      </html:form>

and EditPage.jsp:
	
	<html:form action="billing/FibuAccountGruppeUpdateAction">
            <html:text property="dataobject.name"/>
            <html:text property="dataobject.adresse"/>
            <html:submit/>    
      </html:form>


and in the action this doesn't work:

	ActionForm myForm = new EditForm();
	
myForm.setDataobject(EntityFassade().findByValue((SearchForm)form.getValue()
));
	request.getSession().setAttribute(mapping.getName(),myForm);

and this also doesn't work:

	ActionForm myForm = new EditForm();
	
myForm.setDataobject(EntityFassade().findByValue((SearchForm)form.getValue()
));
	form = myForm;

in both cases the EditPage.jsp formular is empty.
But in the Action the dataobject isn't empty I have tested that.

-----Urspr√ľngliche Nachricht-----
Von: Jon.Ridgway [mailto:Jon.Ridgway@upco.co.uk]
Gesendet: Donnerstag, 11. Juli 2002 15:04
An: 'Struts Users Mailing List'
Betreff: RE: change an Actionform


Hi Sven,

I'll need to see your complete struts-config.xml.

Jon Ridgway


-----Original Message-----
From: Efftinge, Sven [mailto:SEfftinge@lohndirekt.de] 
Sent: 11 July 2002 12:04
To: 'Struts Users Mailing List'
Subject: AW: change an Actionform

Thank you Jon.
Your solution is good, but I don't understand why my way doesn't work.
Can someone tell me where the data gets lost?
The EditEntity.jsp has definetly access to an EditEntityForm, but there is
no Data in it!
why can I change the type but can't fill it?

Sven

--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>


The contents of this email are intended only for the named addressees and
may contain confidential and/or privileged material. If received in error
please contact UPCO on +44 (0) 113 201 0600 and then delete the entire
e-mail from your system. Unauthorised review, distribution, disclosure or
other use of this information could constitute a breach of confidence. Your
co-operation in this matter is greatly appreciated. 

--
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>

--
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