You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by rutis <ru...@yahoo.com.mx> on 2003/06/23 15:59:47 UTC

confirm

confirm

_________________________________________________________
Do You Yahoo!?
La mejor conexión a internet y 25MB extra a tu correo por $100 al mes. http://net.yahoo.com.mx

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


RE: DispatchAction and input

Posted by Joel Hainley <jh...@myndkryme.com>.
I guess that's the root of my problem. The place that it should go to when
validation fails is different for each method. I would always want it to go
back to the page that was submitted to produce the error, so that the error
can be displayed to the user and it can be corrected and resubmitted.
Because I have my add, adddisplay, edit, editdisplay operations all in the
same dispatchaction i can't have a "global" input.

>Here you need something like:
>                input="yourInputJSP.jsp".
>Struts needs to know where to go if a validation error occurs.



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


Re: DispatchAction and input

Posted by Dirk Markert <di...@dr-markert.de>.
Hallo Joel,


***************************************************************

JH> I'm confused, and i'm hoping someone can help me?

JH> I am trying to use the validate method to validate my input however when I
JH> do this i start getting an error "No Input Attribute For mapping path
JH> /category".  I understand that an input parameter is required for the
JH> action, however using an input parameter with a dispatch action in the way
JH> that seems to be required makes no sense to me. In fact, I'm not sure I
JH> really understand the necessity for an input parameter at all, but if there
JH> should be an input path required for a dynaaction shouldn't it be specified
JH> within the individual forwards?

JH> Is dynaaction really usable when doing validation?

JH> I'm stuck.

JH> I have the following in my struts-config.xml file :


JH>         <action
JH>             path="/Category"

Here you need something like:
                input="yourInputJSP.jsp".
Struts needs to know where to go if a validation error occurs.

JH> type="com.flightlogger.logbook.v1.struts.actions.CategoryActions"
JH>             parameter="method"
JH>             name="categoryForm"
JH>                 validate="true"
JH>               >

JH>             <forward name="add"
JH>                      path="/pages/categoryAdd.jsp"/>

JH>             <forward name="addSuccess"
JH>                      path="/Category.do?method=viewList"/>

JH>             <forward name="delete"
JH>                      path="/pages/categoryDelete.jsp"/>

JH>                         <forward name="deleteSuccess"
JH>                                          path="/pages/categoryDeleteSuccess.jsp"/>

JH>             <forward name="displayAdd"
JH>                      path="/pages/categoryAdd.jsp"/>

JH>                         <forward name="displayDelete"
JH>                                          path="/pages/categoryConfirmDelete.jsp"/>

JH>                         <forward name="displayEdit"
JH>                                          path="/pages/categoryEdit.jsp"/>

JH>             <forward name="displaySearch"
JH>                      path="/pages/categorySearch.jsp"/>

JH>             <forward name="edit"
JH>                      path="/pages/categoryEdit.jsp"/>

JH>                         <forward name="editSuccess"
JH>                                          path="/pages/categoryView.jsp"/>

JH>             <forward name="main"
JH>                      path="/pages/categoryMain.jsp"/>

JH>             <forward name="view"
JH>                      path="/pages/categoryView.jsp"/>

JH>                         <forward name="viewList"
JH>                                          path="/pages/categoryViewList.jsp"/>

JH>             <forward name="search"
JH>                      path="pages/categorySearch.jsp"/>
JH>         </action>




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

Regards,

Dirk


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


DispatchAction and input

Posted by Joel Hainley <jh...@myndkryme.com>.
I'm confused, and i'm hoping someone can help me?

I am trying to use the validate method to validate my input however when I
do this i start getting an error "No Input Attribute For mapping path
/category".  I understand that an input parameter is required for the
action, however using an input parameter with a dispatch action in the way
that seems to be required makes no sense to me. In fact, I'm not sure I
really understand the necessity for an input parameter at all, but if there
should be an input path required for a dynaaction shouldn't it be specified
within the individual forwards?

Is dynaaction really usable when doing validation?

I'm stuck.

I have the following in my struts-config.xml file :


        <action
            path="/Category"

type="com.flightlogger.logbook.v1.struts.actions.CategoryActions"
            parameter="method"
            name="categoryForm"
		validate="true"
	      >

            <forward name="add"
                     path="/pages/categoryAdd.jsp"/>

            <forward name="addSuccess"
                     path="/Category.do?method=viewList"/>

            <forward name="delete"
                     path="/pages/categoryDelete.jsp"/>

			<forward name="deleteSuccess"
					 path="/pages/categoryDeleteSuccess.jsp"/>

            <forward name="displayAdd"
                     path="/pages/categoryAdd.jsp"/>

			<forward name="displayDelete"
					 path="/pages/categoryConfirmDelete.jsp"/>

			<forward name="displayEdit"
					 path="/pages/categoryEdit.jsp"/>

            <forward name="displaySearch"
                     path="/pages/categorySearch.jsp"/>

            <forward name="edit"
                     path="/pages/categoryEdit.jsp"/>

			<forward name="editSuccess"
					 path="/pages/categoryView.jsp"/>

            <forward name="main"
                     path="/pages/categoryMain.jsp"/>

            <forward name="view"
                     path="/pages/categoryView.jsp"/>

			<forward name="viewList"
					 path="/pages/categoryViewList.jsp"/>

            <forward name="search"
                     path="pages/categorySearch.jsp"/>
        </action>




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