This class does not provide an implementation of the execute method as the normal Action class does. The LookupDispatchAction uses the execute method to manage delegating the request to the individual methods based on the incoming request parameter.
If you notice the signature of the add, update and delete methods are similar to the execute method except the name. This method maps the methods in the action class to keys in the Struts resource bundle file.
The next step is to create an action mapping for this action handler. The request parameter name is specified using the parameter attribute. Here the request parameter name is method. The names in the resource bundle file are the keys for this map and the corresponding values are the method names in the action class. Optional 'thank-you' note:. Thanks in advance, Samir. Ravi Seshu. Hi, DispatchAction dispatches the action based on the parameter value. Why do we need to store all the values in the key value pair.
This is useful for developers who prefer to combine many related actions into a single Action class. NOTE — Unlike DispatchAction, mapping characteristics may differ between the various handlers, so you can combine actions in the same class that, for example, differ in their use of forms or validation. Also, a request parameter, which would be visible to the application user, is not required to enable selection of the handler method. No Account? Sign up. By signing in, you agree to our Terms of Use and Privacy Policy.
Already have an account? Sign in. Internalization means multiple languges supports application. If your using DispatchAction Class you will not be able to apply "internalization" functionality. DispatchAction dispatches the action based on the parameter value. Where as lookupdispatchAction which is a subclass of it.
It inherits all the properties but It supports one more additional method called getmethodkey for all those mappings. Post Answer Preview:. Difference between 3d and 4d Difference between 3d and 4d what is the difference between 3d and 4d.
0コメント