Update method in controller didn't work if submitting form tag is uploadForm

21 views
Skip to first unread message

Qingxin Xu

unread,
Aug 3, 2014, 11:15:50 PM8/3/14
to grails-de...@googlegroups.com

I'm using Grails 2.3.6, and found that if I change <g:form> to <g:uploadForm> in edit.gsp, update method isn't called at all. However, save method is executed correctly if <g:form> is changed to <g:uploadForm> in create.gsp.

I also tried it with Grails 2.4.2, it has the same problem. But Grails 2.2.4 doesn't have this problem.

Does anyone have any idea?

Sergio Michels

unread,
Aug 4, 2014, 12:32:48 PM8/4/14
to grails-de...@googlegroups.com
Can you provide more info? How your controller action looks like?

--
Sérgio Michels


--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-disc...@googlegroups.com.
To post to this group, send email to grails-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/4a2a605e-b248-4e32-a151-9d5ad9f1e954%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Qingxin Xu

unread,
Aug 5, 2014, 9:49:59 PM8/5/14
to grails-de...@googlegroups.com
This is what I did in Grails 2.3.6 and 2.4.2.

1. Create a new project with command "greails create-app test"
2. Create a trivial domain class named User, which has two fields: String username; String realname
3. Create controller and views with command "grails generate-all test.User"
4. Change <g:form> and </g:form> into <g:uploadForm> and </g:uplaodForm> in create.gsp, user can be created correctly
5. Change <g:form> and </g:form> into <g:uploadForm> and </g:uplaodForm> in edit.gsp, error message is met
Reply all
Reply to author
Forward
0 new messages