background preloader

Grails

Facebook Twitter

The NetBeans E-commerce Tutorial - Introduction. Welcome to the NetBeans E-commerce Tutorial.

The NetBeans E-commerce Tutorial - Introduction

In this multi-part tutorial, you learn how to create a simple yet effective e-commerce application that demonstrates various important features of Java web and EE development. In doing so, you'll familiarize yourself with the NetBeans IDE and become capable of applying it to your own development purposes. Taking the time to master the IDE will ultimately lead you to become more efficient and versatile as a developer. While you work through the tutorial units, you'll learn how to make best use of the IDE's facilities and tools. These include: The tutorial is modular in fashion, with each unit focusing on specific concepts, technologies, and features of the IDE. Sflahave/writetable. L X I Technologies - Setting Virtuous Cycles in Motion. Grails provides out of the box support to perform CRUD operations on the domain classes which is great stuff for simple domain classes but it starts to appear less than ideal if your domain class is a complex one having a collection of other objects which share their lifecycle with the domain class we are talking about.

L X I Technologies - Setting Virtuous Cycles in Motion

A more convenient way of performing CRUD operation on these child objects would be to do it along with the parent itself. For example if I have a domain entity called Quest which has many Task's then I should be able to create the tasks at the same time when I create the quest and also have ability to modify these tasks later on as part of quest updates. Grails one-to-many dynamic forms – train of thought.

After searching around trying to find a good way to implement one-to-many dynamic forms in Grails, I have finally come across this post which does a very good job at explaining the details. What I was basically looking for is a clean way to implement saving my domain objects in the backend, rather than the hacked way I did by hand picking request parameters and manually setting up my domain objects (I’m still fairly new to Grails), and the official docs fail to shed the light on the subtle details I found in this post, which is why I decided to post my own version of the one-to-many dynamic forms but with a little bit more complex domain objects to illustrate the use of enums which also I found is a bit of a gray area in the docs (or at least maybe for me).

Make sure you head over and read the original post, as I will not go through all the details already mentioned over there. This example was developed using Grails version 1.3.3 Our views are now ready for prime time. Update contact. Grails-plugins/grails-spring-security-ui. Updating multiple page elements with Grails and Ajax. Every Web Application Project I’ve been involved in the recent past had one thing in common: the client demanded more and more rich-client features at an ever increasing pace – without committing itself to real rich-client frameworks such as Flex or Silverlight.

Updating multiple page elements with Grails and Ajax

This leaves us with Javascript / AJAX for implementing highly dynamic User Interfaces for Web Applications. A very common problem when working with Ajax is the requirement to update multiple parts of a page in response to a single request. This post aims to familiarize the reader with my own approach to this problem. At its core my solution consists of just two functions – one running server side and the other executing on the client. The first function is intended to run on the server and is written in Groovy. The second function is written in Javascript and responsible for applying the JSON wrapped HTML fragments to their designated HTML DOM Elements: So how do you use it?

Let’s begin with the GSP page in /views/test/index.gsp: Adding table rows from a Grails Template on Button Click. Grails - Can we have more than one field in g:select optionValue. Search - Grails: filter data in a Grails table dynamically. Add search to your grails application using the searchable plugin. If you're building a web application, you're most certainly going to need some 'search' capabilities in your application.

Add search to your grails application using the searchable plugin

The searchable plugin is an amazing plugin that is built using Compass search engine and lucene. This plugin enables you to make your domain classes without writing almost any code. In this article we will be discussing how you can install and use this plugin, and also discuss some issues around it. We will be creating a simple grails application, a couple of domain classes, and then we will explore the 'searchable' plugin. (find the source code of the sample application at the end of the article) Let's get started! Spring Security Core Plugin. Spring Security: Configuring Secure Passwords. Exclusive offer: get 50% off this eBook here Spring Security 3 — Save 50% Secure your web applications against malicious intruders with this easy to follow practical guide by Peter Mularien | May 2010 | Java Open Source Web Development This article by Peter Mularien is an excerpt from the book Spring Security 3.

Spring Security: Configuring Secure Passwords

In this article, we will: Examine different methods of configuring password encodingUnderstand the password salting technique of providing additional security to stored passwords (For more resources on Spring, see here.) In any secured system, password security is a critical aspect of trust and authoritativeness of an authenticated principal. Spring Security Grails plugin. Quick start and some tips.

Spring Security plugin is a fast and convenient solution for authorizing user access.

Spring Security Grails plugin. Quick start and some tips

Almost every Grails web application uses it. In this article I would like to provide a guide about how to apply this solution quickly, and show you some tips that should be really useful for beginners. So let’s download the plugin. Install output tells us "Next run the "s2-quickstart" script to initialize Spring Security and create your domain classes. ". If you haven’t used this plugin before I strongly recommend you to run the script. When you will run the script, it will ask you to run it with the specification of the classes names that should be generated, so it could generate domain User class, User’s Roles class and the User/Role many-to-many join class. If you want to look at all the properties that could be configured here and their detailed description, please read appropriate documentation section.