Date: 2004-09-17T00:38:15
Editor: MichaelMcGrady <[EMAIL PROTECTED]>
Wiki: Apache Struts Wiki
Page: StrutsCatalogSimpleDispatchAction
URL: http://wiki.apache.org/struts/StrutsCatalogSimpleDispatchAction
no comment
Change Log:
------------------------------------------------------------------------------
@@ -5,27 +5,23 @@
'''Assume that you have ''button'' code not unlike:'''
-'''PAY ATTENTION TO THE OCCURENCE OF .x IN THE FOLLOWING CODE.'''
+'''PAY ATTENTION TO THE OCCURENCE OF "method." IN THE FOLLOWING CODE.'''
'''LINKS:'''
{{{
-<a href='update.do?update.x=update'>UPDATE</a>
-<a href='update.do?update.x=delete'>DELETE</a>
+<a href='registration.do?method.update=update'>UPDATE</a>
+<a href='registration.do?method.delete=delete'>DELETE</a>
}}}
'''FORM SUBMITS:'''
{{{
-<input type='submit' name='update.x' value='update'>UPDATE
-<input type='submit' name='delete.x' value='delete'>DELETE
+<input type='submit' name='method.update' value='update'>UPDATE
+<input type='submit' name='method.delete' value='delete'>DELETE
}}}
'''IMAGES:'''
{{{
-<input type='image' name='update' src='update.gif'>
-<input type='image' name='delete' src='update.gif'>
+<input type='image' name='method.update' src='fix.gif'>
+<input type='image' name='method.delete' src='nuke.gif'>
-or
-
-<input type='image' name='update.x' src='update.gif'>
-<input type='image' name='delete.x' src='update.gif'>
}}}
'''or the equivalent, in the various Struts' image taglibs:'''
@@ -382,7 +378,7 @@
'''Thanks, Niall, HOWEVER'''
-This is fundametally mistaken, Niall, and rests on an important misconception. The
data and the logic of !SimpleDispatchAction differ from all of !DispatchAction,
!LookupDispatchAction, and !MappingDispatchAction. The error here is thinking that
just because they all get the name of the method to call that anything else is just a
mere difference in internal logic. That is not the case. Using one instead of the
other will break the code in lots of ways, and there are huge diffences between these
classes. None of the data used for the struts existing dispatch classes is used to
determine the method in the !SimpleDispatchAction. For those interested in this
approach, I suggest you read the exchanges on the struts-dev apache list.
+This is fundametally mistaken, Niall, and rests on an important misconception. The
data and the logic of !SimpleDispatchAction differ from all of !DispatchAction,
!LookupDispatchAction, and !MappingDispatchAction. The error here is thinking that
just because they all get the name of the method to call that anything else is just a
mere difference in internal logic. That is not the case. Using one instead of the
other will break the code in lots of ways, and there are huge diffences between these
classes. None of the data used for the struts existing dispatch classes is used to
determine the method in the !SimpleDispatchAction. For those interested in this
approach, I suggest you read the exchanges on the struts-dev apache list.
!SimpleDispatchAction certainly should not subclass !DispatchAction. That just piles
unwanted and useless code bloat into !SimpleDispatchAction.
'''Michael !McGrady'''
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]