Can I make scaffolding ignore a field?

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

Can I make scaffolding ignore a field?

Tim Pigden

I can make GORM ignore a field through the transient static type. But is there an equivalent to make the scaffolding ignore a field I don’t want displayed?

 

Tim Pigden

+44 1992 517100

Optrak Distribution Software Ltd

Registration No. 2327613

Orland House, Mead Lane, Hertford, SG13 7AT

Vat No. 521 6845 50

www.optrak.co.uk

Reply | Threaded
Open this post in threaded view
|

Re: Can I make scaffolding ignore a field?

graemer
Not at the moment no

The only way is to use grails generate-all and remove the field from
the generated source

Cheers

On 10/10/07, Tim Pigden <[hidden email]> wrote:

>
>
>
>
> I can make GORM ignore a field through the transient static type. But is
> there an equivalent to make the scaffolding ignore a field I don't want
> displayed?
>
>
>
> Tim Pigden
>
> +44 1992 517100
>
> Optrak Distribution Software Ltd
>
> Registration No. 2327613
>
> Orland House, Mead Lane, Hertford, SG13 7AT
>
> Vat No. 521 6845 50
>
> www.optrak.co.uk


--
Graeme Rocher
Grails Project Lead
http://grails.org

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

Re: Can I make scaffolding ignore a field?

Marc Palmer Local

On 10 Oct 2007, at 07:54, Graeme Rocher wrote:

> Not at the moment no
>
> The only way is to use grails generate-all and remove the field from
> the generated source
>

Actually wasn't there a visible: false constraint, or a potential  
abuse of the widget: constraint? Undocumented stuff I think... but  
"visible: false" might be subject of an RFE jira issue rather than  
existing already.

Marc


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

Re: Can I make scaffolding ignore a field?

francxk
I don't think the model is the right place to specify a view concern ?

But i try to set a private field (ie private String privateField) and the view does not show this field !!


2007/10/10, Marc Palmer <[hidden email]>:

On 10 Oct 2007, at 07:54, Graeme Rocher wrote:

> Not at the moment no
>
> The only way is to use grails generate-all and remove the field from
> the generated source
>

Actually wasn't there a visible: false constraint, or a potential
abuse of the widget: constraint? Undocumented stuff I think... but
"visible: false" might be subject of an RFE jira issue rather than
existing already.

Marc


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

RE: Can I make scaffolding ignore a field?

Tim Pigden
In reply to this post by Tim Pigden

Ah but I want it to not be a view concern …

 

Private is no good because it then means that GORM doesn’t see it either.

 

This is really just a work around for the fact that I can’t just drop my custom Duration class into the domain model and tell something, somewhere that whenever I do this I want it to format / parse in a particular way – just like you can for Dates.

 

Tim

 

 

 

From: francxk [mailto:[hidden email]]
Sent: 10 October 2007 12:17
To: [hidden email]
Subject: Re: [grails-user] Can I make scaffolding ignore a field?

 

I don't think the model is the right place to specify a view concern ?

But i try to set a private field (ie private String privateField) and the view does not show this field !!

2007/10/10, Marc Palmer <[hidden email]>:


On 10 Oct 2007, at 07:54, Graeme Rocher wrote:

> Not at the moment no
>
> The only way is to use grails generate-all and remove the field from
> the generated source
>

Actually wasn't there a visible: false constraint, or a potential
abuse of the widget: constraint? Undocumented stuff I think... but
"visible: false" might be subject of an RFE jira issue rather than
existing already.

Marc


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

 

Reply | Threaded
Open this post in threaded view
|

Re: Can I make scaffolding ignore a field?

Marc Palmer Local

On 10 Oct 2007, at 12:46, Tim Pigden wrote:

> Ah but I want it to not be a view concern …
>
> Private is no good because it then means that GORM doesn’t see it  
> either.
>
> This is really just a work around for the fact that I can’t just  
> drop my custom Duration class into the domain model and tell  
> something, somewhere that whenever I do this I want it to format /  
> parse in a particular way – just like you can for Dates.
>

Isn't there a templating by convention mechanism already for this? It  
was discussed, and I thought implemented?

Marc


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply | Threaded
Open this post in threaded view
|

RE: Can I make scaffolding ignore a field?

Tim Pigden
In reply to this post by Tim Pigden
Is there? That would be good if someone can provide me with a pointer.

-----Original Message-----
From: Marc Palmer [mailto:[hidden email]]
Sent: 10 October 2007 13:35
To: [hidden email]
Subject: Re: [grails-user] Can I make scaffolding ignore a field?


On 10 Oct 2007, at 12:46, Tim Pigden wrote:

> Ah but I want it to not be a view concern ...
>
> Private is no good because it then means that GORM doesn't see it  
> either.
>
> This is really just a work around for the fact that I can't just  
> drop my custom Duration class into the domain model and tell  
> something, somewhere that whenever I do this I want it to format /  
> parse in a particular way - just like you can for Dates.
>

Isn't there a templating by convention mechanism already for this? It  
was discussed, and I thought implemented?

Marc


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email