Jacopo,
Yes, that is exactly what I am working on. Did you notice that
String description = field.getDescription();
doesn't work?
-Adrian
Jacopo Cappellato wrote:
Adrian,
this is probably a bit off topic, but recently (while working on the
Business Intelligence application) I've completed some support to access
descriptions on entities and views' fields.
I don't remember the details (and I'm not even sure you are trying to do
something similar) but you may have a look at the way metadata are
retrived in the bsh script:
http://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose/bi/webapp/bi/WEB-INF/actions/reportbuilder/getStarSchemaFields.bsh
Jacopo
Adrian Crum wrote:
I'm working on the entity engine model classes to include support for
accessing the description elements during run time. I've run into a
problem I can't figure out.
Using the following entity definition:
<entity entity-name="Content" package-name="org.ofbiz.content.content"
title="Content Entity">
<field name="ownerContentId" type="id"><description>Used for
permissions checking</description></field>
...
</entity>
I have the description Element in code, but I can't seem to get the
text of the description:
NodeList descriptionList =
fieldElement.getElementsByTagName("description");
for (int i = 0; i < descriptionList.getLength(); i++) {
Element element = (Element) descriptionList.item(i);
if (element.getNodeValue() != null) {
this.description = element.getNodeValue();
}
}
I've tried getNodeValue() and getTextContent(), but both return null.
Any ideas?
-Adrian