Urgent: Sample code/Review of my code for ModalBox plugin in Grails required

78 views
Skip to first unread message

Biniam Asnake

unread,
Jul 9, 2014, 3:07:15 AM7/9/14
to moda...@googlegroups.com
Dear members,

I'm really interested in the grails plugin of ModalBox and I've been testing the plugin but I couldn't get it to work.

Can any one please give me an example/source code.

Thanks.

Here is what I tried.

In BuildConfig.groovy, I have

plugins {
       
        // ModalBox Plugin
        compile ":modalbox:0.4"
}

Then I run
grails refresh-dependencies

The plugin is installed in this stage.


My Controller

package test

class MbController {

    def index() {

        render(view:'show')
    }

    def mypopup() {

        render(view:'mypopup')
    }

show.gsp

<html>
    <head>
        <g:javascript library="application" />
        <modalbox:modalIncludes />
    </head>
    <body>
        <modalbox:createLink url="mypopup.gsp" title="Hello Grails!" width="600" linkname="This is the Link" />
    </body>
</html>

mypopup.gsp

<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
    <title>Hello</title>
</head>

<body>
    Hello World!
</body>
</html>

Outputs 
show.gsp
 
mypopup.gsp
  
 
 

Reply all
Reply to author
Forward
0 new messages