GithubHelp home page GithubHelp logo

grails-guides / command-objects-and-forms Goto Github PK

View Code? Open in Web Editor NEW
2.0 4.0 11.0 450 KB

Using Command Objects to Handle Forms

JavaScript 0.93% CSS 49.78% Groovy 38.50% Shell 7.28% Batchfile 3.51%

command-objects-and-forms's Introduction

Using Command Objects to Handle Form Data

This guide will explain how you can use command objects to validate input data in a Grails application.

Guide

command-objects-and-forms's People

Contributors

bassmartin avatar benrhine avatar derek-b avatar fantastic-penguin avatar graemerocher avatar mattmoss avatar sdelamo avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

command-objects-and-forms's Issues

UserCommand dont show the user properties when it's returning with errors

I have followed all the steps of this tutorial. I have a question?
When the userCommand have son errors, it will respond to edit view with the errors but I lost the values of user object (edit method)

def edit(User user) {
        respond user
    }

    def update(UserCommand userCommand) {
	    if (userCommand.hasErrors()) {
		    respond userCommand.errors, view: 'edit'
		    return
	    }
         ....
    }

screen shot 2018-08-08 at 20 26 16
screen shot 2018-08-08 at 20 28 04

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.