You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Simon Lessard <si...@gmail.com> on 2007/08/07 15:19:06 UTC

[Trinidad] Strange skin selector choice for inputDate

Hello,

Working currently on a skin I found a strange behavior. The selector "
af|inputDate::content" is used for both the inputDate field and the popup
calendar's body. A direct consequence of that is that you cannot assign a
border around the calendar without setting one also on the field implying
that all fields will need such border as well.

Since ::content is consistently used throughout Trinidad for the field
content I would keep it that way. Therefore, I see two solutions:

   1. Always use the "af|chooseDate" root for the calendar and ignore the
   difference between inputDate's popup and inline chooseDate's calendar;
   2. Add a new selector named "af|inputDate::calendar-body" (or
   something else if you anyone has a better idea)


Any opinion, suggestion or objection?

Regards,

~ Simon

Re: [Trinidad] Strange skin selector choice for inputDate

Posted by Simon Lessard <si...@gmail.com>.
Good to know, I'm going to use that syntax as well.

On 8/7/07, Adam Winer <aw...@gmail.com> wrote:
>
> For a similar component internally we're using:
>
> af|chooseDate::today
> af|chooseDate::today-link
> af|chooseDate::regular-day
> af|chooseDate::regular-day-link
> af|chooseDate::prev-month-day
> af|chooseDate::prev-month-day-link
>
> ... with pairs of styles for the table cell and the link itself.
>
> -- Adam
>
>
> On 8/7/07, Simon Lessard <si...@gmail.com> wrote:
> > Along the same lines I think we should assign a style class to the
> various
> > cells in the calendar (currently you have to use a selector looking like
> > "af|chooseDate::content a" to achieve this).
> >
> >
> > ~ Simon
> >
> >
> > On 8/7/07, Simon Lessard <si...@gmail.com> wrote:
> > > Hello,
> > >
> > > Working currently on a skin I found a strange behavior. The selector
> > "af|inputDate::content" is used for both the inputDate field and the
> popup
> > calendar's body. A direct consequence of that is that you cannot assign
> a
> > border around the calendar without setting one also on the field
> implying
> > that all fields will need such border as well.
> > >
> > > Since ::content is consistently used throughout Trinidad for the field
> > content I would keep it that way. Therefore, I see two solutions:
> > >
> > >
> > > Always use the " af|chooseDate" root for the calendar and ignore the
> > difference between inputDate's popup and inline chooseDate's calendar;
> > > Add a new selector named " af|inputDate::calendar-body" (or something
> else
> > if you anyone has a better idea)
> > > Any opinion, suggestion or objection?
> > >
> > > Regards,
> > >
> > > ~ Simon
> > >
> >
> >
>

Re: [Trinidad] Strange skin selector choice for inputDate

Posted by Adam Winer <aw...@gmail.com>.
For a similar component internally we're using:

af|chooseDate::today
af|chooseDate::today-link
af|chooseDate::regular-day
af|chooseDate::regular-day-link
af|chooseDate::prev-month-day
af|chooseDate::prev-month-day-link

... with pairs of styles for the table cell and the link itself.

-- Adam


On 8/7/07, Simon Lessard <si...@gmail.com> wrote:
> Along the same lines I think we should assign a style class to the various
> cells in the calendar (currently you have to use a selector looking like
> "af|chooseDate::content a" to achieve this).
>
>
> ~ Simon
>
>
> On 8/7/07, Simon Lessard <si...@gmail.com> wrote:
> > Hello,
> >
> > Working currently on a skin I found a strange behavior. The selector
> "af|inputDate::content" is used for both the inputDate field and the popup
> calendar's body. A direct consequence of that is that you cannot assign a
> border around the calendar without setting one also on the field implying
> that all fields will need such border as well.
> >
> > Since ::content is consistently used throughout Trinidad for the field
> content I would keep it that way. Therefore, I see two solutions:
> >
> >
> > Always use the " af|chooseDate" root for the calendar and ignore the
> difference between inputDate's popup and inline chooseDate's calendar;
> > Add a new selector named " af|inputDate::calendar-body" (or something else
> if you anyone has a better idea)
> > Any opinion, suggestion or objection?
> >
> > Regards,
> >
> > ~ Simon
> >
>
>

Re: [Trinidad] Strange skin selector choice for inputDate

Posted by Simon Lessard <si...@gmail.com>.
Along the same lines I think we should assign a style class to the various
cells in the calendar (currently you have to use a selector looking like
"af|chooseDate::content a" to achieve this).


~ Simon

On 8/7/07, Simon Lessard <si...@gmail.com> wrote:
>
> Hello,
>
> Working currently on a skin I found a strange behavior. The selector "
> af|inputDate::content" is used for both the inputDate field and the popup
> calendar's body. A direct consequence of that is that you cannot assign a
> border around the calendar without setting one also on the field implying
> that all fields will need such border as well.
>
> Since ::content is consistently used throughout Trinidad for the field
> content I would keep it that way. Therefore, I see two solutions:
>
>    1. Always use the " af|chooseDate" root for the calendar and ignore
>    the difference between inputDate's popup and inline chooseDate's calendar;
>    2. Add a new selector named " af|inputDate::calendar-body" (or
>    something else if you anyone has a better idea)
>
>
> Any opinion, suggestion or objection?
>
> Regards,
>
> ~ Simon
>

Re: [Trinidad] Strange skin selector choice for inputDate

Posted by Jeanne Waldman <je...@oracle.com>.
I'm fine with this. Usually I stick with the rule that every component 
has its own keys but in case, I would go with af|chooseDate keys for the 
popup.
The other example of this is if a complex component uses a table 
component internally. (we do this in some of our custom components). In 
this case we decided it was ok to use the table's skinning keys.

- Jeanne

Simon Lessard wrote:
> I prefer #1 as well since calendars' laf should be consistent 
> throughout an application, however this does reduce the customization 
> possibilities.
>
> ~ Simon
>
> On 8/7/07, * Adam Winer* <awiner@gmail.com <ma...@gmail.com>> 
> wrote:
>
>     On 8/7/07, Simon Lessard < simon.lessard.3@gmail.com
>     <ma...@gmail.com>> wrote:
>     > Hello,
>     >
>     > Working currently on a skin I found a strange behavior. The selector
>     > "af|inputDate::content" is used for both the inputDate field and
>     the popup
>     > calendar's body. A direct consequence of that is that you cannot
>     assign a
>     > border around the calendar without setting one also on the field
>     implying
>     > that all fields will need such border as well.
>     >
>     > Since ::content is consistently used throughout Trinidad for the
>     field
>     > content I would keep it that way. Therefore, I see two solutions:
>     >
>     > Always use the " af|chooseDate" root for the calendar and ignore
>     the
>     > difference between inputDate's popup and inline chooseDate's
>     calendar;
>     > Add a new selector named " af|inputDate::calendar-body" (or
>     something else
>     > if you anyone has a better idea)
>
>     I think I lean towards #1.
>
>     -- Adam
>
>
>     > Any opinion, suggestion or objection?
>     >
>     > Regards,
>     >
>     > ~ Simon
>     >
>
>

Re: [Trinidad] Strange skin selector choice for inputDate

Posted by Simon Lessard <si...@gmail.com>.
I prefer #1 as well since calendars' laf should be consistent throughout an
application, however this does reduce the customization possibilities.

~ Simon

On 8/7/07, Adam Winer <aw...@gmail.com> wrote:
>
> On 8/7/07, Simon Lessard <si...@gmail.com> wrote:
> > Hello,
> >
> > Working currently on a skin I found a strange behavior. The selector
> > "af|inputDate::content" is used for both the inputDate field and the
> popup
> > calendar's body. A direct consequence of that is that you cannot assign
> a
> > border around the calendar without setting one also on the field
> implying
> > that all fields will need such border as well.
> >
> > Since ::content is consistently used throughout Trinidad for the field
> > content I would keep it that way. Therefore, I see two solutions:
> >
> > Always use the " af|chooseDate" root for the calendar and ignore the
> > difference between inputDate's popup and inline chooseDate's calendar;
> > Add a new selector named " af|inputDate::calendar-body" (or something
> else
> > if you anyone has a better idea)
>
> I think I lean towards #1.
>
> -- Adam
>
>
> > Any opinion, suggestion or objection?
> >
> > Regards,
> >
> > ~ Simon
> >
>

Re: [Trinidad] Strange skin selector choice for inputDate

Posted by Adam Winer <aw...@gmail.com>.
On 8/7/07, Simon Lessard <si...@gmail.com> wrote:
> Hello,
>
> Working currently on a skin I found a strange behavior. The selector
> "af|inputDate::content" is used for both the inputDate field and the popup
> calendar's body. A direct consequence of that is that you cannot assign a
> border around the calendar without setting one also on the field implying
> that all fields will need such border as well.
>
> Since ::content is consistently used throughout Trinidad for the field
> content I would keep it that way. Therefore, I see two solutions:
>
> Always use the " af|chooseDate" root for the calendar and ignore the
> difference between inputDate's popup and inline chooseDate's calendar;
> Add a new selector named " af|inputDate::calendar-body" (or something else
> if you anyone has a better idea)

I think I lean towards #1.

-- Adam


> Any opinion, suggestion or objection?
>
> Regards,
>
> ~ Simon
>