But now I realize it was failing when I hit enter and working when I pushed the button. The reason for this is Internet Explorer has a concept of a default submit action when enter is pushed. So it submits the form to the server but with no specified method parameter because no button was pushed.
So on forms with only one button having a hidden input field works...
<input type="hidden" name="method" value="<bean:message key="function.addcomponent"/>" />
<html:submit property="method"> <bean:message key="function.addcomponent"/> </html:submit>
If you click enter on this form your http post parameters look something like this..
componentName=some+component+name&method=AddComponent
If you push the button with your mouse your parameters look like this:
componentName=some+component+name&method=AddComponent&method=AddComponent
This works fine because on the server it build a map of these key value pairs. However, this will be problematic on pages where you have 2 or more submit buttons.
I think in that case you are doomed to some java script hack to over-ride internet explorers default behavior. Or you can assume in your LookupDispatchAction that if the "Unspecified" method is called, the user pushed enter and didn't actually click one of the submit buttons.
That does seem a bit weak though.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]