Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/leandrogehlen/grails-easyui

jQuery EasyUI resources and taglibs
https://github.com/leandrogehlen/grails-easyui

easyui grails jquery

Last synced: 3 months ago
JSON representation

jQuery EasyUI resources and taglibs

Awesome Lists containing this project

README

        

Grails EasyUI
=============

Grails EasyUI Plugin helps you to develop rich applications using the jQuery JavaScript library EasyUI framework.

The plugin implements taglibs for writing the compontentes in gsp, plus the scripts to generate scaffold to produce CRUD quick and powerful.

Another feature created is EasyuiDomainClassMarshaller that simplifies the rendering of domain objects to compatible JSON components JQuery EasyUI.

Including the resources
------------------------

You must use the Grails resources framework to make use of this plugin.

Download http://www.jeasyui.com/download/, extracting content in webapp/js/jquery-easyui

jquery-easyui - jQuery EasyUI framework (latest version)

Configuration
-------------
The following settings are available
```groovy
// available "en", "pt_BR"
grails.plugin.easyui.locale = 'en'

//folder name found in "jquery-easyui/themes"
grails.plugin.easyui.theme = 'black'

//version defined in the file "jquery-1.8.0.min.js" found in "jquery-easyui"
grails.plugin.easyui.jquery.version = '1.8.0'

//Auto register marshaller on bootstrap
grails.plugin.easyui.register.marshaller = true
```

TagLib
------

```xml

```
```xml


Hello World Demo





Some Content.

```

Scaffold
--------
We can generate scaffold with commands:

```
grails easyui-generate-controller [domainClass]
grails easyui-generate-view [domainClass]
grails easyui-generate-all [domainClass]
grails easyui-install-templates
```

Registering DomainClassMarshaller
---------------------------------

To integrate the data with the components you need to register the domain class renderer. To register this class it is necessary to change the file BootStrap.groovy as follows:

```groovy
import grails.converters.JSON
import org.codehaus.groovy.grails.commons.GrailsApplication
import org.grails.plugins.easyui.EasyuiDomainClassMarshaller

...

class BootStrap {

GrailsApplication grailsApplication

def init = { servletContext ->
JSON.registerObjectMarshaller(new EasyuiDomainClassMarshaller(true, grailsApplication))
...
}
...
}
```