incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Koci <Martin.K...@aura.cz>
Subject Re: Emphasize important fields with skin
Date Tue, 19 Sep 2006 14:53:10 GMT
Hello again,

I resume my requirements:

1) use trinidad skin framework as much as possible
2) all explicitly reffered CSS styles are in skins files and will switch
with skin (as 'styleImportant' here in my case)
3) allow to use more CSS style class in styleClass attribute

with  solution: 
<tr:inputText ... styleClass="styleImportant" />

it works ok, output is somethink like "x1a x1b", styleImportant is
correctly compressed to x1a.

But if coder uses e.g. 

<tr:inputText ... styleClass="otherStyleClass styleImportant" />
(requirement 3)

output is "otherStyleClass styleImportant x1a".

Problem is FormInputRenderer.renderRootDomElementStyles:

String styleClass         = getStyleClass(bean);

 returns "otherStyleClass styleImportant" which is not array but String
and this value is passed to RendereringContext.getStyleClass. But there
is no entry for this  key in _styleMap (there are only entries for
"otherStyleClass" and "styleImportant" separately).

I think value of styleClass attribute should be parsed to String array
to enable users put their CSS style classes into trinidad skins. Is that
correct?

Regards, 

Martin 




Simon Lessard píše v Čt 07. 09. 2006 v 09:13 -0400:
> Hmmm try the following then, it might work:
> 
> <tr:inputText ... styleClass="styleImportant" />
> 
> And in the skin:
> 
> .styleImportant af|inputText::content {
>   color: #325fa4;
>   font-weight: bold;
> }
> 
> On 9/7/06, Martin Koci <Martin.Koci@aura.cz> wrote:
> >
> > Hello Simon,
> >
> > unfortunately that solution will not work with IE.
> >
> > In my case I have
> > <tr:inputText ...   styleClass="styleImportant" />
> >
> > where 'styleImportant" is placed in skin file as:
> > .styleImportant {
> >         color: #325fa4;
> >         font-weight: bold;
> > }
> >
> > With Firefox it works because html input inherits (in sence of CSS) font
> > size and color. But IE doesn't support CSS inherit for this.
> >
> > Maybe I'm looking for a way how to place 'importantStyle' to html input
> > element rendered with tr:inputText renderer - now it is rendered as
> > style class on enclosing span.
> >
> >
> > Thanks
> >
> > Martin
> >
> >
> >
> >
> >
> >
> >
> >
> > Simon Lessard píše v Po 04. 09. 2006 v 13:09 -0400:
> > > Hello Martin,
> > >
> > > You can use a styleClass and place it in the skin's CSS, then it would
> > > switch with it.
> > >
> > >
> > > Regards,
> > >
> > > ~ Simon
> > >
> > >
> > > On 9/3/06, Martin Koci <Martin.Koci@aura.cz> wrote:
> > > >
> > > > Hello,
> > > >
> > > > I'm looking for solution how to emphasize some fields on form with
> > > > consistent way with skins.
> > > >
> > > > My case is simple - users want see some important fields in different
> > > > font size or with different font color. This is simply doable with
> > > > inlineStyle or style, but value remains same even user selects other
> > > > skin.
> > > >
> > > > Many thanks,
> > > >
> > > > Martin
> > > >
> > > >
> > > >
> > > >
> >
> >


Mime
View raw message