You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Carsten Pieper <ca...@continentale.de> on 2009/11/24 16:37:38 UTC

[TRINIDAD] Family and component type for SelectRangeChoiceRenderer

Hello,

we want to overwrite Trinidad's default SelectRangeChoiceRenderer. We
already  do this with other renderer. We have a class ExtendedCoreRenderKit
extends CoreRenderKit. In the constructor we are 
calling the RenderKitBase's addRenderer(String family, String rendererType,
Renderer renderer)

Example:
    addRenderer("org.apache.myfaces.trinidad.Tree",
        "org.apache.myfaces.trinidad.Tree", new TreeRenderer());

Everything's working fine so far, but I can't seem to find the right family
and rendererType for the 
SelectRangeChoice (the "pager" to navigate through huge tables...).

This is what I considered my best guess:

    addRenderer("org.apache.myfaces.trinidad.SelectRange",
        "org.apache.myfaces.trinidad.CoreSelectRangeChoiceBar", 
        new MySelectRangeChoiceBarRenderer());

Only it doesn't seem to be good enough. I always get Trinidad's default
renderer.
No exception thrown or anything which leaves me quite clueless.

If anyone knows the right parameters, please let me know.
Thanks a lot, Carsten
-- 
View this message in context: http://old.nabble.com/-TRINIDAD--Family-and-component-type-for-SelectRangeChoiceRenderer-tp26498105p26498105.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


RE: [TRINIDAD] Family and component type for SelectRangeChoiceRenderer

Posted by Carsten Pieper <ca...@continentale.de>.
Hi Keith,

I hope I got your question right. This is the render-kit entry from our
faces-config.xml

	<render-kit>
		<render-kit-id>de.continentale.vu.jsf.base.core</render-kit-id>
	
<render-kit-class>de.continentale.vu.jsf.base.renderkit.core.ExtendedCoreRenderKit</render-kit-class>
	</render-kit>

where ExtendedCoreRenderKit extends
org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit...

Please note that I didn't have to change the faces-config.xml to solve this
problem. 
The render-kit entry has already been in and no new entries whatsoever had 
to be added. 

Hope this helps, Carsten



Keith Carlton wrote:
> 
> Keith wrote: 
> 
> Carsten,
> 
> I am working on a similar problem, can you please post your xml addition
> to the faces-config.xml
> that get the renderer to see you renderKit?
> 
> Thanks,
> 
> Keith
>  
> 
> Carsten Pieper wrote:
>> 
>> If anyone is interested, here's the solution to the problem.
>> 
>> I did exactly what Harald advised (writing our own TableRenderer whose
>> inner private class
>> NavBar extends MySelectRangeChoiceRenderer).
>> 
>> But as TableRenderer is an abstract class I also had to write our own
>> version of the
>> DesktopTableRenderer which now extends our TableRenderer. In our
>> CoreRenderKit's
>> constructor the only thing I had to add is this
>> 
>>     addRenderer("org.apache.myfaces.trinidad.Table",
>>         "org.apache.myfaces.trinidad.Table", new DesktopTableRenderer());
>> 
>> Note that there's no need to add a renderer for our
>> SelectRangeChoiceRenderer (i.e. 
>> MySelectRangeChoiceRenderer). The reason for this most probably is, that
>> it's not a 
>> real component but more of a sub-component of the table...
>> 
>> Cheers, Carsten
>> 
>> 
> 

-- 
View this message in context: http://old.nabble.com/-TRINIDAD--Family-and-component-type-for-SelectRangeChoiceRenderer-tp26498105p28175486.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


RE: [TRINIDAD] Family and component type for SelectRangeChoiceRenderer

Posted by Keith Carlton <ke...@familyvideo.com>.
Carsten,

I am working on a similar problem, can you please post your xml addition to
the faces-config.xml
that get the renderer to see you renderKit?

Thanks,

Keith
 

Carsten Pieper wrote:
> 
> If anyone is interested, here's the solution to the problem.
> 
> I did exactly what Harald advised (writing our own TableRenderer whose
> inner private class
> NavBar extends MySelectRangeChoiceRenderer).
> 
> But as TableRenderer is an abstract class I also had to write our own
> version of the
> DesktopTableRenderer which now extends our TableRenderer. In our
> CoreRenderKit's
> constructor the only thing I had to add is this
> 
>     addRenderer("org.apache.myfaces.trinidad.Table",
>         "org.apache.myfaces.trinidad.Table", new DesktopTableRenderer());
> 
> Note that there's no need to add a renderer for our
> SelectRangeChoiceRenderer (i.e. 
> MySelectRangeChoiceRenderer). The reason for this most probably is, that
> it's not a 
> real component but more of a sub-component of the table...
> 
> Cheers, Carsten
> 
> 
> Carsten Pieper wrote:
>> 
>> Harald wrote:
>>> I.e. the renderer
>>> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.TableRenderer
>>> has a
>>> static private class NavBar extends SelectRangeChoiceBarRenderer
>> That's a very good hint. So probably I'm just writing our own
>> TableRenderer and put our stuff
>> directly into the private NavBar class.
>> 
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/-TRINIDAD--Family-and-component-type-for-SelectRangeChoiceRenderer-tp26498105p28167772.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


RE: [TRINIDAD] Family and component type for SelectRangeChoiceRenderer

Posted by Carsten Pieper <ca...@continentale.de>.
If anyone is interested, here's the solution to the problem.

I did exactly what Harald advised (writing our own TableRenderer whose inner
private class
NavBar extends MySelectRangeChoiceRenderer).

But as TableRenderer is an abstract class I also had to write our own
version of the
DesktopTableRenderer which now extends our TableRenderer. In our
CoreRenderKit's
constructor the only thing I had to add is this

    addRenderer("org.apache.myfaces.trinidad.Table",
        "org.apache.myfaces.trinidad.Table", new DesktopTableRenderer());

Note that there's no need to add a renderer for our
SelectRangeChoiceRenderer (i.e. 
MySelectRangeChoiceRenderer). The reason for this most probably is, that
it's not a 
real component but more of a sub-component of the table...

Cheers, Carsten


Carsten Pieper wrote:
> 
> Harald wrote:
>> I.e. the renderer
>> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.TableRenderer
>> has a
>> static private class NavBar extends SelectRangeChoiceBarRenderer
> That's a very good hint. So probably I'm just writing our own
> TableRenderer and put our stuff
> directly into the private NavBar class.
> 
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/-TRINIDAD--Family-and-component-type-for-SelectRangeChoiceRenderer-tp26498105p26513125.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


RE: [TRINIDAD] Family and component type for SelectRangeChoiceRenderer

Posted by Carsten Pieper <ca...@continentale.de>.
Thank you guys!

@Harald: 
> I.e. the renderer
> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.TableRenderer has
> a
> static private class NavBar extends SelectRangeChoiceBarRenderer
That's a very good hint. So probably I'm just writing our own TableRenderer
and put our stuff
directly into the private NavBar class.

Btw, TreeTableRenderer itself doesn't deal with the
SelectRangeChoiceBarRenderer. It
extends DesktopTableRenderer extends TableRenderer. Thus, implementing our
own TableRenderer
should do...

@Mamallan:
> Please try below for selectRangeChoicebar:
> component-family = org.apache.myfaces.trinidad.SelectRange
> renderer-type = org.apache.myfaces.trinidad.ChoiceBar 
I already had tried this but without the modifications that Harald advised.
So, even if these
are the right settings, they had no chance to work properly for me. But
thanks anyway!

Best wishes,
Carsten
-- 
View this message in context: http://old.nabble.com/-TRINIDAD--Family-and-component-type-for-SelectRangeChoiceRenderer-tp26498105p26509505.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


RE: [TRINIDAD] Family and component type for SelectRangeChoiceRenderer

Posted by "Kuhn, Harald" <HK...@airplus.com>.
Hi Carsten,

you probably have to implement your own TableRenderer (or TreeTableRenderer).

I.e. the renderer org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.TableRenderer has a
static private class NavBar extends SelectRangeChoiceBarRenderer

This private class always extends the Trinidad default renderer, but it should extend your own SelectRangeChoiceBarRenderer-implementation.

Regards

  Harald


Harald Kuhn
AirPlus International
Business Information Services
Dornhofstr. 36
63263 Neu-Isenburg
T  +49 (0) 61 02. 2 04 - 8 21
F  +49 (0) 61 02. 2 04 - 77 8 21
hkuhn@airplus.com
www.airplus.com



Lufthansa AirPlus Servicekarten GmbH · Hans-Böckler-Straße 7 · 63263 Neu-Isenburg · Germany · Geschäftsführer: Patrick W. Diemer (Vorsitz), Klaus Busch · Vorsitzender des Aufsichtsrates: Stephan Gemkow · Handelsregister: Amtsgericht Offenbach/Main, HRB 8119


-----Original Message-----
From: Mamallan Uthaman [mailto:mamallan.uthaman@oracle.com]
Sent: Tuesday, November 24, 2009 7:47 PM
To: MyFaces Discussion
Subject: Re: [TRINIDAD] Family and component type for SelectRangeChoiceRenderer

Hi Carsten,

Please try below for selectRangeChoicebar:
component-family = org.apache.myfaces.trinidad.SelectRange
renderer-type = org.apache.myfaces.trinidad.ChoiceBar

Thanks
Mamallan

Carsten Pieper wrote:
> Hello,
>
> we want to overwrite Trinidad's default SelectRangeChoiceRenderer. We
> already  do this with other renderer. We have a class ExtendedCoreRenderKit
> extends CoreRenderKit. In the constructor we are
> calling the RenderKitBase's addRenderer(String family, String rendererType,
> Renderer renderer)
>
> Example:
>     addRenderer("org.apache.myfaces.trinidad.Tree",
>         "org.apache.myfaces.trinidad.Tree", new TreeRenderer());
>
> Everything's working fine so far, but I can't seem to find the right family
> and rendererType for the
> SelectRangeChoice (the "pager" to navigate through huge tables...).
>
> This is what I considered my best guess:
>
>     addRenderer("org.apache.myfaces.trinidad.SelectRange",
>         "org.apache.myfaces.trinidad.CoreSelectRangeChoiceBar",
>         new MySelectRangeChoiceBarRenderer());
>
> Only it doesn't seem to be good enough. I always get Trinidad's default
> renderer.
> No exception thrown or anything which leaves me quite clueless.
>
> If anyone knows the right parameters, please let me know.
> Thanks a lot, Carsten
>

Re: [TRINIDAD] Family and component type for SelectRangeChoiceRenderer

Posted by Mamallan Uthaman <ma...@oracle.com>.
Hi Carsten,

Please try below for selectRangeChoicebar:
component-family = org.apache.myfaces.trinidad.SelectRange
renderer-type = org.apache.myfaces.trinidad.ChoiceBar

Thanks
Mamallan

Carsten Pieper wrote:
> Hello,
>
> we want to overwrite Trinidad's default SelectRangeChoiceRenderer. We
> already  do this with other renderer. We have a class ExtendedCoreRenderKit
> extends CoreRenderKit. In the constructor we are 
> calling the RenderKitBase's addRenderer(String family, String rendererType,
> Renderer renderer)
>
> Example:
>     addRenderer("org.apache.myfaces.trinidad.Tree",
>         "org.apache.myfaces.trinidad.Tree", new TreeRenderer());
>
> Everything's working fine so far, but I can't seem to find the right family
> and rendererType for the 
> SelectRangeChoice (the "pager" to navigate through huge tables...).
>
> This is what I considered my best guess:
>
>     addRenderer("org.apache.myfaces.trinidad.SelectRange",
>         "org.apache.myfaces.trinidad.CoreSelectRangeChoiceBar", 
>         new MySelectRangeChoiceBarRenderer());
>
> Only it doesn't seem to be good enough. I always get Trinidad's default
> renderer.
> No exception thrown or anything which leaves me quite clueless.
>
> If anyone knows the right parameters, please let me know.
> Thanks a lot, Carsten
>