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 6061141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:54:17+00:00 2026-05-23T08:54:17+00:00

I just added the spring security plugin to my grails application. I have a

  • 0

I just added the spring security plugin to my grails application. I have a question about adding users and their associated roles. I am able to do it correctly in the bootstrap but was wondering how to do it in the GSP page. I have a gsp page with the corresponding fields. when submited, it call the save method. my user domain controller extends SecUser. below is the example:

class User extends SecUser {

    String  fname
    String  lname
    Date    dateCreated
    Date    lastUpdated

    static constraints = {
        fname       (blank:false)
        lname       (blank:false)
    }
    String toString(){
        fname & " " & lname
    }
}

When the user is saved, it saves only items in the user domain, not the SecUser. Does anyone have an example GSP and controller code to save the all the user data?

  • 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-23T08:54:18+00:00Added an answer on May 23, 2026 at 8:54 am

    I perceive that you have two problems :

    1. How to create a Crud (including gsp) on your User class
    2. How to persist the data on your class and its inherited fields

    For the first question:
    To create GSPs and everything you need to have a CRUD on your User class, I suggest that you use scaffolding. If will take care of all of this for you.

    Remove everything from your UserController or create another controller with only the following code:

    class UserController {
        static scaffold = User
    }
    

    then, navigate to your UserController ({your_app}/user/index) and everything should be there.

    If you want to have an actual controller and gsps and modify how they work, use the grails command :grails generate-all your.package.User

    For the second question :

    Unless there is a problem with your SecUser class (transient fields for example), all fields inherited from SecUser should be saved through a User.save()

    Let me know how it goes,

    Vincent Giguère

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

Sidebar

Related Questions

I have added some code which compiles cleanly and have just received this Windows
I am just getting started with Silverlight and have recently added a Silverlight project
I have the default membership table that was added automatically, then just used server
We just added an autoupdater in our software and got some bug report saying
I just added xUnit to our test project (for the Asserts, we're still using
I just added printing capability to a web site using a style sheet (ie.
I've just added the Twitter script to my website, and cannot, despite inexpertly consulting
I just want to see what files were modded/added/deleted between 2 arbitrary revisions. How
I'm code reviewing a change one of my co-workers just did, and he added
I have a bean which extends other Java file. When I create a Spring

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.