Help regarding Groovy and grails

18 views
Skip to first unread message

Kumar Sonu

unread,
Dec 20, 2010, 10:00:29 AM12/20/10
to ig...@googlegroups.com
Hello All,

I have written one code in which I want to link my controller and perform dynamic scaffolding. My web page will look like this
                                          First Program
                                           New    New2
      <body>



       </body>
Here I want to click `New or New2 and it go to controller and perform dynamic scaffolding page.

<html>

    <head>

        <title>Hello</title>

         <meta name="layout" content="main" />      

    </head>

    <body bgcolor="#FFFFFF">

    

    <h1 align="center">First program</h1>

        

        <hr width=80%>

        <p align="center">

        

      

//Here I was trying to give link link this but its not working.

       <g:link controller="generalinformation">New</g:link>

       <g:link controller="GeneralInformation" action="list">New2</g:link>

        

        [<a href="index3.gsp">User</a>]&nbsp; &nbsp;

        

         

        </p>       

    

    <div id="pageBody">

    <p align="justify">

            

            Congratulations, you have successfully started your first Grails application! At the moment

            this is the default page, feel free to modify it to either redirect to a controller or display whatever

            content you may choose. Below is a list of controllers that are currently deployed in this application,

            click on each to execute its default action:


         </p>

    </div>    

    

    <div id="footer">

    </div>


    </body>

</html>


Thanks
Sonu

--


Roshan Dawrani

unread,
Dec 29, 2010, 12:54:51 AM12/29/10
to ig...@googlegroups.com
On Mon, Dec 20, 2010 at 8:30 PM, Kumar Sonu <sonu.bioi...@gmail.com> wrote:

      

//Here I was trying to give link link this but its not working.



What do you mean it is not working? Any more relevant details?
 

       <g:link controller="generalinformation">New</g:link>

       <g:link controller="GeneralInformation" action="list">New2</g:link>

        

        [<a href="index3.gsp">User</a>]&nbsp; &nbsp;

        

         

        </p>       

    

    <div id="pageBody">

    <p align="justify">

            

            Congratulations, you have successfully started your first Grails application! At the moment

            this is the default page, feel free to modify it to either redirect to a controller or display whatever

            content you may choose. Below is a list of controllers that are currently deployed in this application,

            click on each to execute its default action:


         </p>

    </div>    

    

    <div id="footer">

    </div>


    </body>

</html>

   

Thanks
Sonu

--





--
Roshan
Blog: http://roshandawrani.wordpress.com/
Twitter: @roshandawrani
Skype: roshandawrani

Yagnesh Chawda

unread,
Feb 20, 2011, 9:27:41 AM2/20/11
to Indian Groovy & Grails User Group
Hi Sonu,
To me it looks like spell mistake. Case sensitivity may be the
issue.

<g:link controller="generalinformation">New</g:link>
<g:link controller="GeneralInformation" action="list">New2</g:link>

In one of the link you saying "generalinformation" and in other
"GeneralInformation". I assume one of the link for you not working.
Correct controller parameter in <g:link... > and thing should work
hopefully.


Thanks And Regards,
Yagnesh Chawda.
: http://yagneshchawda.blogspot.com/
: http://twitter.com/yagneshchawda

***************************************************
Good planets are hard to find. Print less!
Save energy to keep your future bright !!
***************************************************
"Earth provides enough to satisfy every man's need,
but not every man's greed." - Mahatma Gandhi
***************************************************

On Dec 29 2010, 10:54 am, Roshan Dawrani <roshandawr...@gmail.com>
wrote:
> On Mon, Dec 20, 2010 at 8:30 PM, Kumar Sonu
> <sonu.bioinformat...@gmail.com>wrote:
> Twitter: @roshandawrani <http://twitter.com/roshandawrani>
> Skype: roshandawrani
Reply all
Reply to author
Forward
0 new messages