Hi,
OFBiz throws error message like <<Attribute 'value-field' must appear on element
'entity-one'>> when used in widget forms.
But it actually puts the Entity fields values directly in context, so something
like
<actions>
<entity-one entity-name="Content">
<field-map field-name="contentId" from-field="contentId"/>
</entity-one>
</actions>
<field name="contentId"><hidden/></field>
works since contentId is pushed into context.
Now the same does not exist in Minilang. Beside fixing the error message by
using a map name in such cases like
<actions>
<entity-one entity-name="Content" value-field="content">
<field-map field-name="contentId" from-field="contentId"/>
</entity-one>
</actions>
<field name="content.contentId"><hidden/></field>
we could simply allow also the 1st way (no map). It's not a big deal to change in XSD and to document there. And I like it, because having a default
value is always welcome (conventions over configuration), specially for lazy developers ;)
But it would be inconsistent with Minilang. My question: should we allow both way in widgets actions and makes it different than in Minilang? Note
that another possibility is to also allow it in Minilang but at 1st glance it entails more work...
Opinions?
Jacques