Display constraint not working for me - Grails 1.3.7

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Display constraint not working for me - Grails 1.3.7

daveomcgee
Hi there,

I have 2 domains, with names simplified for explaining the scenario I'm faced with:

SimpleConfig
AdvancedConfig

class AdvancedConfig extends SimpleConfig {
 // More properties

}

I want to add constraints so 3 of the properties in "SimpleConfig" don't show in "AdvancedConfig" scaffolded views even though they are inherited by "AdvancedConfig" .. for example (AdvancedConfig domain:)

static constraints = {
publicUrl display: false
privateUrl display: false
randomUrl display: false
}

This doesn't seem to be working, however. The properties are showing relevant fields in AdvancedConfig views. I've also tried this in a "standard" domain with no inherited properties, etc.Any ideas? Thanks! Please ignore domain names, etc. This is a made-up scenario to simplify names, etc for the situation I'm faced with. 

Regards,
Dave
Reply | Threaded
Open this post in threaded view
|

Re: Display constraint not working for me - Grails 1.3.7

Mengu
hi dave,

i have created an example project and followed through your instructions and created a controller with static scaffold = true. 

1) in the create form, it had not displayed the properties of which display is set to false. however in the index page those properties are visible.

2) i have also set those properties' display value to false in SimpleConfig and it did not took care of it there as well. 

so you have caught a bug here, it may be good to raise a jira issue. :)

2012/1/11 Dave McGee <[hidden email]>
Hi there,

I have 2 domains, with names simplified for explaining the scenario I'm faced with:

SimpleConfig
AdvancedConfig

class AdvancedConfig extends SimpleConfig {
 // More properties

}

I want to add constraints so 3 of the properties in "SimpleConfig" don't show in "AdvancedConfig" scaffolded views even though they are inherited by "AdvancedConfig" .. for example (AdvancedConfig domain:)

static constraints = {
publicUrl display: false
privateUrl display: false
randomUrl display: false
}

This doesn't seem to be working, however. The properties are showing relevant fields in AdvancedConfig views. I've also tried this in a "standard" domain with no inherited properties, etc.Any ideas? Thanks! Please ignore domain names, etc. This is a made-up scenario to simplify names, etc for the situation I'm faced with. 

Regards,
Dave



--
Muhammet S. AYDIN