Several domain classes in view?

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

Several domain classes in view?

Stephan.Schmidt
Hi,

how do I use several domain classes in on view? When I use a domain class which
is not the domain class of the controller, I get

Message: No such property: name for class: Commit
Caused by: No such property: name for class: Commit

Any solutions?
thanks
bye
-stephan
Reply | Threaded
Open this post in threaded view
|

Re: Several domain classes in view?

graemer
On 3/22/06, Stephan.Schmidt <[hidden email]> wrote:
>
> Hi,
>
> how do I use several domain classes in on view? When I use a domain class
> which
> is not the domain class of the controller, I get
>
> Message: No such property: name for class: Commit
> Caused by: No such property: name for class: Commit
This should work fine, can you show me the model returned by your
controller and your view code?

Thanks
Graeme

>
> Any solutions?
> thanks
> bye
> -stephan
> --
> View this message in context: http://www.nabble.com/Several-domain-classes-in-view--t1323724.html#a3531652
> Sent from the grails - user forum at Nabble.com.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Several domain classes in view?

Stephan.Schmidt
   @Property importsvn = {
      Repo r = Repo.get( params['id'] )
      return [ items : svnService.importsvn(r) ]
   }

...

 <% items.each { %>
....
Reply | Threaded
Open this post in threaded view
|

Re: Several domain classes in view?

graemer
And the property 'name' exists on the type Commit?

Graeme

On 3/22/06, Stephan.Schmidt <[hidden email]> wrote:

>
>    @Property importsvn = {
>       Repo r = Repo.get( params['id'] )
>       return [ items : svnService.importsvn(r) ]
>    }
>
> ...
>
>  <% items.each { %>
> ....
>
> --
> View this message in context: http://www.nabble.com/Several-domain-classes-in-view--t1323724.html#a3532684
> Sent from the grails - user forum at Nabble.com.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Several domain classes in view?

Stephan.Schmidt
In reply to this post by Stephan.Schmidt
Hmm. Yes.

After reading some forum posts I did a "rails clean run-app" and now it works.

Sorry for asking,

thanks for the great support

bye
-stephan
Reply | Threaded
Open this post in threaded view
|

RE: Several domain classes in view?

Dierk König
> After reading some forum posts I did a "rails clean run-app" and now it
> works.

good to hear.

BTW: that's "grails", not "rails" ;-)

This makes we think we could add a troubleshooting or FAQ page.

Mittie
Reply | Threaded
Open this post in threaded view
|

Re: Several domain classes in view?

graemer
On 3/22/06, Dierk Koenig <[hidden email]> wrote:
> > After reading some forum posts I did a "rails clean run-app" and now it
> > works.
>
> good to hear.
>
> BTW: that's "grails", not "rails" ;-)
>
> This makes we think we could add a troubleshooting or FAQ page.
Yes might be an idea

Graeme
>
> Mittie
>
Reply | Threaded
Open this post in threaded view
|

RE: Several domain classes in view?

Stephan.Schmidt
In reply to this post by Dierk König
good to hear.

BTW: that's "grails", not "rails" ;-)
Sorry :-) Well due to customer requests I'm currently doing Rails, Grails and CakePHP
projects in parallel, which leads to some confusion on my part :-)

This makes we think we could add a troubleshooting or FAQ page.

Mittie
Good idea :-)

bye
-stephan
Reply | Threaded
Open this post in threaded view
|

RE: Several domain classes in view?

Dierk König
In reply to this post by graemer
> > This makes we think we could add a troubleshooting or FAQ page.
> Yes might be an idea

I started such a page under
http://docs.codehaus.org/display/GRAILS/Troubleshooting

I need you help for completing the content and for possibly
referencing it from the navigation bar.

cheers
Mittie
Reply | Threaded
Open this post in threaded view
|

Re: Several domain classes in view?

graemer
On 3/22/06, Dierk Koenig <[hidden email]> wrote:
> > > This makes we think we could add a troubleshooting or FAQ page.
> > Yes might be an idea
>
> I started such a page under
> http://docs.codehaus.org/display/GRAILS/Troubleshooting
Great!

>
> I need you help for completing the content and for possibly
> referencing it from the navigation bar.
Will do.. I think to side bar is getting a bit crowded though (I'm
thinking of actually trimming it down), better referenced from the
User Guide and Documentation pages

Graeme
>
> cheers
> Mittie
>