Skip to content

Commit

Permalink
Doco
Browse files Browse the repository at this point in the history
Change-Id: Ifbfb0406d84f08fe19539b3a91e03ff36c1cf394
  • Loading branch information
Richard Kennard committed Feb 21, 2012
1 parent a4bd207 commit 5511c63
Showing 1 changed file with 8 additions and 13 deletions.
Expand Up @@ -85,35 +85,30 @@ protected Map<String, String> inspectProperty(Property property)

if (property.isAnnotationPresent(ManyToOne.class))
{
// Note: this will look awful until https://issues.jboss.org/browse/FORGE-389

attributes
.put(FACES_LOOKUP,
StaticFacesUtils.wrapExpression(StringUtils.decapitalize(ClassUtils.getSimpleName(property
.getType())) + "Bean.all"));

// Note: this will fail on POSTback until https://issues.jboss.org/browse/FORGE-386

attributes
.put(FACES_CONVERTER_ID,
StaticFacesUtils.wrapExpression(StringUtils.decapitalize(ClassUtils.getSimpleName(property
.getType())) + "Bean.converter"));
}

// OneToMany
// OneToMany and ManyToMany

if (property.isAnnotationPresent(OneToMany.class))
{
attributes.put(N_TO_MANY, TRUE);
}

// ManyToMany

if (property.isAnnotationPresent(ManyToMany.class))
if (property.isAnnotationPresent(OneToMany.class) || property.isAnnotationPresent(ManyToMany.class))
{
attributes.put(N_TO_MANY, TRUE);
}

return attributes;
}

@Override
protected Map<String, String> inspectEntity(String declaredClass, String actualClass) throws Exception
{
return super.inspectEntity(declaredClass, actualClass);
}
}

0 comments on commit 5511c63

Please sign in to comment.