Foros de discusión

how to implement a custom FacesRenderer (DXP)?

Gunnar Brinkmann, modificado hace 6 años.

how to implement a custom FacesRenderer (DXP)?

Junior Member Mensajes: 53 Fecha de incorporación: 2/12/11 Mensajes recientes
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, modificado hace 6 años.

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

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
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, modificado hace 6 años.

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

Junior Member Mensajes: 53 Fecha de incorporación: 2/12/11 Mensajes recientes
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, modificado hace 6 años.

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

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
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