You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-user@incubator.apache.org by Naresh Bhatia <NB...@sapient.com> on 2006/10/07 15:41:01 UTC
How to add HTML markup to a page?
What is the preferred way of adding HTML markup to a page? So far, I
have found that only the following approach works (i.e. using
<f:verbatim>). Looks kind of verbose just to add <h2></h2>!
<f:verbatim><h2></f:verbatim>
<h:outputText value="#{messages['Measure.Home']}" />
<f:verbatim></h2></f:verbatim>
Thanks.
Naresh
Re: How to add HTML markup to a page?
Posted by Adam Winer <aw...@gmail.com>.
I have very little experience with Clay, to be honest,
so I'd defer judgement there to someone with experience!
My limited experience does agree with your statement
of "xml-verbose".
IMO, though, any solution that leaves JSPs in the
picture is going to suffer from a lot of the problems
inherent in JSPs. The solution isn't building
compositional layers on top of JSPs, it's building
up from scratch, which Facelets does (and does well).
-- Adam
On 10/8/06, Clemens Schneider <cl...@gmail.com> wrote:
>
> When using JSF 1.2 and JSP 2.1 together with Shale Clay, will Facelets
> still be the better component-composition framework? Clay seems a bit
> more powerful with that, but a bit more xml-verbose, too...
>
> Adam Winer wrote:
> > On 10/8/06, Naresh Bhatia <NB...@sapient.com> wrote:
> >> Thanks Adam. I have two follow up questions:
> >>
> >> - How does JSP 2.1/JSF 1.2 solve this issue?
> >
> > That's a very complicated question, but briefly speaking
> > it makes <f:verbatim> unnecessary (and a no-op).
> >
> >> - What would be the pros and cons of choosing JSP 2.1/JSF 1.2 vs.
> >> Facelets?
> >
> > Facelets: better in almost every way - *much* faster, great
> > templating features, much easier to write custom tags, etc.
> > JSP: the "standard", so better supported by component sets -
> > but does your app server even support JSP 2.1 yet? (Few do).
> >
> > -- Adam
> >
> >
> >>
> >> Thanks.
> >> Naresh
> >>
> >> -----Original Message-----
> >> From: Adam Winer [mailto:awiner@gmail.com]
> >> Sent: Sunday, October 08, 2006 2:01 AM
> >> To: adffaces-user@incubator.apache.org
> >> Subject: Re: How to add HTML markup to a page?
> >>
> >> On 10/7/06, Naresh Bhatia <NB...@sapient.com> wrote:
> >> >
> >> > Just to be clear, what would be legal syntax in facelets? Something
> >> like
> >> > this?
> >> >
> >> > <h2>
> >> > <h:outputText value="#{messages['Measure.Home']}" />
> >> > </h2>
> >>
> >>
> >>
> >> Yes. Also in JSP 2.1/JSF 1.2,
> >>
> >> I see that I am running into this problem only if this code is inside
> >> > the <tr:document> tag. If so, why is this tag so restrictive? It is
> >> > making the page very unreadable. Would be nice to have some context
> >> > behind this design.
> >>
> >>
> >> It's not at all specific to tr:document. It's specific to any
> >> JSF tag that controls rendering of its children. For example,
> >> h:panelGroup. Most Trinidad tags control child rendering
> >> (for PPR support, for one).
> >>
> >> -- Adam
> >>
> >>
> >>
> >>
> >> Thanks.
> >> > Naresh
> >> >
> >> > -----Original Message-----
> >> > From: Adam Winer [mailto:awiner@gmail.com]
> >> > Sent: Saturday, October 07, 2006 4:01 PM
> >> > To: adffaces-user@incubator.apache.org
> >> > Subject: Re: How to add HTML markup to a page?
> >> >
> >> > Facelets is well worth the effort!
> >> >
> >> > -- Adam
> >> >
> >> >
> >> > On 10/7/06, Naresh Bhatia <NB...@sapient.com> wrote:
> >> > >
> >> > > Hmmm... I was avoiding facelets just because it would be one more
> >> > thing
> >> > > to learn to get everything going :-). Anyway, if facelets can clean
> >> up
> >> > > the markup, it may be worth the effort!
> >> > >
> >> > > Thanks.
> >> > > Naresh
> >> > >
> >> > > -----Original Message-----
> >> > > From: Andrew Robinson [mailto:andrew.rw.robinson@gmail.com]
> >> > > Sent: Saturday, October 07, 2006 1:13 PM
> >> > > To: adffaces-user@incubator.apache.org
> >> > > Subject: Re: How to add HTML markup to a page?
> >> > >
> >> > > Use facelets. Verbatim is required if you use JSP
> >> > >
> >> > > On 10/7/06, Naresh Bhatia <NB...@sapient.com> wrote:
> >> > > > What is the preferred way of adding HTML markup to a page? So
> far,
> >> I
> >> > > > have found that only the following approach works (i.e. using
> >> > > > <f:verbatim>). Looks kind of verbose just to add <h2></h2>!
> >> > > >
> >> > > >
> >> > > >
> >> > > > <f:verbatim><h2></f:verbatim>
> >> > > >
> >> > > > <h:outputText value="#{messages['Measure.Home']}" />
> >> > > >
> >> > > > <f:verbatim></h2></f:verbatim>
> >> > > >
> >> > > >
> >> > > >
> >> > > > Thanks.
> >> > > >
> >> > > > Naresh
> >> > > >
> >> > > >
> >> > > >
> >> > >
> >> >
> >>
> >
>
>
Re: How to add HTML markup to a page?
Posted by Clemens Schneider <cl...@gmail.com>.
When using JSF 1.2 and JSP 2.1 together with Shale Clay, will Facelets
still be the better component-composition framework? Clay seems a bit
more powerful with that, but a bit more xml-verbose, too...
Adam Winer wrote:
> On 10/8/06, Naresh Bhatia <NB...@sapient.com> wrote:
>> Thanks Adam. I have two follow up questions:
>>
>> - How does JSP 2.1/JSF 1.2 solve this issue?
>
> That's a very complicated question, but briefly speaking
> it makes <f:verbatim> unnecessary (and a no-op).
>
>> - What would be the pros and cons of choosing JSP 2.1/JSF 1.2 vs.
>> Facelets?
>
> Facelets: better in almost every way - *much* faster, great
> templating features, much easier to write custom tags, etc.
> JSP: the "standard", so better supported by component sets -
> but does your app server even support JSP 2.1 yet? (Few do).
>
> -- Adam
>
>
>>
>> Thanks.
>> Naresh
>>
>> -----Original Message-----
>> From: Adam Winer [mailto:awiner@gmail.com]
>> Sent: Sunday, October 08, 2006 2:01 AM
>> To: adffaces-user@incubator.apache.org
>> Subject: Re: How to add HTML markup to a page?
>>
>> On 10/7/06, Naresh Bhatia <NB...@sapient.com> wrote:
>> >
>> > Just to be clear, what would be legal syntax in facelets? Something
>> like
>> > this?
>> >
>> > <h2>
>> > <h:outputText value="#{messages['Measure.Home']}" />
>> > </h2>
>>
>>
>>
>> Yes. Also in JSP 2.1/JSF 1.2,
>>
>> I see that I am running into this problem only if this code is inside
>> > the <tr:document> tag. If so, why is this tag so restrictive? It is
>> > making the page very unreadable. Would be nice to have some context
>> > behind this design.
>>
>>
>> It's not at all specific to tr:document. It's specific to any
>> JSF tag that controls rendering of its children. For example,
>> h:panelGroup. Most Trinidad tags control child rendering
>> (for PPR support, for one).
>>
>> -- Adam
>>
>>
>>
>>
>> Thanks.
>> > Naresh
>> >
>> > -----Original Message-----
>> > From: Adam Winer [mailto:awiner@gmail.com]
>> > Sent: Saturday, October 07, 2006 4:01 PM
>> > To: adffaces-user@incubator.apache.org
>> > Subject: Re: How to add HTML markup to a page?
>> >
>> > Facelets is well worth the effort!
>> >
>> > -- Adam
>> >
>> >
>> > On 10/7/06, Naresh Bhatia <NB...@sapient.com> wrote:
>> > >
>> > > Hmmm... I was avoiding facelets just because it would be one more
>> > thing
>> > > to learn to get everything going :-). Anyway, if facelets can clean
>> up
>> > > the markup, it may be worth the effort!
>> > >
>> > > Thanks.
>> > > Naresh
>> > >
>> > > -----Original Message-----
>> > > From: Andrew Robinson [mailto:andrew.rw.robinson@gmail.com]
>> > > Sent: Saturday, October 07, 2006 1:13 PM
>> > > To: adffaces-user@incubator.apache.org
>> > > Subject: Re: How to add HTML markup to a page?
>> > >
>> > > Use facelets. Verbatim is required if you use JSP
>> > >
>> > > On 10/7/06, Naresh Bhatia <NB...@sapient.com> wrote:
>> > > > What is the preferred way of adding HTML markup to a page? So far,
>> I
>> > > > have found that only the following approach works (i.e. using
>> > > > <f:verbatim>). Looks kind of verbose just to add <h2></h2>!
>> > > >
>> > > >
>> > > >
>> > > > <f:verbatim><h2></f:verbatim>
>> > > >
>> > > > <h:outputText value="#{messages['Measure.Home']}" />
>> > > >
>> > > > <f:verbatim></h2></f:verbatim>
>> > > >
>> > > >
>> > > >
>> > > > Thanks.
>> > > >
>> > > > Naresh
>> > > >
>> > > >
>> > > >
>> > >
>> >
>>
>
Re: RE: How to add HTML markup to a page?
Posted by Adam Winer <aw...@gmail.com>.
On 10/8/06, Naresh Bhatia <NB...@sapient.com> wrote:
> Thanks Adam. I have two follow up questions:
>
> - How does JSP 2.1/JSF 1.2 solve this issue?
That's a very complicated question, but briefly speaking
it makes <f:verbatim> unnecessary (and a no-op).
> - What would be the pros and cons of choosing JSP 2.1/JSF 1.2 vs.
> Facelets?
Facelets: better in almost every way - *much* faster, great
templating features, much easier to write custom tags, etc.
JSP: the "standard", so better supported by component sets -
but does your app server even support JSP 2.1 yet? (Few do).
-- Adam
>
> Thanks.
> Naresh
>
> -----Original Message-----
> From: Adam Winer [mailto:awiner@gmail.com]
> Sent: Sunday, October 08, 2006 2:01 AM
> To: adffaces-user@incubator.apache.org
> Subject: Re: How to add HTML markup to a page?
>
> On 10/7/06, Naresh Bhatia <NB...@sapient.com> wrote:
> >
> > Just to be clear, what would be legal syntax in facelets? Something
> like
> > this?
> >
> > <h2>
> > <h:outputText value="#{messages['Measure.Home']}" />
> > </h2>
>
>
>
> Yes. Also in JSP 2.1/JSF 1.2,
>
> I see that I am running into this problem only if this code is inside
> > the <tr:document> tag. If so, why is this tag so restrictive? It is
> > making the page very unreadable. Would be nice to have some context
> > behind this design.
>
>
> It's not at all specific to tr:document. It's specific to any
> JSF tag that controls rendering of its children. For example,
> h:panelGroup. Most Trinidad tags control child rendering
> (for PPR support, for one).
>
> -- Adam
>
>
>
>
> Thanks.
> > Naresh
> >
> > -----Original Message-----
> > From: Adam Winer [mailto:awiner@gmail.com]
> > Sent: Saturday, October 07, 2006 4:01 PM
> > To: adffaces-user@incubator.apache.org
> > Subject: Re: How to add HTML markup to a page?
> >
> > Facelets is well worth the effort!
> >
> > -- Adam
> >
> >
> > On 10/7/06, Naresh Bhatia <NB...@sapient.com> wrote:
> > >
> > > Hmmm... I was avoiding facelets just because it would be one more
> > thing
> > > to learn to get everything going :-). Anyway, if facelets can clean
> up
> > > the markup, it may be worth the effort!
> > >
> > > Thanks.
> > > Naresh
> > >
> > > -----Original Message-----
> > > From: Andrew Robinson [mailto:andrew.rw.robinson@gmail.com]
> > > Sent: Saturday, October 07, 2006 1:13 PM
> > > To: adffaces-user@incubator.apache.org
> > > Subject: Re: How to add HTML markup to a page?
> > >
> > > Use facelets. Verbatim is required if you use JSP
> > >
> > > On 10/7/06, Naresh Bhatia <NB...@sapient.com> wrote:
> > > > What is the preferred way of adding HTML markup to a page? So far,
> I
> > > > have found that only the following approach works (i.e. using
> > > > <f:verbatim>). Looks kind of verbose just to add <h2></h2>!
> > > >
> > > >
> > > >
> > > > <f:verbatim><h2></f:verbatim>
> > > >
> > > > <h:outputText value="#{messages['Measure.Home']}" />
> > > >
> > > > <f:verbatim></h2></f:verbatim>
> > > >
> > > >
> > > >
> > > > Thanks.
> > > >
> > > > Naresh
> > > >
> > > >
> > > >
> > >
> >
>
RE: How to add HTML markup to a page?
Posted by Naresh Bhatia <NB...@sapient.com>.
Thanks Adam. I have two follow up questions:
- How does JSP 2.1/JSF 1.2 solve this issue?
- What would be the pros and cons of choosing JSP 2.1/JSF 1.2 vs.
Facelets?
Thanks.
Naresh
-----Original Message-----
From: Adam Winer [mailto:awiner@gmail.com]
Sent: Sunday, October 08, 2006 2:01 AM
To: adffaces-user@incubator.apache.org
Subject: Re: How to add HTML markup to a page?
On 10/7/06, Naresh Bhatia <NB...@sapient.com> wrote:
>
> Just to be clear, what would be legal syntax in facelets? Something
like
> this?
>
> <h2>
> <h:outputText value="#{messages['Measure.Home']}" />
> </h2>
Yes. Also in JSP 2.1/JSF 1.2,
I see that I am running into this problem only if this code is inside
> the <tr:document> tag. If so, why is this tag so restrictive? It is
> making the page very unreadable. Would be nice to have some context
> behind this design.
It's not at all specific to tr:document. It's specific to any
JSF tag that controls rendering of its children. For example,
h:panelGroup. Most Trinidad tags control child rendering
(for PPR support, for one).
-- Adam
Thanks.
> Naresh
>
> -----Original Message-----
> From: Adam Winer [mailto:awiner@gmail.com]
> Sent: Saturday, October 07, 2006 4:01 PM
> To: adffaces-user@incubator.apache.org
> Subject: Re: How to add HTML markup to a page?
>
> Facelets is well worth the effort!
>
> -- Adam
>
>
> On 10/7/06, Naresh Bhatia <NB...@sapient.com> wrote:
> >
> > Hmmm... I was avoiding facelets just because it would be one more
> thing
> > to learn to get everything going :-). Anyway, if facelets can clean
up
> > the markup, it may be worth the effort!
> >
> > Thanks.
> > Naresh
> >
> > -----Original Message-----
> > From: Andrew Robinson [mailto:andrew.rw.robinson@gmail.com]
> > Sent: Saturday, October 07, 2006 1:13 PM
> > To: adffaces-user@incubator.apache.org
> > Subject: Re: How to add HTML markup to a page?
> >
> > Use facelets. Verbatim is required if you use JSP
> >
> > On 10/7/06, Naresh Bhatia <NB...@sapient.com> wrote:
> > > What is the preferred way of adding HTML markup to a page? So far,
I
> > > have found that only the following approach works (i.e. using
> > > <f:verbatim>). Looks kind of verbose just to add <h2></h2>!
> > >
> > >
> > >
> > > <f:verbatim><h2></f:verbatim>
> > >
> > > <h:outputText value="#{messages['Measure.Home']}" />
> > >
> > > <f:verbatim></h2></f:verbatim>
> > >
> > >
> > >
> > > Thanks.
> > >
> > > Naresh
> > >
> > >
> > >
> >
>
Re: How to add HTML markup to a page?
Posted by Adam Winer <aw...@gmail.com>.
On 10/7/06, Naresh Bhatia <NB...@sapient.com> wrote:
>
> Just to be clear, what would be legal syntax in facelets? Something like
> this?
>
> <h2>
> <h:outputText value="#{messages['Measure.Home']}" />
> </h2>
Yes. Also in JSP 2.1/JSF 1.2,
I see that I am running into this problem only if this code is inside
> the <tr:document> tag. If so, why is this tag so restrictive? It is
> making the page very unreadable. Would be nice to have some context
> behind this design.
It's not at all specific to tr:document. It's specific to any
JSF tag that controls rendering of its children. For example,
h:panelGroup. Most Trinidad tags control child rendering
(for PPR support, for one).
-- Adam
Thanks.
> Naresh
>
> -----Original Message-----
> From: Adam Winer [mailto:awiner@gmail.com]
> Sent: Saturday, October 07, 2006 4:01 PM
> To: adffaces-user@incubator.apache.org
> Subject: Re: How to add HTML markup to a page?
>
> Facelets is well worth the effort!
>
> -- Adam
>
>
> On 10/7/06, Naresh Bhatia <NB...@sapient.com> wrote:
> >
> > Hmmm... I was avoiding facelets just because it would be one more
> thing
> > to learn to get everything going :-). Anyway, if facelets can clean up
> > the markup, it may be worth the effort!
> >
> > Thanks.
> > Naresh
> >
> > -----Original Message-----
> > From: Andrew Robinson [mailto:andrew.rw.robinson@gmail.com]
> > Sent: Saturday, October 07, 2006 1:13 PM
> > To: adffaces-user@incubator.apache.org
> > Subject: Re: How to add HTML markup to a page?
> >
> > Use facelets. Verbatim is required if you use JSP
> >
> > On 10/7/06, Naresh Bhatia <NB...@sapient.com> wrote:
> > > What is the preferred way of adding HTML markup to a page? So far, I
> > > have found that only the following approach works (i.e. using
> > > <f:verbatim>). Looks kind of verbose just to add <h2></h2>!
> > >
> > >
> > >
> > > <f:verbatim><h2></f:verbatim>
> > >
> > > <h:outputText value="#{messages['Measure.Home']}" />
> > >
> > > <f:verbatim></h2></f:verbatim>
> > >
> > >
> > >
> > > Thanks.
> > >
> > > Naresh
> > >
> > >
> > >
> >
>
RE: How to add HTML markup to a page?
Posted by Naresh Bhatia <NB...@sapient.com>.
Just to be clear, what would be legal syntax in facelets? Something like
this?
<h2>
<h:outputText value="#{messages['Measure.Home']}" />
</h2>
I see that I am running into this problem only if this code is inside
the <tr:document> tag. If so, why is this tag so restrictive? It is
making the page very unreadable. Would be nice to have some context
behind this design.
Thanks.
Naresh
-----Original Message-----
From: Adam Winer [mailto:awiner@gmail.com]
Sent: Saturday, October 07, 2006 4:01 PM
To: adffaces-user@incubator.apache.org
Subject: Re: How to add HTML markup to a page?
Facelets is well worth the effort!
-- Adam
On 10/7/06, Naresh Bhatia <NB...@sapient.com> wrote:
>
> Hmmm... I was avoiding facelets just because it would be one more
thing
> to learn to get everything going :-). Anyway, if facelets can clean up
> the markup, it may be worth the effort!
>
> Thanks.
> Naresh
>
> -----Original Message-----
> From: Andrew Robinson [mailto:andrew.rw.robinson@gmail.com]
> Sent: Saturday, October 07, 2006 1:13 PM
> To: adffaces-user@incubator.apache.org
> Subject: Re: How to add HTML markup to a page?
>
> Use facelets. Verbatim is required if you use JSP
>
> On 10/7/06, Naresh Bhatia <NB...@sapient.com> wrote:
> > What is the preferred way of adding HTML markup to a page? So far, I
> > have found that only the following approach works (i.e. using
> > <f:verbatim>). Looks kind of verbose just to add <h2></h2>!
> >
> >
> >
> > <f:verbatim><h2></f:verbatim>
> >
> > <h:outputText value="#{messages['Measure.Home']}" />
> >
> > <f:verbatim></h2></f:verbatim>
> >
> >
> >
> > Thanks.
> >
> > Naresh
> >
> >
> >
>
Re: How to add HTML markup to a page?
Posted by Adam Winer <aw...@gmail.com>.
Facelets is well worth the effort!
-- Adam
On 10/7/06, Naresh Bhatia <NB...@sapient.com> wrote:
>
> Hmmm... I was avoiding facelets just because it would be one more thing
> to learn to get everything going :-). Anyway, if facelets can clean up
> the markup, it may be worth the effort!
>
> Thanks.
> Naresh
>
> -----Original Message-----
> From: Andrew Robinson [mailto:andrew.rw.robinson@gmail.com]
> Sent: Saturday, October 07, 2006 1:13 PM
> To: adffaces-user@incubator.apache.org
> Subject: Re: How to add HTML markup to a page?
>
> Use facelets. Verbatim is required if you use JSP
>
> On 10/7/06, Naresh Bhatia <NB...@sapient.com> wrote:
> > What is the preferred way of adding HTML markup to a page? So far, I
> > have found that only the following approach works (i.e. using
> > <f:verbatim>). Looks kind of verbose just to add <h2></h2>!
> >
> >
> >
> > <f:verbatim><h2></f:verbatim>
> >
> > <h:outputText value="#{messages['Measure.Home']}" />
> >
> > <f:verbatim></h2></f:verbatim>
> >
> >
> >
> > Thanks.
> >
> > Naresh
> >
> >
> >
>
RE: How to add HTML markup to a page?
Posted by Naresh Bhatia <NB...@sapient.com>.
Hmmm... I was avoiding facelets just because it would be one more thing
to learn to get everything going :-). Anyway, if facelets can clean up
the markup, it may be worth the effort!
Thanks.
Naresh
-----Original Message-----
From: Andrew Robinson [mailto:andrew.rw.robinson@gmail.com]
Sent: Saturday, October 07, 2006 1:13 PM
To: adffaces-user@incubator.apache.org
Subject: Re: How to add HTML markup to a page?
Use facelets. Verbatim is required if you use JSP
On 10/7/06, Naresh Bhatia <NB...@sapient.com> wrote:
> What is the preferred way of adding HTML markup to a page? So far, I
> have found that only the following approach works (i.e. using
> <f:verbatim>). Looks kind of verbose just to add <h2></h2>!
>
>
>
> <f:verbatim><h2></f:verbatim>
>
> <h:outputText value="#{messages['Measure.Home']}" />
>
> <f:verbatim></h2></f:verbatim>
>
>
>
> Thanks.
>
> Naresh
>
>
>
Re: How to add HTML markup to a page?
Posted by Andrew Robinson <an...@gmail.com>.
Use facelets. Verbatim is required if you use JSP
On 10/7/06, Naresh Bhatia <NB...@sapient.com> wrote:
> What is the preferred way of adding HTML markup to a page? So far, I
> have found that only the following approach works (i.e. using
> <f:verbatim>). Looks kind of verbose just to add <h2></h2>!
>
>
>
> <f:verbatim><h2></f:verbatim>
>
> <h:outputText value="#{messages['Measure.Home']}" />
>
> <f:verbatim></h2></f:verbatim>
>
>
>
> Thanks.
>
> Naresh
>
>
>