webtier@glassfish.java.net

Re: Question on Core JSF 3rd edition book code - facelets

From: John Yeary <johnyeary_at_gmail.com>
Date: Tue, 16 Aug 2011 17:43:38 -0400

The colon (:) between the images and Mercurity.gif is used to denote which
resource from which resource directory to use.

For example, #{resource['css:example.css']} implies that there is a
directory structure like below.

/
+resources/
                  +css/
                   | |
                   | +example.css
                   |
                   +images/

The same would apply to images.

On Tue, Aug 16, 2011 at 12:47 PM, <forums_at_java.net> wrote:

> Hi,
>
> In the book Core JSF 3rd edition, page 192 has the following code for the
> image attribute I don't understand:
>
> What is the meaning of #{resource['images:Mercury.**gif']} ? Why is there
> a
> colon ":" between images and Mecury.gif?
>
> <body>
> <ui:composition>
> <h:form>
> <corejsf:planet name="mercury" image="#{resource['images:**
> Mercury.gif']}"/>
> <corejsf:planet name="venus" image="#{resource['images:**Venus.gif']}"/>
> <corejsf:planet name="earth" image="#{resource['images:**Earth.gif']}"/>
> <corejsf:planet name="mars" image="#{resource['images:**Mars.gif']}"/>
> <corejsf:planet name="jupiter" image="#{resource['images:**
> Jupiter.gif']}"/>
> <corejsf:planet name="saturn" image="#{resource['images:**
> Saturn.gif']}"/>
> <corejsf:planet name="uranus" image="#{resource['images:**
> Uranus.gif']}"/>
> <corejsf:planet name="neptune" image="#{resource['images:**
> Neptune.gif']}"/>
> </h:form>
> </ui:composition>
> </body>
>
>
>
> Thanks!
>
> lchong2
>
>
> --
>
> [Message sent by forum member 'lchong2']
>
> View Post: http://forums.java.net/node/**834144<http://forums.java.net/node/834144>
>
>
>


-- 
John Yeary
--
http://javaevangelist.blogspot.com
http://www.johnyeary.com
*_at_jyeary*
"Far better it is to dare mighty things, to win glorious triumphs, even
though checkered by failure, than to take rank with those poor spirits who
neither enjoy much nor suffer much, because they live in the gray twilight
that knows not victory nor defeat."
-- Theodore Roosevelt