Beware that this syntax should work inside a simple HTML attribute
(such as DIV) only with JSP 2.0 onwards, with previous JSP standards
only JSF tags allows for "#{...}" binding on their attributes.

Have you tried to set a breakpoint in the getter method of your value?
Is it invoked the first time you access the page?


2006/5/19, Conway. Fintan (IT Solutions) <[EMAIL PROTECTED]>:
Hi Chrisi,

Not sure if this is a typo.  Try changing Nr 2 from ${mybean.value} to
#{mybean.value}

HTH,

Fintan

-----Original Message-----
From: Chrisi [mailto:[EMAIL PROTECTED]
Sent: 19 May 2006 11:18
To: [email protected]
Subject: Beginner: html-attributes and bean-values


Hello,

it's me again with a non magic beginner question;):

We've got some html templates from our web-agency.
I like to use them in my JSF pages.

In the html template I've got for example the following line:

<DIV class="navigationActive"> lorum .... </DIV>

I need to replace the class-style with a managed bean property and tried
the following:

1.)  <DIV class="<h:outputText value='#{mybean.value}'/>"> lorum ....
</DIV>

2.)  <DIV class="${mybean.value}""> lorum .... </DIV>

Nr 1) doesn't work, because the beans value is not placed between the
attributes double quotes.

Nr 2) seems not to work on the first JSF request. An empty String is
returned. On following requests this works.

What is the correct and easy way to populated JSF bean values into
already existing HTML-Code?

Thanks and Greetings
Chrisi


* ** *** ** * ** *** ** * ** *** ** *
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed.
Any views or opinions presented are solely those of the author, and do not 
necessarily  represent those of ESB.
If you have received this email in error please notify the sender.

Although ESB scans e-mail and attachments for viruses, it does not guarantee
that either are virus-free and accepts no liability for any damage sustained
as a result of viruses.

* ** *** ** * ** *** ** * ** *** ** *


Reply via email to