You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ciaran Hanley <ci...@sentenial.ie> on 2004/01/15 22:01:50 UTC

question

Hey,
 
Is it possible to use the same action path for two different inputs
 
<action path="/user"
        type="com.myweb.application.actions.UserAction"
        name="userForm"
        scope="request"
  input="?"
        attribute="userForm" />
 
Id like the input to come from addUser.jsp if its an add and updateUser
if its an update.
 
input="/addUser.jsp" or input="/updateUser.jsp"
 
Is there anyway to accomplish this?
 
Thanks,
Ciaran

Re: question

Posted by Michael McGrady <mi...@michaelmcgrady.com>.
input is really more where it goes back to rather than where it came 
from.  You can make it go back to wherever you like by the appropriate use 
of forward classes.

At 02:32 PM 1/15/2004, you wrote:
>you could have a /user/add and a /user/update. If you're reusing the same 
>form then have the action as a variable.
>
>cheers mark
>
>On 15 Jan 2004, at 21:01, Ciaran Hanley wrote:
>
>>Hey,
>>
>>Is it possible to use the same action path for two different inputs
>>
>><action path="/user"
>>         type="com.myweb.application.actions.UserAction"
>>         name="userForm"
>>         scope="request"
>>   input="?"
>>         attribute="userForm" />
>>
>>Id like the input to come from addUser.jsp if its an add and updateUser
>>if its an update.
>>
>>input="/addUser.jsp" or input="/updateUser.jsp"
>>
>>Is there anyway to accomplish this?
>>
>>Thanks,
>>Ciaran
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>



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


Re: question

Posted by Mark Lowe <ma...@talk21.com>.
you could have a /user/add and a /user/update. If you're reusing the 
same form then have the action as a variable.

cheers mark

On 15 Jan 2004, at 21:01, Ciaran Hanley wrote:

> Hey,
>
> Is it possible to use the same action path for two different inputs
>
> <action path="/user"
>         type="com.myweb.application.actions.UserAction"
>         name="userForm"
>         scope="request"
>   input="?"
>         attribute="userForm" />
>
> Id like the input to come from addUser.jsp if its an add and updateUser
> if its an update.
>
> input="/addUser.jsp" or input="/updateUser.jsp"
>
> Is there anyway to accomplish this?
>
> Thanks,
> Ciaran


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