incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Lessard" <simon.lessar...@gmail.com>
Subject Re: Emphasize important fields with skin
Date Tue, 19 Sep 2006 15:25:36 GMT
Hello Martin,

I don't think it is the problem. I believe the problem is actually located
in the interaction between panelFormLayout and inputComponents. Output
"otherStyleClass styleImportant x1a" is correct, it mean that the element
has three classes: "otherStyleClass", "styleImportant" and "x1a". In HTML
the semantic is a bit different from what it's in a CSS file.

CSS
.class1 .class2 {...}

is matching
HTML
<element class="class1">
  <element class="class2"/>
</element>.

On the other hand,
<element class="class1 class2">

would match the following CSS selectors:
CSS
.class1{...}
.class2{...}
.class1.class2{...} // Notice there's no space between the classes, this is
a CSS 2 (not valid in CSS 1) composite selector and it won't work in IE
because IE is stupid.

The possible issue I see however is on which DOM element it gets placed and
I'm working on this issue currently as it's blocking on of my patches.


Regards,

~ Simon


On 9/19/06, Martin Koci <Martin.Koci@aura.cz> wrote:
>
> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message