Great! That's exactly what I was looking for :)

Thanks.

On 9/21/07, Jeanne Waldman <[EMAIL PROTECTED]> wrote:
>
>  Oh, sorry. Didn't notice the icon. You are right. You can't do it in xss
> or css right now. There's a JIRA issue requesting -tr-rule-ref for icons.
> To do this in the Skin java file you would use the ReferenceIcon.
>
> e.g.,
>     // tr:panelHeader header icons point to reference icon so they can
>     // be easily shared with tr:messages's icons
>     SkinSelectors.AF_PANEL_HEADER_ERROR_ICON_NAME,
>     new ReferenceIcon(SkinSelectors.HEADER_ERROR_ICON_ALIAS_NAME),
>
> Does that answer your question?
>
> Simon Lessard wrote:
>
> Hello Jeanne,
>
> I'm going to try, but I thought it would be different for icon, because
> all icon aliases are defined in XhtmlSkin and not in base-desktop.xss.
>
> On 9/21/07, Jeanne Waldman <[EMAIL PROTECTED]> wrote:
> >
> > In XSS they are 'named' styles:
> > for example:
> >   <style name="AFStartTextAlign">
> >     <property name="text-align">left</property>
> >   </style>
> >
> > if .AFStartTextAlign:alias
> > in css.
> >
> > Look in base-desktop.xss for other examples, and how you include this in
> > other styles.
> >
> > - Jenane
> >
> > Simon Lessard wrote:
> >
> > Hello all and principally Jeanne,
> >
> > Is there a way to use icon aliases with XSS and/or XhtmlSkin? I wanted
> > to create the following two aliases to enable easy use of tr:icon:
> >
> >    - .AFBusyIcon:alias
> >    - .AFReadyIcon:alias
> >
> > And have the following two selectors reference them:
> >
> >    - af|statusIndicator::busy-icon
> >    - af|statusIndicator::ready-icon
> >
> > Is that even possible or must I define both and point on the same
> > source. The latter would be quite bad since users overriding the aliases
> > will probably want to impact both.
> >
> >
> > Regards,
> >
> > ~ Simon
> >
> >
> > On 9/21/07, Simon Lessard <[EMAIL PROTECTED] > wrote:
> > >
> > > Ok I think I'll go with facet or icon since it seems to be the most
> > > accepted scenario. I'm going to comment the component accordingly.
> > >
> > >
> > > On 9/20/07, Adam Winer <[EMAIL PROTECTED]> wrote:
> > > >
> > > > I'm happier if we don't add any attributes...  We definitely
> > > > want default behavior where, if nothing is specified,
> > > > the icons get shown.
> > > >
> > > > -- Adam
> > > >
> > > >
> > > > On 9/20/07, Jeanne Waldman < [EMAIL PROTECTED]> wrote:
> > > > >
> > > > >  The other api I like is one you mentioned was not backwards
> > > > compatible, and
> > > > > that is to have them put the icon in the facet if they want an
> > > > icon.
> > > > >
> > > > >  I agree that the below API is busy, but to me it is clear. No
> > > > guessing what
> > > > > the logic is.
> > > > >
> > > > >
> > > > >  Simon Lessard wrote:
> > > > > Hello Jeanne,
> > > > >
> > > > >  Something alike was proposed at first, but again the most common
> > > > usage
> > > > > kicks in. Such attributes imply, for GMail like behavior:
> > > > >
> > > > >  <tr:statusIndicator hideReadyIcon="true" hideBusyIcon="true">
> > > > >    <f:facet name="busy">
> > > > >      <tr:outputText value="Loading..."/>
> > > > >    </f:facet>
> > > > >  </tr:statusIndicator>
> > > > >
> > > > >  It's a bit longer, but it's easily livable with I guess.
> > > > >
> > > > >
> > > > > On 9/20/07, Jeanne Waldman < [EMAIL PROTECTED]> wrote:
> > > > > >
> > > > > > How about hideReadyIcon = "true/false"
> > > > > > hideBusyIcon = "true/false".
> > > > > >
> > > > > > It's explicit and the user doesn't have to guess at the logic we
> > > > are using
> > > > > -- or read the doc.
> > > > > >
> > > > > > - Jeanne
> > > > > >
> > > > > >
> > > > > > Simon Lessard wrote:
> > > > > > Hello Adam,
> > > > > >
> > > > > >
> > > > > > On 9/18/07, Adam Winer < [EMAIL PROTECTED]> wrote:
> > > > > > > I think it should be as simple as for each of "busy" and
> > > > > > > "ready", render the facet if it's present, the icon if it's
> > > > not.
> > > > > >
> > > > > >
> > > > > > The only issue with that behavior is most common usage. I think
> > > > the most
> > > > > common usage with facets is going to be a "busy" facet and no
> > > > "ready" (to
> > > > > mimic GMail behavior for example). Personally, that's the way I
> > > > would use
> > > > > it. If that's really the most common case, then it should be "as
> > > > soon as a
> > > > > facet is specified, rendered or not, no icon will be rendered".
> > > > But, if we
> > > > > think the most common case is going to be with both facets, then I
> > > > agree
> > > > > with your suggestion.
> > > > > >
> > > > > > ~ Simon
> > > > > >
> > > > > >
> > > > > > > -- Adam
> > > > > > >
> > > > > > >
> > > > > > > On 9/18/07, Simon Lessard < [EMAIL PROTECTED]> wrote:
> > > > > > > > Hmm not as simple as I though. Before pushing a patch let
> > > > decide on
> > > > > the
> > > > > > > > behavior for every use case:
> > > > > > > >
> > > > > > > > Both facets are specified and rendered --> Don't render any
> > > > icon
> > > > > > > > Both facets are specified but only one is rendered --> ?
> > > > > > > >  Both facets are specified but neither are rendered --> ?
> > > > > > > >  Only one facet is specified and rendered --> Don't render
> > > > any icon or
> > > > > > > > render the icon of the missing facet?
> > > > > > > > Only one facet is specified but not rendered --> ?
> > > > > > > > No facet is specified --> Render both icons
> > > > > > > >
> > > > > > > > ~ Simon
> > > > > > > >
> > > > > > > >
> > > > > > > > On 9/18/07, Simon Lessard < [EMAIL PROTECTED]>
> > > > wrote:
> > > > > > > > > Or put tr:icon in the facet. Yeah, that sound good too.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On 9/18/07, Matthias Wessendorf < [EMAIL PROTECTED] >
> > > > wrote:
> > > > > > > > > > that sounds like the best solution.
> > > > > > > > > >
> > > > > > > > > > On 9/18/07, Adam Winer < [EMAIL PROTECTED] > wrote:
> > > > > > > > > > > IMO, if we have a facet, we don't render the icon.  No
> > > > need
> > > > > > > > > > > for an attribute at all.
> > > > > > > > > > >
> > > > > > > > > > > Anyone that desperately needs both the facet and the
> > > > icon
> > > > > > > > > > > can render two statusIndicators.
> > > > > > > > > > >
> > > > > > > > > > > -- Adam
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > On 9/18/07, Matthias Wessendorf < [EMAIL PROTECTED]>
> > > > wrote:
> > > > > > > > > > > > Hi,
> > > > > > > > > > > >
> > > > > > > > > > > > On 9/18/07, Simon Lessard <
> > > > [EMAIL PROTECTED] > wrote:
> > > > > > > > > > > > > Speaking of which, I forgot to add skin
> > > > documentation. I'll
> > > > > do
> > > > > > > > that right
> > > > > > > > > > > > > away.
> > > > > > > > > > > > >
> > > > > > > > > > > > > I would also like to add a new attribute to skip
> > > > the icon
> > > > > > > > rendering. If it
> > > > > > > > > > > > > hasn't been of backward compatibility, I would
> > > > have simply
> > > > > removed
> > > > > > > > them
> > > > > > > > > > > >
> > > > > > > > > > > > I added a demo usage of the facet's, I was thinking,
> > > > that it
> > > > > > > > shouldn't
> > > > > > > > > > > > render the "default" icon,
> > > > > > > > > > > > glad you pointed it out now.
> > > > > > > > > > > >
> > > > > > > > > > > > > since it's easily doable with a combination of
> > > > facet and
> > > > > tr:icon,
> > > > > > > > but since
> > > > > > > > > > > > > we had a release with the statusIndicator already,
> > > > that's
> > > > > out of
> > > > > > > > question.
> > > > > > > > > > > > > So, what I need now is a decent attribute name.
> > > > What do you
> > > > > think
> > > > > > > > of
> > > > > > > > > > > > > "renderIcon" or "renderFacetsOnly"?
> > > > > > > > > > > >
> > > > > > > > > > > > I tend to like renderFacetsOnly, because that what
> > > > you added
> > > > > where
> > > > > > > > facets.
> > > > > > > > > > > >
> > > > > > > > > > > > Perhaps, we can change that soon, that when facet's
> > > > are
> > > > > specified,
> > > > > > > > we
> > > > > > > > > > > > don't render the "default" icon.
> > > > > > > > > > > >
> > > > > > > > > > > > -Matthias
> > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > ~ Simon
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > --
> > > > > > > > > > > > Matthias Wessendorf
> > > > > > > > > > > >
> > > > > > > > > > > > further stuff:
> > > > > > > > > > > > blog:
> > > > > http://matthiaswessendorf.wordpress.com/
> > > > > > > > > > > > mail: matzew-at-apache-dot-org
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > --
> > > > > > > > > > Matthias Wessendorf
> > > > > > > > > >
> > > > > > > > > > further stuff:
> > > > > > > > > > blog:
> > > > > http://matthiaswessendorf.wordpress.com/
> > > > > > > > > > mail: matzew-at-apache-dot-org
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > >
> > >
> >
>

Reply via email to