Forums de discussion

how to implement a custom FacesRenderer (DXP)?

Gunnar Brinkmann, modifié il y a 6 années.

how to implement a custom FacesRenderer (DXP)?

Junior Member Publications: 53 Date d'inscription: 02/12/11 Publications récentes
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
thumbnail
Neil Griffin, modifié il y a 6 années.

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

Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
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
Gunnar Brinkmann, modifié il y a 6 années.

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

Junior Member Publications: 53 Date d'inscription: 02/12/11 Publications récentes
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
thumbnail
Neil Griffin, modifié il y a 6 années.

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

Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
Hi Gun,

Thanks for the kind words about 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