Forums

angle-left Back

how to implement a custom FacesRenderer (DXP)?

GB
Gunnar Brinkmann, modified 9 Months ago.

how to implement a custom FacesRenderer (DXP)?

Junior Member Posts: 36 Join Date: 12/1/11 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, modified 9 Months ago.

RE: how to implement a custom FacesRenderer (DXP)?

LIFERAY STAFF Liferay Legend Posts: 2540 Join Date: 7/26/05 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:

<dependencies>
    <dependency>
        <groupId>com.liferay.faces</groupId>
        <artifactId>com.liferay.faces.bridge.ext</artifactId>
        <version>5.0.1</version>
    </dependency>
    <dependency>
        <groupId>com.liferay.faces</groupId>
        <artifactId>com.liferay.faces.bridge.impl</artifactId>
        <version>4.1.0</version>
    </dependency>
    <dependency>
        <groupId>com.liferay.faces</groupId>
        <artifactId>com.liferay.faces.alloy</artifactId>
        <version>3.0.1</version>
    </dependency>
    <dependency>
        <groupId>com.liferay.faces</groupId>
        <artifactId>com.liferay.faces.portal</artifactId>
        <version>3.0.1</version>
    </dependency>
</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
GB
Gunnar Brinkmann, modified 9 Months ago.

RE: how to implement a custom FacesRenderer (DXP)?

Junior Member Posts: 36 Join Date: 12/1/11 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, modified 9 Months ago.

RE: how to implement a custom FacesRenderer (DXP)?

LIFERAY STAFF Liferay Legend Posts: 2540 Join Date: 7/26/05 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