xiaochong / zkui

Grails ZK UI Plugin
http://grails.org/plugin/zkui
GNU Lesser General Public License v3.0
24 stars 8 forks source link

Modal Box - Standard grails controller call #94

Open penetras opened 12 years ago

penetras commented 12 years ago

I'm trying to generate a modal box from a standard grails controller. For example in standard grails procedure we could use:

inside a controller action --> redirect(controller:'job' , action:'edit' , id:'1')
inside a gsp view --> Test 1/g:remoteLink or even through a direct url ---> http://grails_project/job/edit/1

Now i'm trying to achieve the same goal but with a zk modal window after i trigger the onClick event from my tag.

Here is the code inside my menuitem composer:

def onClick_edit(Event e){

    def jobid = edit.value

    def window = new Window(title: "Job Show", border: "normal",
        width: "460px", height: "420px",
        closable: true, droppable: true)
        window.setPage(e.getPage())
        window.mode = 'modal'

                 window << {
            include(src: "/job/edit/1")
        }
}

Are we able to do this?

hahnz commented 12 years ago

yes, absolutely you can.. I use that method too in my application

xiaochong commented 12 years ago

I can not guarantee it support controller,but gsp is support.