Hi Erwan, Why the unnecessary changes? All that was needed to change was fix the ConditionObject constructor. It should have been checking for "field" and then falling back to "field-name" (for backwards compatibility reasons), there was no need to change the schemas and I think the previous attribute name was more consistent.
And I definitely don't agree with backporting unnecessary schema changes to 10.04. Regards Scott HotWax Media http://www.hotwaxmedia.com On 26/08/2010, at 7:07 PM, [email protected] wrote: > Author: erwan > Date: Thu Aug 26 07:07:12 2010 > New Revision: 989475 > > URL: http://svn.apache.org/viewvc?rev=989475&view=rev > Log: > when using an entity-condition, the object's attribute name used in condition > object parameter was not taken into account > > Modified: > > ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/EntityFinderUtil.java > ofbiz/trunk/framework/minilang/dtd/simple-methods.xsd > ofbiz/trunk/framework/widget/dtd/widget-form.xsd > ofbiz/trunk/framework/widget/dtd/widget-screen.xsd > > Modified: > ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/EntityFinderUtil.java > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/EntityFinderUtil.java?rev=989475&r1=989474&r2=989475&view=diff > ============================================================================== > --- > ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/EntityFinderUtil.java > (original) > +++ > ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/EntityFinderUtil.java > Thu Aug 26 07:07:12 2010 > @@ -312,10 +312,10 @@ public class EntityFinderUtil { > protected FlexibleMapAccessor<Object> fieldNameAcsr; > > public ConditionObject(Element conditionExprElement) { > - this.fieldNameAcsr = > FlexibleMapAccessor.getInstance(conditionExprElement.getAttribute("field-name")); > + this.fieldNameAcsr = > FlexibleMapAccessor.getInstance(conditionExprElement.getAttribute("object-name")); > if (this.fieldNameAcsr.isEmpty()) { > // no "field-name"? try "name" > - this.fieldNameAcsr = > FlexibleMapAccessor.getInstance(conditionExprElement.getAttribute("name")); > + this.fieldNameAcsr = > FlexibleMapAccessor.getInstance(conditionExprElement.getAttribute("field-name")); > } > } > > > Modified: ofbiz/trunk/framework/minilang/dtd/simple-methods.xsd > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/dtd/simple-methods.xsd?rev=989475&r1=989474&r2=989475&view=diff > ============================================================================== > --- ofbiz/trunk/framework/minilang/dtd/simple-methods.xsd (original) > +++ ofbiz/trunk/framework/minilang/dtd/simple-methods.xsd Thu Aug 26 07:07:12 > 2010 > @@ -2458,7 +2458,7 @@ under the License. > </xs:complexType> > </xs:element> > <xs:attributeGroup name="attlist.condition-object"> > - <xs:attribute name="field" type="xs:string" use="required"> > + <xs:attribute name="object-name" type="xs:string" use="required"> > <xs:annotation> > <xs:documentation> > Field in the current context where that condition object > is that implements the entity condition interface. > > Modified: ofbiz/trunk/framework/widget/dtd/widget-form.xsd > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/dtd/widget-form.xsd?rev=989475&r1=989474&r2=989475&view=diff > ============================================================================== > --- ofbiz/trunk/framework/widget/dtd/widget-form.xsd (original) > +++ ofbiz/trunk/framework/widget/dtd/widget-form.xsd Thu Aug 26 07:07:12 2010 > @@ -1890,7 +1890,7 @@ under the License. > </xs:complexType> > </xs:element> > <xs:attributeGroup name="attlist.condition-object"> > - <xs:attribute type="xs:string" name="field" use="required"/> > + <xs:attribute type="xs:string" name="object-name" use="required"/> > </xs:attributeGroup> > <xs:element name="field-map"> > <xs:complexType> > > Modified: ofbiz/trunk/framework/widget/dtd/widget-screen.xsd > URL: > http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/dtd/widget-screen.xsd?rev=989475&r1=989474&r2=989475&view=diff > ============================================================================== > --- ofbiz/trunk/framework/widget/dtd/widget-screen.xsd (original) > +++ ofbiz/trunk/framework/widget/dtd/widget-screen.xsd Thu Aug 26 07:07:12 > 2010 > @@ -699,7 +699,7 @@ under the License. > </xs:complexType> > </xs:element> > <xs:attributeGroup name="attlist.condition-object"> > - <xs:attribute type="xs:string" name="field" use="required"/> > + <xs:attribute type="xs:string" name="object-name" use="required"/> > </xs:attributeGroup> > <xs:element name="select-field"> > <xs:complexType> > >
smime.p7s
Description: S/MIME cryptographic signature
