This content has been marked as final.
Show 1 reply
-
1. Re: Serializable Converter
frer Mar 18, 2009 12:44 PM (in response to frer)In case this can help someone help me: the reason I use serializable is that I have a common interface for all my entities (POJOs) which has the following methods:
public Serializable getId(); public void setId(Serializable id);
For example, it can be implemented like this:
private String id; public String getId() { return this.id; } public void setId(java.io.Serializable value) { this.id = (String) value; }
Contrarily to the getter, I cannot put String in the received value setter.
All this to say that when seam tries to serialize my entity id, it is not able to convert it because it doesn't seem to know the type.
I don't explicitely call the id in my jsf page but obviously seam needs it.
Here is an example of a jsf file that fails:
<h:form> <rich:tabPanel switchType="ajax"> <rich:tab label="#{messages['org.mdarad.framework.resources.form.tabs.general']}" immediate="true"> <table class="attributes"> <tbody class="attributes-tbody"> <tr class="attribute" id="loginRole-humanReadableKey"> <td id="loginRole-humanReadableKey-label-container" class="label-container"> <label class="label required" id="loginRole-humanReadableKey-label"> <h:outputText value="#{messages['ca.inukshuk.system.authentication.LoginRole.attributes.humanReadableKey']}"/> </label> </td> <td id="loginRole-humanReadableKey-edition-container" class="edition-container"> <h:inputText value="#{formBean.humanReadableKey}" id="loginRole-humanReadableKey-value" required="true"/> <rich:message for="loginRole-humanReadableKey-value" styleClass="message" infoClass="success" errorClass="error" warnClass="warning"/> </td> </tr> </tbody> </table> </rich:tab> </rich:tabPanel> </h:form>
If any more detail is needed please let me know.
Francois