Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 1.0.3
-
Fix Version/s: None
-
Component/s: TagLib
-
Labels:None
-
Environment:JDK 1.6_03, Vista
-
Testcase included:yes
Description
The predicted behavior for the following code should be to print 'success' to the console and browser after pressing the submit button. This does work as expected, rendering 'success' in both places, but the url in the location bar reads "http://localhost:8080/test/test/failed".
class TestController {
def defaultAction = 'failed'
def failed = {
println 'failed'
render('failed')
}
def success = {
println 'success'
render('success')
}
def test = {}
}
Test.gsp:
<g:form controller="test">
<g:actionSubmit name="testButton" value="Submit" />
</g:form>
Adding the success action to the form tag sets the url correctly in the browser's location bar. Also, entering the 'failed' url in location bar correctly works as expected. Tests with multiple actionSubmit tags with different actions will yield similar results (i.e. the original action will execute, but the location bar will be set to the forms expected url, overriding the actionSubmit's).
There was other behavior reported and observed where action's were unable to execute in this scenario, but I have been unable to replicate that at this time, and redirect's from the original action behave exactly as expected regardless. Therefore, I left the priority as 'major'.
I'm not sure what to do about this. Everything is working as expected, it is just that the 404 error is mis-leading. I have had a quick look at the code, and it seems that fixing the 404 error would be non-trivial.