[
https://issues.apache.org/jira/browse/OFBIZ-1387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12545183
]
Adrian Crum commented on OFBIZ-1387:
------------------------------------
I've been thinking about Jacopo's suggestion and I think I came up with a
strategy for the ModelField.getDescription method:
1. Get description from entitymodel.xml
2. If that's empty, lookup description in a properties file (for common,
redundant fields)
3. If that's empty, parse the field name into words - as Jacopo suggested
So, a properties file could contain:
productId=A unique product ID
And the Product.productId entity definition could contain:
<description>If you don't assign a productID, one will be
autogenerated</description>
Calling ModelField.getDescription on Product.productId would return "If you
don't assign a productID, one will be autogenerated" and calling
ModelField.getDescription on the productId field of any other entity would
return "A unique product ID"
Properties files could be organized by entity package names - that would help
prevent field name clash.
Using the field description for tooltips wouldn't work because the description
is in English. I like the idea of getting a tooltip from ModelField, but I
believe it should be a separate method - that performs a lookup in a properties
file.
> comment Entities
> ----------------
>
> Key: OFBIZ-1387
> URL: https://issues.apache.org/jira/browse/OFBIZ-1387
> Project: OFBiz
> Issue Type: Task
> Components: accounting, content, ecommerce, framework, humanres,
> manufacturing, marketing, order, party, pos, product
> Reporter: BJ Freeman
> Assignee: Adrian Crum
> Attachments: party_entity_model.patch
>
>
> comment the Entities files in the entitymodel.xsd
> put a comment in this jira of the entities you are going to comment
> when you attact your patch number it with a date, so if you don't do the
> whole thing someone else can add to it, and not overwrite your patch.
> hope the committers don't mind this break in the rules.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.