Yep, quite cool.  Here's a "style" component:

public class Style
{
        
        @Parameter (required = true)
        private Asset _stylesheet;
        
        void beginRender (MarkupWriter writer)
        {
                Document doc = writer.getDocument();
                Element head = doc.find("html/head");
                head.element("link", "rel", "stylesheet", "type", "text/css",
"href", _stylesheet.toClientURL());
        }
}

On 4/6/07, Howard Lewis Ship <[EMAIL PROTECTED]> wrote:
> PS: And may I also say that the new DOM based markup writer is
> very cool.  I was struggling for a while how to add an enctype
> attribute to the enclosing form without needing to patch the core
> code (my head was still stuck in t4 mode).  Then the penny dropped
> & I realised I could just follow the parent elements up & add the
> attribute from within the upload component. Nifty!!

Wow ... I hadn't even thought about that approach. I was going to
replicate the T4 approach, but now I'm not so sure.


>
> > -----Original Message-----
> > From: Howard Lewis Ship [mailto:[EMAIL PROTECTED]
> > Sent: Friday, 6 April 2007 4:55 AM
> > To: Tapestry users
> > Subject: Re: T5 Upload component?
> >
> > I'll take a peek when I get a chance.
> >
> > My intention is for there to be a small tapestry-upload
> > project for the Upload component. The (majority of)
> > applications that don't use upload will not be burdened with
> > the many extra dependencies Upload will bring.
> >
> > On 4/4/07, Ben Sommerville <[EMAIL PROTECTED]> wrote:
> > > FYI - I just submitted an implementation of a file upload
> > component to
> > > JIRA.
> > > It can be downloaded from
> > > https://issues.apache.org/jira/browse/TAPESTRY-1354
> > >
> > > You'll have to build it yourself, but it should "just work" using
> > > maven.
> > >
> > > If anyone tries it out, please let me know if you have any
> > problems or
> > > other feedback.
> > >
> > > regards,
> > > Ben
> > >
> > >
> > > > -----Original Message-----
> > > > From: Howard Lewis Ship [mailto:[EMAIL PROTECTED]
> > > > Sent: Friday, 16 March 2007 12:09 PM
> > > > To: Tapestry users
> > > > Subject: Re: T5 Upload component?
> > > >
> > > > There's a pipeline of RequestFilters associated with the
> > > > RequestHandler service.
> > > >
> > > > On 3/14/07, Pablo Ruggia <[EMAIL PROTECTED]> wrote:
> > > > > Sorry, i forgot to wrote that the forms blows because it
> > > > doesn't get the
> > > > > parameter values, because it's not prepared to recieve a
> > > > multipart request.
> > > > > To "prepare" the multipar request so it seems like a
> > > > regular one, in tap4
> > > > > has MultipartDecoderFilter. I just want to know what is the
> > > > best way to
> > > > > reproduce this behaviour in tap5.
> > > > >
> > > > > On 3/14/07, Pablo Ruggia <[EMAIL PROTECTED]> wrote:
> > > > > >
> > > > > > I have a problem building the upload component.
> > > > > > Form doesn't have support for setting the enctype, so i
> > > > have to pass
> > > > > > enctype='multipart/form-data' as an informal parameter.
> > > > > > Then the forms just blows up whenever i submit it.
> > > > > > In Tap4, there was a filter that creates a fake request
> > > > with the values.
> > > > > > How should I implement this logic in tap5 ?
> > > > > >
> > > > > >
> > > > > > On 3/12/07, D&J Gredler < [EMAIL PROTECTED]> wrote:
> > > > > > >
> > > > > > > I'm going to need it soon as well, but haven't looked
> > > > into it at all. Go
> > > > > > > for
> > > > > > > it!
> > > > > > >
> > > > > > >
> > > > > > > On 3/12/07, Pablo Ruggia <[EMAIL PROTECTED]> wrote:
> > > > > > > >
> > > > > > > > Does anyone implemented this Upload component ?
> > > > > > > > I need it, so if nobody has gone there yet, i'll give
> > > > it a try.
> > > > > > > >
> > > > > > > > On 3/9/07, Howard Lewis Ship <[EMAIL PROTECTED]> wrote:
> > > > > > > > >
> > > > > > > > > Yep, not yet implemented.
> > > > > > > > >
> > > > > > > > > On 3/9/07, Hugo Palma < [EMAIL PROTECTED]> wrote:
> > > > > > > > > > I can't see any upload component here
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > http://tapestry.apache.org/tapestry5/tapestry-core/component-p
> > > > arameters.html
> > > > > > > > > > so i guess that means it's still not implemented.
> > > > > > > > > >
> > > > > > > > > > Peter Beshai wrote:
> > > > > > > > > > > How do we use input type="file" in T5? Is this
> > > > functionality
> > > > > > > > > implemented
> > > > > > > > > > > yet?
> > > > > > > > > > >
> > >
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > Howard M. Lewis Ship
> > TWD Consulting, Inc.
> > Independent J2EE / Open-Source Java Consultant Creator and
> > PMC Chair, Apache Tapestry Creator, Apache HiveMind
> >
> > Professional Tapestry training, mentoring, support and
> > project work.  http://howardlewisship.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
"The future is here.  It's just not evenly distributed yet."

    -- Traditional

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to