You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Andrew Robinson <an...@gmail.com> on 2007/08/16 17:21:25 UTC

[Trinidad] skinning panelTabbed issues

I am trying to get my skin to have tabs that have rounded corners and
scale well to font changes. In doing so, I have noticed some things
that would make life much easier:

1) There is a cell-start and a cell-end, but not a cell-start-selected
or cell-end-selected.
2) The separator TD's have no content, which makes table layouts
difficult with CSS. It would be much easier to style if the separators
had "&#160;" entities stuck as their content to force the browser to
render the TD fully. For those that don't want the separators to be
displayed, a simple "display: none" could be used.

I also am thinking the following skin types would be much easier to skin:

cell-start
before-selected-tab
tab-selected
after-selected-tab
before-tab
tab
after-tab
cell-end

And remove the "separator" skins. The reason I would propose this is
so that non-scaling background images would be easier to use (like
rounded corners).  Each before and after could be the start and end
image for either a non-selected tab or a selected tab.

Right now it does not seem possible to have a background image for
selection, since cell-start and cell-end cannot be styled differently
if the first or last tabs are selected. Also, since there is only one
separator, background images would have to have the end and start of a
tab, which is more work since two images have to be created of an
"end-normal, start selected" and "end selected, start normal" tab
image.

It seems ironic, but navigationPane component seems to have much
better support for skinnable tabs than the panelTabbed component.

-Andrew

Re: [Trinidad] skinning panelTabbed issues

Posted by Andrew Robinson <an...@gmail.com>.
I just created a bug for this feature request. I also attached my
sub-class that gets this to work.

https://issues.apache.org/jira/browse/TRINIDAD-632

-Andrew

On 8/16/07, Simon Lessard <si...@gmail.com> wrote:
> Alright... prepare for a real shock then...
>
> Check file named META-INF/renderertype-localname.properties.
>
> The key is componentFamily|rendererType. The value is the Renderer's class
> prefix so in your case panelTabbed become PanelTabbedRenderer inside
> org.apache.myfaces.trinidadinternal.ui.laf.base.desktop
> package... Where it get really fishy though is that valid property values
> are hard coded (see
> org.apache.myfaces.trinidadinternal.ui.laf.base.desktop.BaseDesktopLookAndFeel._SUPPORTED_NAMES
> ). So you'll have to use a valid dummy value that no longer have a Renderer
> attached to it, but I don't think we killed those for any value yet...
>
>
>
> Regards,
>
> ~ Simon
>
>  On 8/16/07, Andrew Robinson <an...@gmail.com> wrote:
> > I don't want to wait out a new release at this time, so really just
> > want to extend the renderer, deprecated or not. If you could be so
> > kind just to mention how the old ones are registered, I would
> > appreciate it.
> >
> > If I get some time in the future, perhaps I can help upgrade the
> > component as needed.
> >
> > On 8/16/07, Simon Lessard <si...@gmail.com> wrote:
> > > Hello Andrew,
> > >
> > > Marlin namespace often suggest an old UIX architecture. Even if
> > > http://wiki.apache.org/myfaces/FacesMajor_Renderers
> > > suggests that pannelTabbed was already converted to Faces major status,
> it
> > > doesn't seem to be the case. The current JSF renderer is
> > >
> org.apache.myfaces.trinidadinternal.renderkit.uix.PanelTabbedRenderer
> > > while the real renderer that will do the work is
> > >
> org.apache.myfaces.trinidadinternal.ui.laf.base.desktop.PanelTabbedRenderer.
> > > As mentioned in the first link, you shouldn't add new functionalities to
> > > deprecated renderers. However, if you're willing to create a new Faces
> major
> > > one supporting your new selectors (as long as you maintain the old ones
> as
> > > well), it would be most welcome.
> > >
> > >
> > > Regards,
> > >
> > > ~ Simon
> > >
> > >
> > > On 8/16/07, Andrew Robinson <an...@gmail.com> wrote:
> > > > So that I can do this myself, I don't see how the SubTabBarRenderer
> > > > gets registered so that I may extend it and override the prerender and
> > > > postrender methods. The code does not seem to be using the standard
> > > > JSF renderer utilities for obtaining the renderer. I don't see any
> > > > kind of XML or properties file that registers this class, perhaps it
> > > > something registered by naming convention? Can someone enlighten me?
> > > >
> > > > Code:
> > > >
> > > > Renderer subTabBarRenderer =
> > > >         context.getRendererManager().getRenderer(
> > > >           MARLIN_NAMESPACE, SUB_TAB_BAR_NAME);
> > > >       subTabBarRenderer.render(context, node);
> > > >
> > > > Thanks,
> > > > Andrew
> > > >
> > > > On 8/16/07, Andrew Robinson <an...@gmail.com> wrote:
> > > > > It would be greatly helpful if any changes were made to at least
> have
> > > > > a cell-start-selected and cell-end-selected
> > > > >
> > > > > On 8/16/07, Andrew Robinson <an...@gmail.com> wrote:
> > > > > > I am trying to get my skin to have tabs that have rounded corners
> and
> > > > > > scale well to font changes. In doing so, I have noticed some
> things
> > > > > > that would make life much easier:
> > > > > >
> > > > > > 1) There is a cell-start and a cell-end, but not a
> cell-start-selected
> > > > > > or cell-end-selected.
> > > > > > 2) The separator TD's have no content, which makes table layouts
> > > > > > difficult with CSS. It would be much easier to style if the
> separators
> > > > > > had "&#160;" entities stuck as their content to force the browser
> to
> > > > > > render the TD fully. For those that don't want the separators to
> be
> > > > > > displayed, a simple "display: none" could be used.
> > > > > >
> > > > > > I also am thinking the following skin types would be much easier
> to
> > > skin:
> > > > > >
> > > > > > cell-start
> > > > > > before-selected-tab
> > > > > > tab-selected
> > > > > > after-selected-tab
> > > > > > before-tab
> > > > > > tab
> > > > > > after-tab
> > > > > > cell-end
> > > > > >
> > > > > > And remove the "separator" skins. The reason I would propose this
> is
> > > > > > so that non-scaling background images would be easier to use (like
> > > > > > rounded corners).  Each before and after could be the start and
> end
> > > > > > image for either a non-selected tab or a selected tab.
> > > > > >
> > > > > > Right now it does not seem possible to have a background image for
> > > > > > selection, since cell-start and cell-end cannot be styled
> differently
> > > > > > if the first or last tabs are selected. Also, since there is only
> one
> > > > > > separator, background images would have to have the end and start
> of a
> > > > > > tab, which is more work since two images have to be created of an
> > > > > > "end-normal, start selected" and "end selected, start normal" tab
> > > > > > image.
> > > > > >
> > > > > > It seems ironic, but navigationPane component seems to have much
> > > > > > better support for skinnable tabs than the panelTabbed component.
> > > > > >
> > > > > > -Andrew
> > > > > >
> > > > >
> > > >
> > >
> > >
> >
>
>

Re: [Trinidad] skinning panelTabbed issues

Posted by Simon Lessard <si...@gmail.com>.
Alright... prepare for a real shock then...

Check file named META-INF/renderertype-localname.properties.

The key is componentFamily|rendererType. The value is the Renderer's class
prefix so in your case panelTabbed become PanelTabbedRenderer inside
org.apache.myfaces.trinidadinternal.ui.laf.base.desktop package... Where it
get really fishy though is that valid property values are hard coded (see
org.apache.myfaces.trinidadinternal.ui.laf.base.desktop.BaseDesktopLookAndFeel._SUPPORTED_NAMES).
So you'll have to use a valid dummy value that no longer have a Renderer
attached to it, but I don't think we killed those for any value yet...


Regards,

~ Simon

On 8/16/07, Andrew Robinson <an...@gmail.com> wrote:
>
> I don't want to wait out a new release at this time, so really just
> want to extend the renderer, deprecated or not. If you could be so
> kind just to mention how the old ones are registered, I would
> appreciate it.
>
> If I get some time in the future, perhaps I can help upgrade the
> component as needed.
>
> On 8/16/07, Simon Lessard <si...@gmail.com> wrote:
> > Hello Andrew,
> >
> > Marlin namespace often suggest an old UIX architecture. Even if
> > http://wiki.apache.org/myfaces/FacesMajor_Renderers
> > suggests that pannelTabbed was already converted to Faces major status,
> it
> > doesn't seem to be the case. The current JSF renderer is
> > org.apache.myfaces.trinidadinternal.renderkit.uix.PanelTabbedRenderer
> > while the real renderer that will do the work is
> >
> org.apache.myfaces.trinidadinternal.ui.laf.base.desktop.PanelTabbedRenderer
> .
> > As mentioned in the first link, you shouldn't add new functionalities to
> > deprecated renderers. However, if you're willing to create a new Faces
> major
> > one supporting your new selectors (as long as you maintain the old ones
> as
> > well), it would be most welcome.
> >
> >
> > Regards,
> >
> > ~ Simon
> >
> >
> > On 8/16/07, Andrew Robinson <an...@gmail.com> wrote:
> > > So that I can do this myself, I don't see how the SubTabBarRenderer
> > > gets registered so that I may extend it and override the prerender and
> > > postrender methods. The code does not seem to be using the standard
> > > JSF renderer utilities for obtaining the renderer. I don't see any
> > > kind of XML or properties file that registers this class, perhaps it
> > > something registered by naming convention? Can someone enlighten me?
> > >
> > > Code:
> > >
> > > Renderer subTabBarRenderer =
> > >         context.getRendererManager().getRenderer(
> > >           MARLIN_NAMESPACE, SUB_TAB_BAR_NAME);
> > >       subTabBarRenderer.render(context, node);
> > >
> > > Thanks,
> > > Andrew
> > >
> > > On 8/16/07, Andrew Robinson <an...@gmail.com> wrote:
> > > > It would be greatly helpful if any changes were made to at least
> have
> > > > a cell-start-selected and cell-end-selected
> > > >
> > > > On 8/16/07, Andrew Robinson <an...@gmail.com> wrote:
> > > > > I am trying to get my skin to have tabs that have rounded corners
> and
> > > > > scale well to font changes. In doing so, I have noticed some
> things
> > > > > that would make life much easier:
> > > > >
> > > > > 1) There is a cell-start and a cell-end, but not a
> cell-start-selected
> > > > > or cell-end-selected.
> > > > > 2) The separator TD's have no content, which makes table layouts
> > > > > difficult with CSS. It would be much easier to style if the
> separators
> > > > > had "&#160;" entities stuck as their content to force the browser
> to
> > > > > render the TD fully. For those that don't want the separators to
> be
> > > > > displayed, a simple "display: none" could be used.
> > > > >
> > > > > I also am thinking the following skin types would be much easier
> to
> > skin:
> > > > >
> > > > > cell-start
> > > > > before-selected-tab
> > > > > tab-selected
> > > > > after-selected-tab
> > > > > before-tab
> > > > > tab
> > > > > after-tab
> > > > > cell-end
> > > > >
> > > > > And remove the "separator" skins. The reason I would propose this
> is
> > > > > so that non-scaling background images would be easier to use (like
> > > > > rounded corners).  Each before and after could be the start and
> end
> > > > > image for either a non-selected tab or a selected tab.
> > > > >
> > > > > Right now it does not seem possible to have a background image for
> > > > > selection, since cell-start and cell-end cannot be styled
> differently
> > > > > if the first or last tabs are selected. Also, since there is only
> one
> > > > > separator, background images would have to have the end and start
> of a
> > > > > tab, which is more work since two images have to be created of an
> > > > > "end-normal, start selected" and "end selected, start normal" tab
> > > > > image.
> > > > >
> > > > > It seems ironic, but navigationPane component seems to have much
> > > > > better support for skinnable tabs than the panelTabbed component.
> > > > >
> > > > > -Andrew
> > > > >
> > > >
> > >
> >
> >
>

Re: [Trinidad] skinning panelTabbed issues

Posted by Andrew Robinson <an...@gmail.com>.
I don't want to wait out a new release at this time, so really just
want to extend the renderer, deprecated or not. If you could be so
kind just to mention how the old ones are registered, I would
appreciate it.

If I get some time in the future, perhaps I can help upgrade the
component as needed.

On 8/16/07, Simon Lessard <si...@gmail.com> wrote:
> Hello Andrew,
>
> Marlin namespace often suggest an old UIX architecture. Even if
> http://wiki.apache.org/myfaces/FacesMajor_Renderers
> suggests that pannelTabbed was already converted to Faces major status, it
> doesn't seem to be the case. The current JSF renderer is
> org.apache.myfaces.trinidadinternal.renderkit.uix.PanelTabbedRenderer
> while the real renderer that will do the work is
> org.apache.myfaces.trinidadinternal.ui.laf.base.desktop.PanelTabbedRenderer.
> As mentioned in the first link, you shouldn't add new functionalities to
> deprecated renderers. However, if you're willing to create a new Faces major
> one supporting your new selectors (as long as you maintain the old ones as
> well), it would be most welcome.
>
>
> Regards,
>
> ~ Simon
>
>
> On 8/16/07, Andrew Robinson <an...@gmail.com> wrote:
> > So that I can do this myself, I don't see how the SubTabBarRenderer
> > gets registered so that I may extend it and override the prerender and
> > postrender methods. The code does not seem to be using the standard
> > JSF renderer utilities for obtaining the renderer. I don't see any
> > kind of XML or properties file that registers this class, perhaps it
> > something registered by naming convention? Can someone enlighten me?
> >
> > Code:
> >
> > Renderer subTabBarRenderer =
> >         context.getRendererManager().getRenderer(
> >           MARLIN_NAMESPACE, SUB_TAB_BAR_NAME);
> >       subTabBarRenderer.render(context, node);
> >
> > Thanks,
> > Andrew
> >
> > On 8/16/07, Andrew Robinson <an...@gmail.com> wrote:
> > > It would be greatly helpful if any changes were made to at least have
> > > a cell-start-selected and cell-end-selected
> > >
> > > On 8/16/07, Andrew Robinson <an...@gmail.com> wrote:
> > > > I am trying to get my skin to have tabs that have rounded corners and
> > > > scale well to font changes. In doing so, I have noticed some things
> > > > that would make life much easier:
> > > >
> > > > 1) There is a cell-start and a cell-end, but not a cell-start-selected
> > > > or cell-end-selected.
> > > > 2) The separator TD's have no content, which makes table layouts
> > > > difficult with CSS. It would be much easier to style if the separators
> > > > had "&#160;" entities stuck as their content to force the browser to
> > > > render the TD fully. For those that don't want the separators to be
> > > > displayed, a simple "display: none" could be used.
> > > >
> > > > I also am thinking the following skin types would be much easier to
> skin:
> > > >
> > > > cell-start
> > > > before-selected-tab
> > > > tab-selected
> > > > after-selected-tab
> > > > before-tab
> > > > tab
> > > > after-tab
> > > > cell-end
> > > >
> > > > And remove the "separator" skins. The reason I would propose this is
> > > > so that non-scaling background images would be easier to use (like
> > > > rounded corners).  Each before and after could be the start and end
> > > > image for either a non-selected tab or a selected tab.
> > > >
> > > > Right now it does not seem possible to have a background image for
> > > > selection, since cell-start and cell-end cannot be styled differently
> > > > if the first or last tabs are selected. Also, since there is only one
> > > > separator, background images would have to have the end and start of a
> > > > tab, which is more work since two images have to be created of an
> > > > "end-normal, start selected" and "end selected, start normal" tab
> > > > image.
> > > >
> > > > It seems ironic, but navigationPane component seems to have much
> > > > better support for skinnable tabs than the panelTabbed component.
> > > >
> > > > -Andrew
> > > >
> > >
> >
>
>

Re: [Trinidad] skinning panelTabbed issues

Posted by Simon Lessard <si...@gmail.com>.
Hello Andrew,

Marlin namespace often suggest an old UIX architecture. Even if
http://wiki.apache.org/myfaces/FacesMajor_Renderers suggests that
pannelTabbed was already converted to Faces major status, it doesn't seem to
be the case. The current JSF renderer is
org.apache.myfaces.trinidadinternal.renderkit.uix.PanelTabbedRenderer while
the real renderer that will do the work is
org.apache.myfaces.trinidadinternal.ui.laf.base.desktop.PanelTabbedRenderer.
As mentioned in the first link, you shouldn't add new functionalities to
deprecated renderers. However, if you're willing to create a new Faces major
one supporting your new selectors (as long as you maintain the old ones as
well), it would be most welcome.


Regards,

~ Simon

On 8/16/07, Andrew Robinson <an...@gmail.com> wrote:
>
> So that I can do this myself, I don't see how the SubTabBarRenderer
> gets registered so that I may extend it and override the prerender and
> postrender methods. The code does not seem to be using the standard
> JSF renderer utilities for obtaining the renderer. I don't see any
> kind of XML or properties file that registers this class, perhaps it
> something registered by naming convention? Can someone enlighten me?
>
> Code:
>
> Renderer subTabBarRenderer =
>         context.getRendererManager().getRenderer(
>           MARLIN_NAMESPACE, SUB_TAB_BAR_NAME);
>       subTabBarRenderer.render(context, node);
>
> Thanks,
> Andrew
>
> On 8/16/07, Andrew Robinson <an...@gmail.com> wrote:
> > It would be greatly helpful if any changes were made to at least have
> > a cell-start-selected and cell-end-selected
> >
> > On 8/16/07, Andrew Robinson <an...@gmail.com> wrote:
> > > I am trying to get my skin to have tabs that have rounded corners and
> > > scale well to font changes. In doing so, I have noticed some things
> > > that would make life much easier:
> > >
> > > 1) There is a cell-start and a cell-end, but not a cell-start-selected
> > > or cell-end-selected.
> > > 2) The separator TD's have no content, which makes table layouts
> > > difficult with CSS. It would be much easier to style if the separators
> > > had "&#160;" entities stuck as their content to force the browser to
> > > render the TD fully. For those that don't want the separators to be
> > > displayed, a simple "display: none" could be used.
> > >
> > > I also am thinking the following skin types would be much easier to
> skin:
> > >
> > > cell-start
> > > before-selected-tab
> > > tab-selected
> > > after-selected-tab
> > > before-tab
> > > tab
> > > after-tab
> > > cell-end
> > >
> > > And remove the "separator" skins. The reason I would propose this is
> > > so that non-scaling background images would be easier to use (like
> > > rounded corners).  Each before and after could be the start and end
> > > image for either a non-selected tab or a selected tab.
> > >
> > > Right now it does not seem possible to have a background image for
> > > selection, since cell-start and cell-end cannot be styled differently
> > > if the first or last tabs are selected. Also, since there is only one
> > > separator, background images would have to have the end and start of a
> > > tab, which is more work since two images have to be created of an
> > > "end-normal, start selected" and "end selected, start normal" tab
> > > image.
> > >
> > > It seems ironic, but navigationPane component seems to have much
> > > better support for skinnable tabs than the panelTabbed component.
> > >
> > > -Andrew
> > >
> >
>

Re: [Trinidad] skinning panelTabbed issues

Posted by Andrew Robinson <an...@gmail.com>.
So that I can do this myself, I don't see how the SubTabBarRenderer
gets registered so that I may extend it and override the prerender and
postrender methods. The code does not seem to be using the standard
JSF renderer utilities for obtaining the renderer. I don't see any
kind of XML or properties file that registers this class, perhaps it
something registered by naming convention? Can someone enlighten me?

Code:

Renderer subTabBarRenderer =
        context.getRendererManager().getRenderer(
          MARLIN_NAMESPACE, SUB_TAB_BAR_NAME);
      subTabBarRenderer.render(context, node);

Thanks,
Andrew

On 8/16/07, Andrew Robinson <an...@gmail.com> wrote:
> It would be greatly helpful if any changes were made to at least have
> a cell-start-selected and cell-end-selected
>
> On 8/16/07, Andrew Robinson <an...@gmail.com> wrote:
> > I am trying to get my skin to have tabs that have rounded corners and
> > scale well to font changes. In doing so, I have noticed some things
> > that would make life much easier:
> >
> > 1) There is a cell-start and a cell-end, but not a cell-start-selected
> > or cell-end-selected.
> > 2) The separator TD's have no content, which makes table layouts
> > difficult with CSS. It would be much easier to style if the separators
> > had "&#160;" entities stuck as their content to force the browser to
> > render the TD fully. For those that don't want the separators to be
> > displayed, a simple "display: none" could be used.
> >
> > I also am thinking the following skin types would be much easier to skin:
> >
> > cell-start
> > before-selected-tab
> > tab-selected
> > after-selected-tab
> > before-tab
> > tab
> > after-tab
> > cell-end
> >
> > And remove the "separator" skins. The reason I would propose this is
> > so that non-scaling background images would be easier to use (like
> > rounded corners).  Each before and after could be the start and end
> > image for either a non-selected tab or a selected tab.
> >
> > Right now it does not seem possible to have a background image for
> > selection, since cell-start and cell-end cannot be styled differently
> > if the first or last tabs are selected. Also, since there is only one
> > separator, background images would have to have the end and start of a
> > tab, which is more work since two images have to be created of an
> > "end-normal, start selected" and "end selected, start normal" tab
> > image.
> >
> > It seems ironic, but navigationPane component seems to have much
> > better support for skinnable tabs than the panelTabbed component.
> >
> > -Andrew
> >
>

Re: [Trinidad] skinning panelTabbed issues

Posted by Andrew Robinson <an...@gmail.com>.
It would be greatly helpful if any changes were made to at least have
a cell-start-selected and cell-end-selected

On 8/16/07, Andrew Robinson <an...@gmail.com> wrote:
> I am trying to get my skin to have tabs that have rounded corners and
> scale well to font changes. In doing so, I have noticed some things
> that would make life much easier:
>
> 1) There is a cell-start and a cell-end, but not a cell-start-selected
> or cell-end-selected.
> 2) The separator TD's have no content, which makes table layouts
> difficult with CSS. It would be much easier to style if the separators
> had "&#160;" entities stuck as their content to force the browser to
> render the TD fully. For those that don't want the separators to be
> displayed, a simple "display: none" could be used.
>
> I also am thinking the following skin types would be much easier to skin:
>
> cell-start
> before-selected-tab
> tab-selected
> after-selected-tab
> before-tab
> tab
> after-tab
> cell-end
>
> And remove the "separator" skins. The reason I would propose this is
> so that non-scaling background images would be easier to use (like
> rounded corners).  Each before and after could be the start and end
> image for either a non-selected tab or a selected tab.
>
> Right now it does not seem possible to have a background image for
> selection, since cell-start and cell-end cannot be styled differently
> if the first or last tabs are selected. Also, since there is only one
> separator, background images would have to have the end and start of a
> tab, which is more work since two images have to be created of an
> "end-normal, start selected" and "end selected, start normal" tab
> image.
>
> It seems ironic, but navigationPane component seems to have much
> better support for skinnable tabs than the panelTabbed component.
>
> -Andrew
>