I'm a pretty experienced Grails developer, but most of my experience has been with using grails for serving up JSON/XML to a flex app and some relatively simple HTML websites.
I've been diving deeper into using the sitemesh integration in grails and I'm struggling a little to find best practices for some more complex configurations, and...
So it looks like Grails' GSP does not have an include tag (correct me if I'm wrong). The closest thing to "include" is to use the render tag. There is also the include plugin.
In my case, I have a classic top-left-middle-right-bottom paned page. The top header or left side would include navigation. The middle would be the content. The r...
Has anybody tried doing GSP design with Adobe Dreamweaver CS4? It has support for JSPs, but it doesn't recognize the gsp extension, and even if it did I think there would be problems regarding the gsp tags that it would not recognize. I found a little cookbook here (http://www.bitwalker.nl/blog/using-groovyserver-pages-in-dreamweaver) fo...
I am in the training of web developement.I want make a page which shows all the files in the D://downloads directory.I made that part in grails.If i click on the particular file i want download that file.I dont know how to make that part.I did a google search.But i cannot do that.
My code is
<g:each in="${fileList}" var="filename" st...
I'd just like to play a little bit with groovy
I was thinking about developing my own-tiny web framework, something very simple and manageable...
So i'd like tou use GSP pages whtout having to install the whole grails stuff, with all its dependencies and behind-the-scenes frameworks...
can anyone provide me detailed instructions on wh...
Let's say I have definied a User object using GORM. Each user can have zero or more Login:s. Each Login has a timestamp. When retrieving user.logins I want the logins to be sorted based on the value of login.date. What is the correct Grails way to achieve this?
Example: I want the following code to list all the user's logins in ascendin...
Let's say I have a datePicker called "foobar":
<g:datePicker name="foobar" value="${new Date()}" precision="day" />
How do I read the submitted value of this date-picker?
One way which works but has some unwanted side-effects is the following:
def newObject = new SomeClassName(params)
println "value=" + newObject.foobar
This way o...
I am doing one web application in grails.Now I am making signup page.In signup page I want to check the username availability via ajax.I can write the code for username availability checking in controller or service.I struck with how to contact server from client side via ajax.
My sample gsp code is
<g:form method="post" action="signu...
I'd like my Grails web-app to send an e-mail for each exception that reaches the end-user.
Basically I'm looking for a elegant way to achieve something equivalent to:
try {
// ... all logic/db-access/etc required to render the page is executed here ...
}
catch (Exception e) {
sendmail("[email protected]", "An exce...
I am developing a application in grails which uses lot of ajax.In one part I used the following code :
<iframe id="hidden-upload-frame" style="border:none;height:25px;width:100%;" onload="${remoteFunction(action: 'list', controller: 'file', update: [success: 'fileDomain', failure: 'fileDomain'])}">
</iframe>
<div id="fileDomain">
</di...
Hi
I am developing a grails application which uses lot of ajax.If the request is ajax call then it should give response(this part is working), however if I type in the URL in the browser it should take me to the home/index page instead of the requested page.Below is the sample gsp code for ajax call.
<g:remoteFunction action="list" con...
Hi!
I am using the help-balloons plugin
I would like to use it parametrized. I mean, the messages should come from a properties file. In the documentation appears the following:
<g:helpBalloon code="user.name" suffix=".help"/>
In this last example, the code attribute is used to look up the balloon's title within the message bundle an...
How to build openID ReturnURL in gsp??
Define a ReturnURL
This is the endpoint where your webapp will receive and process the authentication responses from the OpenID Provider.
String _returnURL = "http://example.com/openid";
Reference:http://code.google.com/p/openid4java/wiki/QuickStart
...
Created a table which works fine in IE6,7 but in FF the header hides the first datarow.
<g:if test="${params.history!=null}">
<div style="width:791px;padding-bottom:10px;overflow-y:auto;${(lstDNCallEntries.size()>0)?'height:100px':''}">
<table class="table">
<thead style="position: absolute;">
<% params=params.findAll{ k,v -> k != 'sor...
I'm trying to build a control logic that depends on the current gsp page to call an action, is there a tag or a session method that i can use to identify the current gsp page
I want to restrict access to all GSPs except singup and login, so if a user open any other gsp he will be redirected to signup page and he will also be able to n...
EDIT: based on feedback, erased original Q. completely and reposting in better language
I wish to access a request or params variable and pass it between the controller and the gsp. i understand that the params object contains everything that a querystring has.
All the examples I see are all Model driven.
I have looked up docs online a...
Hi all,
I'd like to split my views in Grails into 2 files a .gsp file and a .js file so that I get a cleaner Javascript separation from my views. So here's an example:
views/index.gsp
views/index.js
views/home/index.jsp
views/home/index.js
But when I simply add the index.js script reference like this:
<script src="index.js" type="te...
Hi,
I have a menu that loaded from main layout. in the menu I have to highlight the specific menu if users click on that menu. I detect it based on Controller name.
I have 2 menu that has different names ie Users Edit and Client Edit.
Both actually share the same controller (ie: UserController) and same Domain.
I tried to create ali...
What is the reason to use g:textField in Grails if you're already familiar with standard HTML form tags?
If I understand correctly the following two markup alternatives are equivalent:
<input type="text" name="name" value="${params.name}" id="name" />
<g:textField name="name" value="${params.name}" />
Are there any circumstances unde...
Hi,
In my Grails app, I have a bean stored in flow scope under a key that is dynamically generated. In a GSP I want to retrieve the bean. Assume that the key of the bean is the current Date as a String (though it's not really).
If in my GSP I use something like
${new Date().getDateString()}
then this will render the current date, bu...