Hehe... I suppose if I'd read the old post more closely (as opposed to just
looking at #2) I could have figured that out. Sounds like the @EagerLoad
that Robin pointed to is what you want.

On 8/23/07, Ben Tomasini <[EMAIL PROTECTED]> wrote:
>
> Doh.
>
> I meant #1.
>
> Thanks.
>
> Ben
>
> On 8/23/07, Josh Canfield <[EMAIL PROTECTED]> wrote:
> >
> > I don't follow how invoking an init method in your builder is related to
> > the
> > problem of the html generation. Can you expand on that?
> >
> > I would use a component and the MarkupWriter in the
> > beginRender/afterRender
> > methods. Something like this: (this code has not been compiled so
> > compilation/functional defects may exist)
> >
> >
> > public class MyComponent {
> >
> >   void beginRender(MarkupWriter writer) {
> >     writer.element("ul");
> >     // if you have a tree then you could recursively build out the
> > unordered
> > list...
> >     for (String item : itemValues ) {
> >       writer.element("li");
> >       writer.write(item);
> >       writer.end();
> >     }
> >     // you could end the element here, ending it in afterrender
> >     // allows the component body to be evalutated.
> >   }
> >
> >   void afterRender(MarkupWriter writer) {
> >      writer.end();
> >   }
> > }
> >
> >
> > Josh
> > On 8/23/07, Ben Tomasini <[EMAIL PROTECTED]> wrote:
> > >
> > > I have the same requirement mentioned in #2.  What is the best
> approach
> > to
> > > handle this with Tapestry 5?  I am thinking of just eager loading a
> > > service
> > > and invoking the init method in the builder method of the module.  Any
> > > other
> > > thoughts?
> > >
> > > I think this was the Tapestry 4 way:
> > >
> > >
> >
> http://tapestry.apache.org/tapestry4/tapestry/hivedocs/module/tapestry.init.html
> > >
> > > Ben
> > >
> > > On 6/5/07, Erik Vullings <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Hi,
> > > >
> > > > I've recently started working with T5 because I liked a lot what
> I've
> > > > seen! I therefore have some basic questions, and I hope you can help
> > > > me with them:
> > > >
> > > > 1. I've started changing the quickstart project to move a current
> > > > struts2-spring-jdbc application to T5. Where can I put my dao
> > > > initialization  (creation of hsqldb tables, which used to be done
> via
> > > > my ContextListener class in struts2)?
> > > >
> > > > 2. In my existing application, I use a (folder-like) tree based on
> the
> > > > www.dhtmlgoodies.com drag-drop-folder-tree. It is based on a
> standard
> > > > HTML unordered list, which I generate in my page's java class. In
> the
> > > > accompanying HTML file, I use "${formattedTree}" However, when I
> > > > return the formattedTree "<ul><li>..." it becomes &lt;ul&gt; etc.
> How
> > > > can I change the encoding, in other words, output raw HTML to the
> HTML
> > > > template file.
> > > >
> > > > 3. Related to Q2, are there any T5 tutorials on how to develop a
> tree
> > > > component, similar to a grid component? Or does someone already have
> > > > it?
> > > >
> > > > 4. Is it possible to enable T5 javadoc help to display in the
> Eclipse
> > > IDE?
> > > >
> > > > Thanks for your help,
> > > > Erik
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> >
> >
> >
> > --
> > --
> > TheDailyTube.com. Sign up and get the best new videos on the internet
> > delivered fresh to your inbox.
> >
>



-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

Reply via email to