Unsupported renderer errors for Switch

Community Driven Extensions Project
Post Reply
smokeybandit
Posts: 277
Joined: 08 Jul 2013, 17:53

13 Jul 2016, 18:44

In PE v6.0, the Switch component throws several warnings/errors for an unsupported/missing renderer for SwitchRenderer. It looks like there was some rework done to this component. Functionality isn't affected, just I'd rather not see extra log messages.

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

13 Jul 2016, 19:51

Would be great if you could provide a small example that we can check that.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

smokeybandit
Posts: 277
Joined: 08 Jul 2013, 17:53

14 Jul 2016, 16:49

I'm using a PF 6.1 snapshot. I confirmed the same behavior with the release version of PF 6.0.

Also, as noted, using PFE 6.0.

Using MyFaces 2.2.7 on Websphere 8.5.5.8.

myTab.xhtml:

Code: Select all

<pe:switch value="#{myBean.switchValue}">
	<pe:case value="main"  id="mainSwitchPanel">
		<h:panelGroup>
			<!-- other tags here -->
		</h:panelGroup>
	</pe:case>
	<pe:defaultCase id="defaultSwitchPanel">
		<h:panelGroup>
			<!-- other tags here -->
		</h:panelGroup>
	</pe:defaultCase>
</pe:switch>
The log messages:
[7/14/16 7:28:06:693 EDT] 000000c4 HtmlRenderKit W Unsupported component-family/renderer-type: org.primefaces.extensions.component/org.primefaces.extensions.component.SwitchRenderer

[7/14/16 7:28:06:708 EDT] 000000c4 webapp I com.ibm.ws.webcontainer.webapp.WebApp log SRVE0292I: Servlet Message - [AdministrationPortlet2_war#AdministrationPortlet.war]:.No Renderer found for component {Component-Path : [Class: com.ibm.faces20.portlet.UIPortletViewRoot,ViewId: /default.xhtml][Class: javax.faces.component.html.HtmlBody,Id: j_id_e][Class: javax.faces.component.html.HtmlPanelGroup,Id: j_id_f][Class: org.primefaces.component.panel.Panel,Id: j_id_z][Class: org.primefaces.component.tabview.TabView,Id: tabview][Class: org.primefaces.component.tabview.Tab,Id: myORideTab][Class: org.primefaces.extensions.component.switchcase.Switch,Id: j_id_or]} (component-family=org.primefaces.extensions.component, renderer-type=org.primefaces.extensions.component.SwitchRenderer) created from: /myTab.xhtml at line 33 and column 28

[7/14/16 7:28:06:724 EDT] 000000c4 UIComponentBa W No Renderer found for component {Component-Path : [Class: com.ibm.faces20.portlet.UIPortletViewRoot,ViewId: /default.xhtml][Class: javax.faces.component.html.HtmlBody,Id: j_id_e][Class: javax.faces.component.html.HtmlPanelGroup,Id: j_id_f][Class: org.primefaces.component.panel.Panel,Id: j_id_z][Class: org.primefaces.component.tabview.TabView,Id: tabview][Class: org.primefaces.component.tabview.Tab,Id: myORideTab][Class: org.primefaces.extensions.component.switchcase.Switch,Id: j_id_or]} (component-family=org.primefaces.extensions.component, renderer-type=org.primefaces.extensions.component.SwitchRenderer) created from: /myTab.xhtml at line 33 and column 28
It looks like the warning is triggered from this

Switch.java, PFE 4.0 tag:

Code: Select all

public Switch() {
		setRendererType(DEFAULT_RENDERER);
	}
Switch.java, PFE 6.0 tag:

Code: Select all

public Switch() {
	}
The default rendered (SwitchRenderer) was removed in 6.0, so removing the removed line of code makes sense. But it looks like explicitly setting the renderer type to null would resolve the issue.

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

15 Jul 2016, 14:23

Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

smokeybandit
Posts: 277
Joined: 08 Jul 2013, 17:53

18 Jul 2016, 14:15

Thanks.

That actually didn't work, despite several google references to this being the answer.

I removed the renderer-type tag for switch in primefaces-extensions.taglib.xml and built the jar. This did remove the warnings.

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

18 Jul 2016, 14:26

done ;)
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 12 guests