myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Robinson" <andrew.rw.robin...@gmail.com>
Subject Re: s:roundedDiv/Facelets
Date Mon, 18 Feb 2008 04:32:37 GMT
There is no tag handler yet for the roundedDiv component. The color value
has to be a java.awt.Color object, strings will not work. The JSP tag
converts the string to a Color object. So unless you create a facelets
function to create the Color, then a TagHandler will need to be created.

This function will work:

  public static Color stringToColor(String value)
  {
    if (value == null || value.length() == 0) { return null; }
    return Color.decode(value);
  }

I never got around to the TagHandler, and frankly forgot. If you want, open
a enhancement bug to add facelets support

-Andrew

On Feb 17, 2008 7:07 PM, <myfaces@abilsoft.com> wrote:

> Hello,
>
> I'm having trouble geting the s:roundedDiv (a component I'm jus
> now beginning to work with) to work.  I've got the following in
> a facelet (by the way, this page/facelet works perfectly if I
> revert the following s:roundedDiv back to the t:div it started
> with)....
>
> <s:roundedDiv radius="8" color="#999966" style="text-align:
> center>
>
> <h:outputText value="Hello world!"/>
>
> </s:roundedDiv>
>
> It does not seem to accept the color attribute value?  I have
> tried the following without success:
>
> - leaving it off (no luck, it's  a required field
> - formatting it as #999966 as well as 999966 as well as
> 0x999966 - all not recognized
> - specifying a text color such as "red" - no luck either
> - embedding it in a CDATA sections such as color="<![CDATA
> [#999966]]> - does not work as the '<' character cannot be
> accepted.
>
> I'm completely at a loss as to what I doing wrong or waht to
> try next.  I will appreciate and and all ideas.
>
> TIA!
>

Mime
View raw message