You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Lukas Bradley <lu...@somnia.com> on 2003/06/23 20:05:50 UTC

Action attribute 'input'-- why required?

Error message:

"No input attribute for mapping path /user/BankAccount"

My action:

  <action path="/user/BankAccount" type="mypackage.ui.actions.BankAccountAction"
   name="form.user.bankaccount" scope="request">
   <forward name="success" path="tile.user.bankaccountform" />
   <forward name="failure" path="/user/AccountMgt.do" />
  </action>

My question:

In short, who gives a damn?  Why do I need an input attribute on an action?  Why can't I post to a url, and the action be smart enough to parse the necessary data?  The action knows it is request data.  The action knows the name of the form, and it is correctly defined.  The action knows where to go upon a failure, and upon success.

The input attribute does not seem to need to be required.

Lukas



Re: Action attribute 'input'-- why required?

Posted by Dan Allen <da...@mojavelinux.com>.
Lukas Bradley (lukas@somnia.com) wrote:

> > According to the DTD, the default is true if you specify a form (the
> > "name" attribute).  Otherwise it is ignored.  So yes, you need to
> > set it to false in this case and that is the expected behavior.
> 
> Live and learn.  I always thought it was implicitly false.  Thanks for the
> help, Dan.
> 
> Lukas

Glad I could help.  I have actually felt very empowered as of late
by reading through the DTDs when I am confused.  At first it is a
bit awkward, but they are a great resource.  There is a lot of
documentation in there that people often forget about.  It really
helped me out getting started with Hibernate and figuring out all
the mappings.

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <da...@mojavelinux.com>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
[Frodo]: "I wish it need not have happened in my time." 
[Gandalf]: "So do I, and so do all who live to see such times. 
But that is not for them to decide. All we have to decide is 
what we do with the time that is given to us.'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

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


Re: Action attribute 'input'-- why required?

Posted by Lukas Bradley <lu...@somnia.com>.
> According to the DTD, the default is true if you specify a form (the
> "name" attribute).  Otherwise it is ignored.  So yes, you need to
> set it to false in this case and that is the expected behavior.

Live and learn.  I always thought it was implicitly false.  Thanks for the
help, Dan.

Lukas




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


Re: Action attribute 'input'-- why required?

Posted by Dan Allen <da...@mojavelinux.com>.
Lukas Bradley (lukas@somnia.com) wrote:

> > > The input attribute does not seem to need to be required.
> > It should only be required if validation is set to true for this
> > mapping.
> 
> I explicitly set validation="false" and it works now.  I'm using 1.1 RC1.

According to the DTD, the default is true if you specify a form (the
"name" attribute).  Otherwise it is ignored.  So yes, you need to
set it to false in this case and that is the expected behavior.

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <da...@mojavelinux.com>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
umm... i guess this is my signature. 8-}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

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


Re: Action attribute 'input'-- why required?

Posted by Lukas Bradley <lu...@somnia.com>.
> > The input attribute does not seem to need to be required.
> It should only be required if validation is set to true for this
> mapping.

I explicitly set validation="false" and it works now.  I'm using 1.1 RC1.

Lukas




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


Re: Action attribute 'input'-- why required?

Posted by Dan Allen <da...@mojavelinux.com>.
Lukas Bradley (lukas@somnia.com) wrote:

> Error message:
> 
> "No input attribute for mapping path /user/BankAccount"
> 
> My action:
> 
>   <action path="/user/BankAccount" type="mypackage.ui.actions.BankAccountAction"
>    name="form.user.bankaccount" scope="request">
>    <forward name="success" path="tile.user.bankaccountform" />
>    <forward name="failure" path="/user/AccountMgt.do" />
>   </action>
> 
> My question:
> 
> In short, who gives a damn?  Why do I need an input attribute on an action?  Why can't I post to a url, and the action be smart enough to parse the necessary data?  The action knows it is request data.  The action knows the name of the form, and it is correctly defined.  The action knows where to go upon a failure, and upon success.
> 
> The input attribute does not seem to need to be required.

It should only be required if validation is set to true for this
mapping.

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <da...@mojavelinux.com>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
"If you are going to play the game of trial and error, 
don't be surprised when the results are revealing. -- me"
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

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