Comment to my first post. I had to enhance the if clause above to:
if (!p.isBidirectional() || p.isManyToOne()) {
To get ManyToOne select boxes being displayed.
Type: Posts; User: ThomasBecker; Keyword(s):
Comment to my first post. I had to enhance the if clause above to:
if (!p.isBidirectional() || p.isManyToOne()) {
To get ManyToOne select boxes being displayed.
Done:
http://jira.grails.org/browse/GRAILS-7446
http://jira.grails.org/browse/GRAILS-7447
Here's the JIRA: http://jira.grails.org/browse/GRAILS-7445
As I have requests containing json which needs to get parsed your suggestion is not an option. So I had a look at the sources and the fix is pretty easy. Was not so easy to find out that the grails...
Another similar issue I had is that you can't remove all associated objects with the default scaffolding. Root cause is that if you deselect everything in a select box, nothing from that select box...
Hi all,
I found it quite odd that associations are handled differently in create and edit views. Reason is the following line from create.gsp scaffolding template:
if...
Hi Peter,
ok. I think I'll leave it at response.sendError as it works well.
Cheers,
Thomas
Hi Peter,
that is exactly what I was looking for. I will try going this route and it will eliminate lots of custom code I had to do for my current setup.
I will update this thread with the...
Hi again,
according to the grails documentation I've got this in my UrlMappings.groovy:
"403"(controller: "errors", action: "forbidden")
"404"(controller: "errors", action: "notFound")...
Sorry for the late reply. Found some time to work on this issue again.
To explain why I do it this way:
I've two objects with a relation to each other. Question and Answer. A question has many...
As I have the convention classname = discriminator name in my domain objects, I'm using now class.getSimpleName() to display the discriminator in JSON.
Sorry, that I didn't update this thread....
Hi Peter,
I removed some code which is not related to the problem, but it obfuscates when rejectValue is being called.
Actually it's called right before the second code snipplet form my first...
Hi all,
I've another strange grails issue which I don't seem to be able to sort out myself. I'm calling rejectValue in my controller:
if(!params['correctAnswerNum'])...
Hi all,
I have a domain object with some subclasses. I'm using Table Per Class Hirarchy and have a customized discriminator column and values for the subclasses.
Parent contains:
static...
Hi all,
I'm using grails to feed some android clients using json format. I do some custom marshalling with "JSON.registerObjectMarshaller(SomeObject)" and all seems to work fine. Besides the fact...
Found a resolution right after posting, was not a grails issue so I removed the text. Couldn't delete the thread.
Peter, looks good. Hope it'll help others.
Good change. Would have saved me a couple of torned out hairs.
I'd put a yellow box below the example of the show method in the beginning of 6.1.3 that the name has to be different when...
Hi Peter,
great. Works. Thumbs up for the good support.
Thinking about the fact that the constraint block is static it should have been clear to me that I can't access instance variables in...
Ok, got the difference now. I thought that what works in Model and Views in general should more or less also apply in scaffolding. I understood now why it doesn't (anymore).
A hint in the reference...
HI deuseks, Hi Peter,
thanks for the hints. I'm trying to do the following now:
class Response {
Survey survey
Answer answer
Store store
Deuseks,
i can't believe that it works when using bookInstance as the name. But it does!
This is an excerpt from the reference doc. Chapter 6.3.1 Models and Views:
def show = {
[...
HI deuseks,
thanks for your reply. I will look more into how form validation is done in grails. I can definetly work out something with custom code and or grails validation. I just thought there...
Hi all,
am still evaluating grails for a new project. Grails appeared to be very promising in the beginning (and it still does), but I'm having problems with things that should be really simple.
...
Hi,
watched and enjoyed the presentation. Thanks for the link. Remodelt my domain a bit accordingly.
However my question is not 100% answered, but I'am trying to establish the constraints now...