[
https://issues.apache.org/jira/browse/OFBIZ-7680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15364205#comment-15364205 ]
Nicolas Malin commented on OFBIZ-7680:
--------------------------------------
On framework/entity/src/org/ofbiz/entity/finder/PrimaryKeyFinder:90 I found this (use by AbstractModelAction)
{code}
if (!valueNameAcsr.isEmpty()) {
this.valueNameAcsr.put(context, valueOut);
} else {
if (valueOut != null) {
context.putAll(valueOut);
}
}
{code}
I think we can extend like that
{code}
String originalValueName = this.valueNameAcsr.getOriginalName();
if (originalValueName.isEmpty()) {
originalValueName = "context";
}
if ( !"context".equals(originalValueName)) {
this.valueNameAcsr.put(context, valueOut);
} else {
if (valueOut != null) {
context.putAll(valueOut);
}
}
{code}
And correct Forms file like that
{code}
<entity-one entity-name="Content" use-cache="false">
{code}
To
{code}
<entity-one entity-name="Content" value-field="context" use-cache="false">
{code}
Your remarks?
> Attribute 'value-field' must appear on element 'entity-one'
> -----------------------------------------------------------
>
> Key: OFBIZ-7680
> URL:
https://issues.apache.org/jira/browse/OFBIZ-7680> Project: OFBiz
> Issue Type: Bug
> Components: content, humanres
> Affects Versions: Trunk
> Reporter: Jacques Le Roux
> Assignee: Nicolas Malin
>
> I found these errors
> cvc-complex-type.4: Attribute 'value-field' must appear on element 'entity-one'. CompDocTemplateTree.xml /ofbiz/applications/content/widget/compdoc line 25
> cvc-complex-type.4: Attribute 'value-field' must appear on element 'entity-one'. CompDocTemplateTree.xml /ofbiz/applications/content/widget/compdoc line 57
> cvc-complex-type.4: Attribute 'value-field' must appear on element 'entity-one'. CompDocTemplateTree.xml /ofbiz/applications/content/widget/compdoc line 93
> cvc-complex-type.4: Attribute 'value-field' must appear on element 'entity-one'. CompDocTemplateTree.xml /ofbiz/applications/content/widget/compdoc line 125
> cvc-complex-type.4: Attribute 'value-field' must appear on element 'entity-one'. ContentForms.xml /ofbiz/applications/content/widget/content line 235
> cvc-complex-type.4: Attribute 'value-field' must appear on element 'entity-one'. ContentSetupForms.xml /ofbiz/applications/content/widget/contentsetup line 217
> cvc-complex-type.4: Attribute 'value-field' must appear on element 'entity-one'. EmploymentAppForms.xml /ofbiz/applications/humanres/widget/forms line 27
> cvc-complex-type.4: Attribute 'value-field' must appear on element 'entity-one'. PayGradeForms.xml /ofbiz/applications/humanres/widget/forms line 65
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)