I want to build a web application like a wiki and a forum. There will be much more readers than editors. My favourites to implement it are Grails and Wicket.
Grails: I like the integrated environment with which you can start quickly. I think the classic stateless mvc approach is well suited to a content centric website. Disadvantages ar...
I have a need to specify a custom salt when encoding passwords with acegi 0.5.2 plugin for grails.
I have found a tutorial that shows how to use a ReflectionSaltSource using a parameter of the user (possibly the username). However, I was unable to get that to work and I actually need to be able to control the salt more than just pickin...
Hi
Is it possible to map the result of a native SQL query to a collection of Grails domain class instances?
...
Today someone told me I should give Grails a try. So we can still use our old java code for some things, but develop much faster.
This isn't really a debate on what programming language is better, although if you have tips I'm all ears, but really my question is:
Is Grails just an overhyped fashionable thing to use, or is it here to st...
I need to test whether a resource file (an image, for instance) exists and if not, I will display another image.
My GSP view code looks like:
<% if (resExists(dir: "images", file:"img.jpg")) {%>
<img src="${g.resource(dir:'images',file: 'img.jpg')}">
<% else { %>
<img src="${g.resource(dir:'images',file: 'noimg.jpg')}">
<%}%>
How ...
Hi, how can I call a method residing in an existing Java class from Grails app ? Is it necessary/recommended to wrap that up in a service?
...
Hi!
I have a groovy application which uses the grails calendar plugin grails calendar plugin.
Up to now I was using the calendar version 1.1.1 which has some bugs under IE.
I've upgraded to version 1.2.0-SNAPSHOT3 but now I am getting this exception, therefore
I had to downgrade to my previous version.
Any hint how to workaround this p...
I have a grails 1.2 app and I want to use declarative security in order to restrict accesses based on roles. I decided to try shiro, installed the plugin, but when I try to authenticate, the message "Invalid username and/or password" shows up in the header. I check the db entry and the user is there with the sha'ed password. No messages ...
Is there a visual GUI builder, such as GWTDesigner that one could use in developing with Grails? I am new to Grails and am presently working from the command line and using a text editor. I have briefly looked at using Eclipse and Netbeans as IDEs.
Any help would be greatly appreciated.
...
I'm very new to grails (day 2).
First, I find it hard to find easily browsable resources (the documentation is very raw, and the tutorials are spread out and only show 'hello world' types of examples ).
I've set up my domain class with a relationship to other data types.
class ShopCategoryPage{
//some stuff
ProductProcedure procedure;...
I have a checkbox on my GSP page as follows (which was stolen directly from the scaffolded "create" code for my domain object)...
<tr class="prop">
<td valign="top" class="name">
<label for="isSelling"><g:message code="person.isSelling.label" default="Is Selling" /></label>
</td>
<td valign="top" class="value ${hasErrors(bean: personI...
I know Grails has a map based constructor for domain objects, to which you can pass the params of a URL to and it will apply the appropriate field settings to the object using introspection, like this...
myDomainInstance = new MyObject(params)
I was wondering whether there was an equivalent method of taking the params and applying the...
Hi,
There are at least two Grails plugins that emulate the database migration functionality of Rails.
Autobase
Liquibase
Is there a consensus about which of these is best, or is there another plugin that does database migration which is better than either of the above?
Thanks,
Don
...
How come it is good practice within Grails to place classes in packages (e.g. mycompany.Book)?
I know it is a prerequisite in order to deploy Grails solution to the Google App Engine (using the plugin), but other than that and a well structured code library for large projects, what other benefits are there in describing packages for cl...
Hi, I've been looking in some of the latest Grails books and many open source projects for samples and best practices for adding search/filter functionality to scaffolded list.gsp:s, eg making it work with pagination and sorting etc. This may be a simple task, but being a Grails newcomer it would be of great benefit in having some thorou...
I have grails project using my existing Java domain classes of a spring project and I need to configure typeDefinitions. In the spring project it is possible to configure this property of the LocalSessionFactoryBean - but how do you do that in a grails project?
...
I have a field in my domain object which I define as an Integer...
Integer minPrice
I then access it in a GSP page as follows:
${fieldValue(bean: myBean, field: 'minPrice')}
and what I get in my HTML is...
100,000
which is not an Integer, it's a String. Worse still it's a formatted String in a particular locale.
This is a prob...
i am currently implementing a grails web-app, with a couple of complex forms where modifications on an association graph should be managed "in-memory" (that is the http session) as long as the entity or top-level domain object is not saved.
e.g.
top-to-bottom: Document -> Categories -> Sub-Categories ...
requirement: modifications to ...
I have what I think is a simple problem but have been unable to solve...
For some reason I have a controller that uses removeFrom*.save() which throws no errors but does not do anything.
Running
Grails 1.2
Linux/Ubuntu
The following application is stripped down to reproduce the problem...
I have two domain objects via create-dom...
Like here in stackoverflow if i force put bad characters on URL in id place it redirects you to a page error. I would like to know if with Grails it has some kind of plugin for prevent id like: "123$#3" or an easy way because i have a lot of actions and do something like below dont seems to be the best way:
def find = {
def v...