Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Gunnar Brinkmann
how to implement a custom FacesRenderer (DXP)?
September 19, 2017 1:17 AM
Answer

Gunnar Brinkmann

Rank: Junior Member

Posts: 32

Join Date: December 1, 2011

Recent Posts

Hello,

Portlet developing for DXP (SP2 a.t.m.) with Primefaces 6.x
- portlet 2.0
- bridge api and impl 4.1.0-SNAPSHOT (sep 8)
- bridge ext 5.0.1-SNAPSHOT (sep 8)
- faces.alloy 3.0.0
- faces.portal 3.0.0

I can develop custom FacesComponents, but I cannot develop a custom FacesRenderer, I see no error messages and it's not called.

I have a custom Primefaces-Row-Component and want it to automatically render Primefaces Columns containing outputTexts. The rendering code is done, it's just not executed.

I tried Annotations, components.xml (facelet-taglib), faces-config.xml.

Can someone post a brief example how to implement a custom FacesRenderer?

regards
gun
Neil Griffin
RE: how to implement a custom FacesRenderer (DXP)?
September 19, 2017 8:21 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2511

Join Date: July 26, 2005

Recent Posts

Hi Gunnar,

We released production quality versions of those modules, so you don't need to specify -SNAPSHOT anymore. Here are the dependencies that I recommend you use in your projects:
 1
 2<dependencies>
 3    <dependency>
 4        <groupId>com.liferay.faces</groupId>
 5        <artifactId>com.liferay.faces.bridge.ext</artifactId>
 6        <version>5.0.1</version>
 7    </dependency>
 8    <dependency>
 9        <groupId>com.liferay.faces</groupId>
10        <artifactId>com.liferay.faces.bridge.impl</artifactId>
11        <version>4.1.0</version>
12    </dependency>
13    <dependency>
14        <groupId>com.liferay.faces</groupId>
15        <artifactId>com.liferay.faces.alloy</artifactId>
16        <version>3.0.1</version>
17    </dependency>
18    <dependency>
19        <groupId>com.liferay.faces</groupId>
20        <artifactId>com.liferay.faces.portal</artifactId>
21        <version>3.0.1</version>
22    </dependency>
23</dependencies>

Note that with the above dependencies specified, com.liferay.faces.bridge.api and com.liferay.faces.util will also be included in your project as transitive dependencies.

Regarding the FacesRenderer problem, please attach an SSCCE (preferably as a Maven project) so that we can reproduce the problem.

Kind Regards,

Neil
Gunnar Brinkmann
RE: how to implement a custom FacesRenderer (DXP)?
September 19, 2017 8:38 AM
Answer

Gunnar Brinkmann

Rank: Junior Member

Posts: 32

Join Date: December 1, 2011

Recent Posts

Hi and thanks, Neil - I've just discovered the new look of liferayfaces.org (right?) and the smart version infos on the start page, thanks a lot!

Regarding SSCCE: May happen shortly, we've just created a portlet template for other purposes.

regards,
gun
Neil Griffin
RE: how to implement a custom FacesRenderer (DXP)?
September 19, 2017 9:07 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2511

Join Date: July 26, 2005

Recent Posts

Hi Gun,

Thanks for the kind words about www.liferayfaces.org -- we know that the new version scheme can be difficult to follow, so we decided to make it as easy as possible for developers to determine the correct dependencies right there on the home page.

Kind Regards,

Neil

Participate in the State of Liferay Community 2017. Help the community and even win some prizes!