There are issues with the composite keys and two of the templates.

1. In find.jsp.ftl you should check if typeName is not null. Here is the 
updated <#foreach> section:

<#foreach field in pojo.getAllPropertiesIterator()><#if 
!c2h.isCollection(field) && !c2h.isManyToOne(field)>           <h:outputLabel 
value="${'#'}{msg.${pojo.shortName}_${field.name}}" for="${field.name}">

<#if field.value.typeName?exists> 

<#if field.value.typeName == "date">             <h:inputText 
value="${'#'}{${entityFinder}.example.${field.name}}" id="${field.name}">

               <f:convertDateTime type="date" dateStyle="short"/>

             </h:inputText>

<#elseif field.value.typeName == "time">             <h:inputText 
value="${'#'}{${entityFinder}.example.${field.name}}" id="${field.name}">

               <f:convertDateTime type="time"/>

             </h:inputText>

<#elseif field.value.typeName == "timestamp">             <h:inputText 
value="${'#'}{${entityFinder}.example.${field.name}}" id="${field.name}">

               <f:convertDateTime type="both" dateStyle="short"/>

             </h:inputText>

<#elseif field.value.typeName == "boolean">             
<h:selectBooleanCheckbox value="${'#'}{${entityFinder}.example.${field.name}}" 
id="${field.name}"/>
<#else>             <h:inputText 
value="${'#'}{${entityFinder}.example.${field.name}}" id="${field.name}"/>

</#if>

<#else>             <h:inputText 
value="${'#'}{${entityFinder}.example.${field.name}}" id="${field.name}"/>

</#if>           </h:outputLabel>

</#if></#foreach>           <h:outputLabel value="${'#'}{msg.PageSize}" 
for="pageSize">



2. In editorbean.java.ftl you should check if identifierProperty is not null. 
Here is the updated <#if> /line 47/:

<#if pojo.identifierProperty?exists && 
pojo.identifierProperty.value.identifierGeneratorStrategy == "assigned">       
if ( entityManager.find(${entityClass}.class, 
instance.${pojo.getGetterSignature(pojo.identifierProperty)}())!=null )


Good luck!

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3948264#3948264

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3948264


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to