You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Troy Bull <tr...@gmail.com> on 2006/06/21 21:06:30 UTC

Something Simple

Greetings:

I have an attribute in a backing bean and I want to display it in a jsp 
"inline".  I tried to use OutputText and it doesn't seem to work 
correctly.

Here is what I want to do:

<f:verbatim>
<h2>Welcome #{authedUser.firstName}</h2>
</f:verbatim>

This doesn't work.  So I tried

<f:verbatim>
<h2>Welcome             <af:outputText value="#{authedUser.firstName}"
                            binding="#{backing_mainMenu.outputText1}"
                            id="outputText1"/></h2>
</f:verbatim>

This doesnt work either.  The first one prints out the #{authedUs..., 
the second one prints out the firstName but "outside" the h2 tag.

Thanks
troy

Re: Something Simple

Posted by Matthias Wessendorf <ma...@apache.org>.
Troy,

this article [1] has a lot's a information about your "problem" ;)

-Matthias

[1] http://www.onjava.com/pub/a/onjava/2004/06/09/jsf.html

On 6/21/06, Troy Bull <tr...@gmail.com> wrote:
> Thanks for the quick and correct answers!
> troy
>
> CD said the following on 6/21/2006 2:10 PM:
> > <f:verbatim>
> >   <h2>
> > </f:verbatim>
> > <af:outputText value="Welcome #{authedUser.firstName}"/>
> > <f:verbatim>
> >   </h2>
> > </f:verbatim>
> >
> >
> > On 6/21/06, *Troy Bull* <troybull.lists@gmail.com
> > <ma...@gmail.com>> wrote:
> >
> >     Greetings:
> >
> >     I have an attribute in a backing bean and I want to display it in a jsp
> >     "inline".  I tried to use OutputText and it doesn't seem to work
> >     correctly.
> >
> >     Here is what I want to do:
> >
> >     <f:verbatim>
> >     <h2>Welcome #{authedUser.firstName}</h2>
> >     </f:verbatim>
> >
> >     This doesn't work.  So I tried
> >
> >     <f:verbatim>
> >     <h2>Welcome             <af:outputText value="#{authedUser.firstName}"
> >                                binding="#{backing_mainMenu.outputText1}"
> >                                id="outputText1"/></h2>
> >     </f:verbatim>
> >
> >     This doesnt work either.  The first one prints out the #{authedUs...,
> >     the second one prints out the firstName but "outside" the h2 tag.
> >
> >     Thanks
> >     troy
> >
> >
>
>


-- 
Matthias Wessendorf
Aechterhoek 18
48282 Emsdetten
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Re: Something Simple

Posted by Troy Bull <tr...@gmail.com>.
Thanks for the quick and correct answers!
troy

CD said the following on 6/21/2006 2:10 PM:
> <f:verbatim>
>   <h2>
> </f:verbatim>
> <af:outputText value="Welcome #{authedUser.firstName}"/>
> <f:verbatim>
>   </h2>
> </f:verbatim>
> 
>  
> On 6/21/06, *Troy Bull* <troybull.lists@gmail.com 
> <ma...@gmail.com>> wrote:
> 
>     Greetings:
> 
>     I have an attribute in a backing bean and I want to display it in a jsp
>     "inline".  I tried to use OutputText and it doesn't seem to work
>     correctly.
> 
>     Here is what I want to do:
> 
>     <f:verbatim>
>     <h2>Welcome #{authedUser.firstName}</h2>
>     </f:verbatim>
> 
>     This doesn't work.  So I tried
> 
>     <f:verbatim>
>     <h2>Welcome             <af:outputText value="#{authedUser.firstName}"
>                                binding="#{backing_mainMenu.outputText1}"
>                                id="outputText1"/></h2>
>     </f:verbatim>
> 
>     This doesnt work either.  The first one prints out the #{authedUs...,
>     the second one prints out the firstName but "outside" the h2 tag.
> 
>     Thanks
>     troy
> 
> 


Re: Something Simple

Posted by Mert Çalışkan <mc...@gmail.com>.
To blend html and jsf tags without any rendering problems,

http://sourceforge.net/project/showfiles.php?group_id=137466&package_id=192768

Regards,

Mert

On 6/22/06, L Frohman <lf...@gmail.com> wrote:
>
>  Take a look at
>
> http://jsftutorials.net/htmLib/
>
> for a simple method of creating various html tags using jsf.
>
> Lance
>
>
>  ------------------------------
> *De :* CD [mailto:dcypher67@gmail.com]
> *Envoyé :* mercredi 21 juin 2006 22:41
> *À :* MyFaces Discussion
> *Objet :* Re: Something Simple
>
>
>  Troy,
>
> Another thought is to use components like panelGrids and whatnot that give
> you such an ability by virtue of what they do and how they do it.  Keep in
> mind that I'm not claiming a silver bullet to all scenarios.  I will say
> that I've seen/read/been told that avoiding html tags is generally a best
> practice approach.  I do like the discussion though.  Anyone else want to
> chime in and discuss this matter further?
>
> Regards,
> C. Dillon
>
>
> On 6/21/06, Julian Ray <ju...@yahoo.com> wrote:
> >
> > If you are using tomahawx then <t:htmlTag value="br" /> will work.
> > Otherwise
> > use <f:verbatim><br/></f:verbatim>
> >
> > -----Original Message-----
> > From: Troy Bull [mailto:troybull.lists@gmail.com]
> > Sent: Wednesday, June 21, 2006 4:33 PM
> > To: MyFaces Discussion
> > Subject: Re: Something Simple
> >
> > Ok, in the vein of avoiding HTML all together how do i do a </BR>
> > without
> > html?
> >
> > Thanks
> > troy
> >
> > CD said the following on 6/21/2006 2:17 PM:
> > > I also would recommend the stylesheet approach rather than the h2.  In
> >
> > > fact, avoiding HTML tags altogether would be in your best interest.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > On 6/21/06, *Clement, James* <jim.clement@hp.com
> > > <ma...@hp.com>> wrote:
> > >
> > >     <af:outputText styleClass="my-own-h2-from-my-css"
> > >     value="Welcome #{authedUser.firstName }"/>
> > >
> > >
> > >
> > ------------------------------------------------------------------------
> > >     *From:* CD [mailto:dcypher67@gmail.com <mailto:dcypher67@gmail.com
> > >]
> > >     *Sent:* Wednesday, June 21, 2006 3:10 PM
> > >     *To:* MyFaces Discussion
> > >     *Subject:* Re: Something Simple
> > >
> > >     <f:verbatim>
> > >       <h2>
> > >     </f:verbatim>
> > >     <af:outputText value="Welcome #{authedUser.firstName}"/>
> > >     <f:verbatim>
> > >       </h2>
> > >     </f:verbatim>
> > >
> > >
> > >     On 6/21/06, *Troy Bull* <troybull.lists@gmail.com
> > >     <ma...@gmail.com>> wrote:
> > >
> > >         Greetings:
> > >
> > >         I have an attribute in a backing bean and I want to display it
> > >         in a jsp
> > >         "inline".  I tried to use OutputText and it doesn't seem to
> > work
> > >         correctly.
> > >
> > >         Here is what I want to do:
> > >
> > >         <f:verbatim>
> > >         <h2>Welcome #{authedUser.firstName}</h2>
> > >         </f:verbatim>
> > >
> > >         This doesn't work.  So I tried
> > >
> > >         <f:verbatim>
> > >         <h2>Welcome             <af:outputText
> > >         value="#{authedUser.firstName}"
> > >
> > binding="#{backing_mainMenu.outputText1}"
> > >                                    id="outputText1"/></h2>
> > >         </f:verbatim>
> > >
> > >         This doesnt work either.  The first one prints out the
> > >         #{authedUs...,
> > >         the second one prints out the firstName but "outside" the h2
> > tag.
> > >
> > >         Thanks
> > >         troy
> > >
> > >
> > >
> >
> >
>
>

Re: Something Simple

Posted by Sean Schofield <se...@gmail.com>.
I agree with the user who suggested facelets.  Its working well for me so far.

Sean

On 6/21/06, CD <dc...@gmail.com> wrote:
>
> Troy,
>
> Another thought is to use components like panelGrids and whatnot that give
> you such an ability by virtue of what they do and how they do it.  Keep in
> mind that I'm not claiming a silver bullet to all scenarios.  I will say
> that I've seen/read/been told that avoiding html tags is generally a best
> practice approach.  I do like the discussion though.  Anyone else want to
> chime in and discuss this matter further?
>
> Regards,
> C. Dillon
>
>
>
> On 6/21/06, Julian Ray <ju...@yahoo.com> wrote:
> > If you are using tomahawx then <t:htmlTag value="br" /> will work.
> Otherwise
> > use <f:verbatim><br/></f:verbatim>
> >
> > -----Original Message-----
> > From: Troy Bull [mailto:troybull.lists@gmail.com]
> > Sent: Wednesday, June 21, 2006 4:33 PM
> > To: MyFaces Discussion
> > Subject: Re: Something Simple
> >
> > Ok, in the vein of avoiding HTML all together how do i do a </BR> without
> > html?
> >
> > Thanks
> > troy
> >
> > CD said the following on 6/21/2006 2:17 PM:
> > > I also would recommend the stylesheet approach rather than the h2.  In
> > > fact, avoiding HTML tags altogether would be in your best interest.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > On 6/21/06, *Clement, James* <jim.clement@hp.com
> > > <ma...@hp.com>> wrote:
> > >
> > >     <af:outputText styleClass="my-own-h2-from-my-css"
> > >     value="Welcome #{authedUser.firstName }"/>
> > >
> > >
> > >
> >
> ------------------------------------------------------------------------
> > >     *From:* CD [mailto:dcypher67@gmail.com <mailto:
> dcypher67@gmail.com>]
> > >     *Sent:* Wednesday, June 21, 2006 3:10 PM
> > >     *To:* MyFaces Discussion
> > >     *Subject:* Re: Something Simple
> > >
> > >     <f:verbatim>
> > >       <h2>
> > >     </f:verbatim>
> > >     <af:outputText value="Welcome #{authedUser.firstName}"/>
> > >     <f:verbatim>
> > >       </h2>
> > >     </f:verbatim>
> > >
> > >
> > >     On 6/21/06, *Troy Bull* <troybull.lists@gmail.com
> > >     <ma...@gmail.com>> wrote:
> > >
> > >         Greetings:
> > >
> > >         I have an attribute in a backing bean and I want to display it
> > >         in a jsp
> > >         "inline".  I tried to use OutputText and it doesn't seem to work
> > >         correctly.
> > >
> > >         Here is what I want to do:
> > >
> > >         <f:verbatim>
> > >         <h2>Welcome #{authedUser.firstName}</h2>
> > >         </f:verbatim>
> > >
> > >         This doesn't work.  So I tried
> > >
> > >         <f:verbatim>
> > >         <h2>Welcome             <af:outputText
> > >         value="#{authedUser.firstName}"
> > >
> > binding="#{backing_mainMenu.outputText1}"
> > >
> id="outputText1"/></h2>
> > >         </f:verbatim>
> > >
> > >         This doesnt work either.  The first one prints out the
> > >         #{authedUs...,
> > >         the second one prints out the firstName but "outside" the h2
> tag.
> > >
> > >         Thanks
> > >         troy
> > >
> > >
> > >
> >
> >
>
>

RE: Something Simple

Posted by L Frohman <lf...@gmail.com>.
Take a look at
 
http://jsftutorials.net/htmLib/
 
for a simple method of creating various html tags using jsf.
 
Lance

  _____  

De : CD [mailto:dcypher67@gmail.com] 
Envoyé : mercredi 21 juin 2006 22:41
À : MyFaces Discussion
Objet : Re: Something Simple


Troy,
 
Another thought is to use components like panelGrids and whatnot that give
you such an ability by virtue of what they do and how they do it.  Keep in
mind that I'm not claiming a silver bullet to all scenarios.  I will say
that I've seen/read/been told that avoiding html tags is generally a best
practice approach.  I do like the discussion though.  Anyone else want to
chime in and discuss this matter further? 
 
Regards,
C. Dillon

 
On 6/21/06, Julian Ray <ju...@yahoo.com> wrote: 

If you are using tomahawx then <t:htmlTag value="br" /> will work. Otherwise
use <f:verbatim><br/></f:verbatim> 

-----Original Message-----
From: Troy Bull [mailto:troybull.lists@gmail.com]
Sent: Wednesday, June 21, 2006 4:33 PM
To: MyFaces Discussion
Subject: Re: Something Simple 

Ok, in the vein of avoiding HTML all together how do i do a </BR> without
html?

Thanks
troy

CD said the following on 6/21/2006 2:17 PM:
> I also would recommend the stylesheet approach rather than the h2.  In 
> fact, avoiding HTML tags altogether would be in your best interest.
>
>
>
>
>
>
>
> On 6/21/06, *Clement, James* <jim.clement@hp.com
<ma...@hp.com> 
> <ma...@hp.com>> wrote:
>
>     <af:outputText styleClass="my-own-h2-from-my-css"
>     value="Welcome #{authedUser.firstName }"/>
>
>
>
------------------------------------------------------------------------
>     *From:* CD [mailto:dcypher67@gmail.com <mailto:
<ma...@gmail.com> dcypher67@gmail.com>]
>     *Sent:* Wednesday, June 21, 2006 3:10 PM
>     *To:* MyFaces Discussion
>     *Subject:* Re: Something Simple
>
>     <f:verbatim>
>       <h2> 
>     </f:verbatim>
>     <af:outputText value="Welcome #{authedUser.firstName}"/>
>     <f:verbatim>
>       </h2>
>     </f:verbatim>
>
> 
>     On 6/21/06, *Troy Bull* <troybull.lists@gmail.com
>     <ma...@gmail.com>> wrote:
>
>         Greetings:
>
>         I have an attribute in a backing bean and I want to display it
>         in a jsp
>         "inline".  I tried to use OutputText and it doesn't seem to work 
>         correctly.
>
>         Here is what I want to do:
>
>         <f:verbatim>
>         <h2>Welcome #{authedUser.firstName}</h2>
>         </f:verbatim> 
>
>         This doesn't work.  So I tried
>
>         <f:verbatim>
>         <h2>Welcome             <af:outputText
>         value="#{authedUser.firstName}"
>
binding="#{backing_mainMenu.outputText1}"
>                                    id="outputText1"/></h2>
>         </f:verbatim>
>
>         This doesnt work either.  The first one prints out the 
>         #{authedUs...,
>         the second one prints out the firstName but "outside" the h2 tag.
>
>         Thanks
>         troy
>
>
>





Re: Something Simple

Posted by CD <dc...@gmail.com>.
Troy,

Another thought is to use components like panelGrids and whatnot that give
you such an ability by virtue of what they do and how they do it.  Keep in
mind that I'm not claiming a silver bullet to all scenarios.  I will say
that I've seen/read/been told that avoiding html tags is generally a best
practice approach.  I do like the discussion though.  Anyone else want to
chime in and discuss this matter further?

Regards,
C. Dillon


On 6/21/06, Julian Ray <ju...@yahoo.com> wrote:
>
> If you are using tomahawx then <t:htmlTag value="br" /> will work.
> Otherwise
> use <f:verbatim><br/></f:verbatim>
>
> -----Original Message-----
> From: Troy Bull [mailto:troybull.lists@gmail.com]
> Sent: Wednesday, June 21, 2006 4:33 PM
> To: MyFaces Discussion
> Subject: Re: Something Simple
>
> Ok, in the vein of avoiding HTML all together how do i do a </BR> without
> html?
>
> Thanks
> troy
>
> CD said the following on 6/21/2006 2:17 PM:
> > I also would recommend the stylesheet approach rather than the h2.  In
> > fact, avoiding HTML tags altogether would be in your best interest.
> >
> >
> >
> >
> >
> >
> >
> > On 6/21/06, *Clement, James* <jim.clement@hp.com
> > <ma...@hp.com>> wrote:
> >
> >     <af:outputText styleClass="my-own-h2-from-my-css"
> >     value="Welcome #{authedUser.firstName}"/>
> >
> >
> >
> ------------------------------------------------------------------------
> >     *From:* CD [mailto:dcypher67@gmail.com <ma...@gmail.com>]
> >     *Sent:* Wednesday, June 21, 2006 3:10 PM
> >     *To:* MyFaces Discussion
> >     *Subject:* Re: Something Simple
> >
> >     <f:verbatim>
> >       <h2>
> >     </f:verbatim>
> >     <af:outputText value="Welcome #{authedUser.firstName}"/>
> >     <f:verbatim>
> >       </h2>
> >     </f:verbatim>
> >
> >
> >     On 6/21/06, *Troy Bull* <troybull.lists@gmail.com
> >     <ma...@gmail.com>> wrote:
> >
> >         Greetings:
> >
> >         I have an attribute in a backing bean and I want to display it
> >         in a jsp
> >         "inline".  I tried to use OutputText and it doesn't seem to work
> >         correctly.
> >
> >         Here is what I want to do:
> >
> >         <f:verbatim>
> >         <h2>Welcome #{authedUser.firstName}</h2>
> >         </f:verbatim>
> >
> >         This doesn't work.  So I tried
> >
> >         <f:verbatim>
> >         <h2>Welcome             <af:outputText
> >         value="#{authedUser.firstName}"
> >
> binding="#{backing_mainMenu.outputText1}"
> >                                    id="outputText1"/></h2>
> >         </f:verbatim>
> >
> >         This doesnt work either.  The first one prints out the
> >         #{authedUs...,
> >         the second one prints out the firstName but "outside" the h2
> tag.
> >
> >         Thanks
> >         troy
> >
> >
> >
>
>

Re: Something Simple

Posted by CD <dc...@gmail.com>.
Good point Troy  ;)

Maybe someone would like to amend my statement to be more correct?


Regards,
C. Dillon


On 6/21/06, Troy Bull <tr...@gmail.com> wrote:
>
> Ok, in the vein of avoiding HTML all together how do i do a </BR>
> without html?
>
> Thanks
> troy
>
> CD said the following on 6/21/2006 2:17 PM:
> > I also would recommend the stylesheet approach rather than the h2.  In
> > fact, avoiding HTML tags altogether would be in your best interest.
> >
> >
> >
> >
> >
> >
> >
> > On 6/21/06, *Clement, James* <jim.clement@hp.com
> > <ma...@hp.com>> wrote:
> >
> >     <af:outputText styleClass="my-own-h2-from-my-css"
> >     value="Welcome #{authedUser.firstName}"/>
> >
> >
> >
> ------------------------------------------------------------------------
> >     *From:* CD [mailto:dcypher67@gmail.com <ma...@gmail.com>]
> >     *Sent:* Wednesday, June 21, 2006 3:10 PM
> >     *To:* MyFaces Discussion
> >     *Subject:* Re: Something Simple
> >
> >     <f:verbatim>
> >       <h2>
> >     </f:verbatim>
> >     <af:outputText value="Welcome #{authedUser.firstName}"/>
> >     <f:verbatim>
> >       </h2>
> >     </f:verbatim>
> >
> >
> >     On 6/21/06, *Troy Bull* <troybull.lists@gmail.com
> >     <ma...@gmail.com>> wrote:
> >
> >         Greetings:
> >
> >         I have an attribute in a backing bean and I want to display it
> >         in a jsp
> >         "inline".  I tried to use OutputText and it doesn't seem to work
> >         correctly.
> >
> >         Here is what I want to do:
> >
> >         <f:verbatim>
> >         <h2>Welcome #{authedUser.firstName}</h2>
> >         </f:verbatim>
> >
> >         This doesn't work.  So I tried
> >
> >         <f:verbatim>
> >         <h2>Welcome             <af:outputText
> >         value="#{authedUser.firstName}"
>
> >                                    binding="#{backing_mainMenu.outputText1}"
> >                                    id="outputText1"/></h2>
> >         </f:verbatim>
> >
> >         This doesnt work either.  The first one prints out the
> >         #{authedUs...,
> >         the second one prints out the firstName but "outside" the h2
> tag.
> >
> >         Thanks
> >         troy
> >
> >
> >
>
>

RE: Something Simple

Posted by Julian Ray <ju...@yahoo.com>.
If you are using tomahawx then <t:htmlTag value="br" /> will work. Otherwise
use <f:verbatim><br/></f:verbatim> 

-----Original Message-----
From: Troy Bull [mailto:troybull.lists@gmail.com] 
Sent: Wednesday, June 21, 2006 4:33 PM
To: MyFaces Discussion
Subject: Re: Something Simple

Ok, in the vein of avoiding HTML all together how do i do a </BR> without
html?

Thanks
troy

CD said the following on 6/21/2006 2:17 PM:
> I also would recommend the stylesheet approach rather than the h2.  In 
> fact, avoiding HTML tags altogether would be in your best interest.
> 
>  
> 
> 
> 
>  
> 
> On 6/21/06, *Clement, James* <jim.clement@hp.com 
> <ma...@hp.com>> wrote:
> 
>     <af:outputText styleClass="my-own-h2-from-my-css"
>     value="Welcome #{authedUser.firstName}"/>
> 
>      
>
------------------------------------------------------------------------
>     *From:* CD [mailto:dcypher67@gmail.com <ma...@gmail.com>]
>     *Sent:* Wednesday, June 21, 2006 3:10 PM
>     *To:* MyFaces Discussion
>     *Subject:* Re: Something Simple
> 
>     <f:verbatim>
>       <h2>
>     </f:verbatim>
>     <af:outputText value="Welcome #{authedUser.firstName}"/>
>     <f:verbatim>
>       </h2>
>     </f:verbatim>
> 
>      
>     On 6/21/06, *Troy Bull* <troybull.lists@gmail.com
>     <ma...@gmail.com>> wrote:
> 
>         Greetings:
> 
>         I have an attribute in a backing bean and I want to display it
>         in a jsp
>         "inline".  I tried to use OutputText and it doesn't seem to work
>         correctly.
> 
>         Here is what I want to do:
> 
>         <f:verbatim>
>         <h2>Welcome #{authedUser.firstName}</h2>
>         </f:verbatim>
> 
>         This doesn't work.  So I tried
> 
>         <f:verbatim>
>         <h2>Welcome             <af:outputText
>         value="#{authedUser.firstName}"
>
binding="#{backing_mainMenu.outputText1}"
>                                    id="outputText1"/></h2>
>         </f:verbatim>
> 
>         This doesnt work either.  The first one prints out the
>         #{authedUs...,
>         the second one prints out the firstName but "outside" the h2 tag.
> 
>         Thanks
>         troy
> 
> 
> 


Re: Something Simple

Posted by Troy Bull <tr...@gmail.com>.
Ok, in the vein of avoiding HTML all together how do i do a </BR> 
without html?

Thanks
troy

CD said the following on 6/21/2006 2:17 PM:
> I also would recommend the stylesheet approach rather than the h2.  In 
> fact, avoiding HTML tags altogether would be in your best interest.
> 
>  
> 
> 
> 
>  
> 
> On 6/21/06, *Clement, James* <jim.clement@hp.com 
> <ma...@hp.com>> wrote:
> 
>     <af:outputText styleClass="my-own-h2-from-my-css"
>     value="Welcome #{authedUser.firstName}"/>
> 
>      
>     ------------------------------------------------------------------------
>     *From:* CD [mailto:dcypher67@gmail.com <ma...@gmail.com>]
>     *Sent:* Wednesday, June 21, 2006 3:10 PM
>     *To:* MyFaces Discussion
>     *Subject:* Re: Something Simple
> 
>     <f:verbatim>
>       <h2>
>     </f:verbatim>
>     <af:outputText value="Welcome #{authedUser.firstName}"/>
>     <f:verbatim>
>       </h2>
>     </f:verbatim>
> 
>      
>     On 6/21/06, *Troy Bull* <troybull.lists@gmail.com
>     <ma...@gmail.com>> wrote:
> 
>         Greetings:
> 
>         I have an attribute in a backing bean and I want to display it
>         in a jsp
>         "inline".  I tried to use OutputText and it doesn't seem to work
>         correctly.
> 
>         Here is what I want to do:
> 
>         <f:verbatim>
>         <h2>Welcome #{authedUser.firstName}</h2>
>         </f:verbatim>
> 
>         This doesn't work.  So I tried
> 
>         <f:verbatim>
>         <h2>Welcome             <af:outputText
>         value="#{authedUser.firstName}"
>                                    binding="#{backing_mainMenu.outputText1}"
>                                    id="outputText1"/></h2>
>         </f:verbatim>
> 
>         This doesnt work either.  The first one prints out the
>         #{authedUs...,
>         the second one prints out the firstName but "outside" the h2 tag.
> 
>         Thanks
>         troy
> 
> 
> 


Re: Something Simple

Posted by CD <dc...@gmail.com>.
I also would recommend the stylesheet approach rather than the h2.  In fact,
avoiding HTML tags altogether would be in your best interest.






On 6/21/06, Clement, James <ji...@hp.com> wrote:
>
>   <af:outputText styleClass="my-own-h2-from-my-css" value="Welcome #{
> authedUser.firstName}"/>
>
>
> ------------------------------
> *From:* CD [mailto:dcypher67@gmail.com]
> *Sent:* Wednesday, June 21, 2006 3:10 PM
> *To:* MyFaces Discussion
> *Subject:* Re: Something Simple
>
>   <f:verbatim>
>   <h2>
> </f:verbatim>
> <af:outputText value="Welcome #{authedUser.firstName}"/>
> <f:verbatim>
>   </h2>
> </f:verbatim>
>
>
> On 6/21/06, Troy Bull <troybull.lists@gmail.com > wrote:
> >
> > Greetings:
> >
> > I have an attribute in a backing bean and I want to display it in a jsp
> > "inline".  I tried to use OutputText and it doesn't seem to work
> > correctly.
> >
> > Here is what I want to do:
> >
> > <f:verbatim>
> > <h2>Welcome #{authedUser.firstName}</h2>
> > </f:verbatim>
> >
> > This doesn't work.  So I tried
> >
> > <f:verbatim>
> > <h2>Welcome             <af:outputText value="#{authedUser.firstName}"
> >                            binding="#{backing_mainMenu.outputText1}"
> >                            id="outputText1"/></h2>
> > </f:verbatim>
> >
> > This doesnt work either.  The first one prints out the #{authedUs...,
> > the second one prints out the firstName but "outside" the h2 tag.
> >
> > Thanks
> > troy
> >
>
>

RE: Something Simple

Posted by Julian Ray <ju...@yahoo.com>.
Of course its always best to use CSS  so
 
 
<h:outputText styleClass="myHeaderClass" value="Welcome
#{authedUser.firstName}"/>
 

 
  _____  

From: CD [mailto:dcypher67@gmail.com] 
Sent: Wednesday, June 21, 2006 3:10 PM
To: MyFaces Discussion
Subject: Re: Something Simple


<f:verbatim>
  <h2>
</f:verbatim>
<af:outputText value="Welcome #{authedUser.firstName}"/>
<f:verbatim>
  </h2>
</f:verbatim>

 
On 6/21/06, Troy Bull <troybull.lists@gmail.com
<ma...@gmail.com> > wrote: 

Greetings:

I have an attribute in a backing bean and I want to display it in a jsp
"inline".  I tried to use OutputText and it doesn't seem to work 
correctly.

Here is what I want to do:

<f:verbatim>
<h2>Welcome #{authedUser.firstName}</h2>
</f:verbatim>

This doesn't work.  So I tried

<f:verbatim>
<h2>Welcome             <af:outputText value="#{authedUser.firstName}"
                           binding="#{backing_mainMenu.outputText1}"
                           id="outputText1"/></h2> 
</f:verbatim>

This doesnt work either.  The first one prints out the #{authedUs...,
the second one prints out the firstName but "outside" the h2 tag.

Thanks
troy




RE: Something Simple

Posted by "Clement, James" <ji...@hp.com>.
<af:outputText styleClass="my-own-h2-from-my-css" value="Welcome
#{authedUser.firstName}"/>

  
________________________________

From: CD [mailto:dcypher67@gmail.com] 
Sent: Wednesday, June 21, 2006 3:10 PM
To: MyFaces Discussion
Subject: Re: Something Simple



	<f:verbatim>
	  <h2>
	</f:verbatim>
	<af:outputText value="Welcome #{authedUser.firstName}"/>
	<f:verbatim>
	  </h2>
	</f:verbatim>
	
	 
	On 6/21/06, Troy Bull <troybull.lists@gmail.com > wrote: 

		Greetings:
		
		I have an attribute in a backing bean and I want to
display it in a jsp
		"inline".  I tried to use OutputText and it doesn't seem
to work 
		correctly.
		
		Here is what I want to do:
		
		<f:verbatim>
		<h2>Welcome #{authedUser.firstName}</h2>
		</f:verbatim>
		
		This doesn't work.  So I tried
		
		<f:verbatim>
		<h2>Welcome             <af:outputText
value="#{authedUser.firstName}"
	
binding="#{backing_mainMenu.outputText1}"
		                           id="outputText1"/></h2> 
		</f:verbatim>
		
		This doesnt work either.  The first one prints out the
#{authedUs...,
		the second one prints out the firstName but "outside"
the h2 tag.
		
		Thanks
		troy
		



Re: Something Simple

Posted by CD <dc...@gmail.com>.
<f:verbatim>
  <h2>
</f:verbatim>
<af:outputText value="Welcome #{authedUser.firstName}"/>
<f:verbatim>
  </h2>
</f:verbatim>


On 6/21/06, Troy Bull <tr...@gmail.com> wrote:
>
> Greetings:
>
> I have an attribute in a backing bean and I want to display it in a jsp
> "inline".  I tried to use OutputText and it doesn't seem to work
> correctly.
>
> Here is what I want to do:
>
> <f:verbatim>
> <h2>Welcome #{authedUser.firstName}</h2>
> </f:verbatim>
>
> This doesn't work.  So I tried
>
> <f:verbatim>
> <h2>Welcome             <af:outputText value="#{authedUser.firstName}"
>                            binding="#{backing_mainMenu.outputText1}"
>                            id="outputText1"/></h2>
> </f:verbatim>
>
> This doesnt work either.  The first one prints out the #{authedUs...,
> the second one prints out the firstName but "outside" the h2 tag.
>
> Thanks
> troy
>

Re: Something Simple

Posted by Ondrej Svetlik <on...@svetlik.info>.
> Hello,
> 
> I use
> 
> <h:outputText value="Welcome #{authedUser.firstName}" />
> 
> and it works fine.
> 
> Best regards
> 
> Ondrej Svetlik

And for the <h2> tag, I have the best experience with

<t:htmlTag value="h2" />

(t: for tomahawk)

So your example would be:

<t:htmlTag value="h2">
	<h:outputText value="Welcome #{authedUser.firstName}" />
</t:htmlTag>

Best regards

Ondrej Svetlik

Re: Something Simple

Posted by Ondrej Svetlik <on...@svetlik.info>.
Julian Ray wrote:
> Try
> 
> <h:outputText value="#{Welcome authedUser.firstName}"/>
> 
>  
> 
> -----Original Message-----
> From: Troy Bull [mailto:troybull.lists@gmail.com] 
> Sent: Wednesday, June 21, 2006 3:07 PM
> To: users@myfaces.apache.org
> Subject: Something Simple
> 
> Greetings:
> 
> I have an attribute in a backing bean and I want to display it in a jsp
> "inline".  I tried to use OutputText and it doesn't seem to work correctly.
> 
> Here is what I want to do:
> 
> <f:verbatim>
> <h2>Welcome #{authedUser.firstName}</h2> </f:verbatim>
> 
> This doesn't work.  So I tried
> 
> <f:verbatim>
> <h2>Welcome             <af:outputText value="#{authedUser.firstName}"
>                             binding="#{backing_mainMenu.outputText1}"
>                             id="outputText1"/></h2> </f:verbatim>
> 
> This doesnt work either.  The first one prints out the #{authedUs..., the
> second one prints out the firstName but "outside" the h2 tag.
> 
> Thanks
> troy

Hello,

I use

<h:outputText value="Welcome #{authedUser.firstName}" />

and it works fine.

Best regards

Ondrej Svetlik

RE: Something Simple

Posted by Julian Ray <ju...@yahoo.com>.
Try

<h:outputText value="#{Welcome authedUser.firstName}"/>

 

-----Original Message-----
From: Troy Bull [mailto:troybull.lists@gmail.com] 
Sent: Wednesday, June 21, 2006 3:07 PM
To: users@myfaces.apache.org
Subject: Something Simple

Greetings:

I have an attribute in a backing bean and I want to display it in a jsp
"inline".  I tried to use OutputText and it doesn't seem to work correctly.

Here is what I want to do:

<f:verbatim>
<h2>Welcome #{authedUser.firstName}</h2> </f:verbatim>

This doesn't work.  So I tried

<f:verbatim>
<h2>Welcome             <af:outputText value="#{authedUser.firstName}"
                            binding="#{backing_mainMenu.outputText1}"
                            id="outputText1"/></h2> </f:verbatim>

This doesnt work either.  The first one prints out the #{authedUs..., the
second one prints out the firstName but "outside" the h2 tag.

Thanks
troy