views:

17

answers:

0

Hi guys,

I have classes on my domain model with plenty of lazy relationships; I was using server-side state saving with JSF, and that allowed me to have these lazy mappings initialized on-demand by the presentation layer.

But switching to client-side state saving, I have an exception from EclipseLink, telling me that it could not serialize the view. The EL in question is using a chain of methods to display the user name (the user being the lazy relationship, as follows):

<h:outputText value="#{labels['name']}: #{bean.project.manager.name}" />

The source code for the JSF presentation layer has this all around the place. Initializing these relationships before-hand is costly, and besides, certain parts of the view might not be rendered at once, so... Do you guys have any suggestions? Have you ever encountered this while using EclipseLink?

By the way, it's JSF 2, with Glassfish v3.0.1. PrimeFaces as the component library, EJB and CDI as the glue.

Thanks in advance!

related questions