Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7011269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:06:20+00:00 2026-05-27T22:06:20+00:00

Im using grails 1.3.7 and here is the case… Have a huge form with

  • 0

Im using grails 1.3.7 and here is the case…
Have a huge form with a few different prefixes for its fields (later used in data binding) and trying to validate thru a command object… however the lovely DOT used in prefixes is giving me a hard time and cannot get the names mapped properly in command object… any suggestion please?

in the form have fields like field like this one:

<input name="dealer.name" value="${dealer.name}" type="text"> 

and for command object:

class somethingCommand {
    String name
    Map dealer = [:]
    static constraints = {
        dealer validator: {
            val, obj ->
            obj.properties["name"] != ""
        }
    }
}

what if…. we look at it in another way and map the parameters before passing to command object… how should I pass my parameters to a command object without using grails magic?!?!?!

tnx

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T22:06:21+00:00Added an answer on May 27, 2026 at 10:06 pm

    you could grab the “dealer” map in the controller via

    def dealerMap = params["dealer"]
    

    and then create a dealer command opject by hand and bind the map content to it.

    def dealerCommand = new DealerCommand() 
    bindData(dealerCommand , dealerMap)
    

    you can then use the validation of the command object as normal

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Grails multi-tenant plugin with single-tenant mode. I have used spring security
I'm considering using Grails for my current project. I have a couple of requirements
I've developed a simple webflow in Grails (mostly to experiment with using webflows- its
Background: we have a Grails 1.3.7 app and are using Liquibase to manage our
Here is the scenario. I have an file outside of my Grails application that
I have a Grails plugin which I’m using as basically a container for some
Problem with german umlauts in generated CSV file using Grails Hi, I have a
I have a simple grails file upload app. I am using transferTo to save
I'm using Grails 1.3.7. I have some code that uses the built-in base64Encode function
I am using tomcat6 running on Ubuntu server. I have deployed three Grails 1.3.7

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.