Re: Getting data from iterative models

"Diez B. Roggisch" <[email protected]>
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <[email protected]>
Hi,

> How would I iterate over Customer's items, without passing ItemModel to the
> Directive directly?
>
> Dir::Iterate_* expects the name of a Model as its argument, but it seems
> unreachable.
> Is there a way to pass Iterate_* the ItemModel attached to a CustomerModel?
>
> Maybe it's impossible to first fetch the ItemModel attached to another
> model, and pass it
> trough to the iterating directives...

its not possible the way you want to do it. An object returned by a getItem 
call must be immediatly renderable.

But if you instead add the model you now return using getItem in the BTemplate 
beforehand and create directives for it, it will work.

So basically, you already have everything you need. Only add your ChildModel 
to BTemplate.

Diez
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.