David,
is it possible that this change is breaking the EditShipment form? Have a look at this shipment: https://demo.hotwaxmedia.com/facility/control/EditShipment?shipmentId=10000 As you can see the shipmentId value is empty in the first field. Jacopo [hidden email] wrote: > Author: jonesde > Date: Sat May 19 23:37:22 2007 > New Revision: 539831 > > URL: http://svn.apache.org/viewvc?view=rev&rev=539831 > Log: > Small improvements to include alt-target, actions and row-actions for extended forms; also change to not try to get from a GenericEntity if it isn't a field of that entity, avoids lots of warning messages > > Modified: > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java > > Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java > URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java?view=diff&rev=539831&r1=539830&r2=539831 > ============================================================================== > --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java (original) > +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java Sat May 19 23:37:22 2007 > @@ -238,15 +238,20 @@ > this.defaultWidgetStyle = parent.defaultWidgetStyle; > this.defaultTooltipStyle = parent.defaultTooltipStyle; > this.itemIndexSeparator = parent.itemIndexSeparator; > - //this.fieldList = parent.fieldList; > - //this.fieldMap = parent.fieldMap; > this.separateColumns = parent.separateColumns; > this.targetType = parent.targetType; > this.defaultMapName = parent.defaultMapName; > this.targetWindowExdr = parent.targetWindowExdr; > this.hideHeader = parent.hideHeader; > + > + this.altTargets = parent.altTargets; > + this.actions = parent.actions; > + this.rowActions = parent.rowActions; > > - > + //these are done below in a special way... > + //this.fieldList = parent.fieldList; > + //this.fieldMap = parent.fieldMap; > + > // Create this fieldList/Map from clones of parent's > Iterator fieldListIter = parent.fieldList.iterator(); > while (fieldListIter.hasNext()) { > > Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java > URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java?view=diff&rev=539831&r1=539830&r2=539831 > ============================================================================== > --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java (original) > +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java Sat May 19 23:37:22 2007 > @@ -43,6 +43,7 @@ > import org.ofbiz.base.util.collections.MapStack; > import org.ofbiz.base.util.string.FlexibleStringExpander; > import org.ofbiz.entity.GenericDelegator; > +import org.ofbiz.entity.GenericEntity; > import org.ofbiz.entity.GenericEntityException; > import org.ofbiz.entity.GenericValue; > import org.ofbiz.entity.condition.EntityCondition; > @@ -637,7 +638,14 @@ > Object retVal = null; > if (this.entryAcsr != null && !this.entryAcsr.isEmpty()) { > //Debug.logInfo("Getting entry, using entryAcsr for field " + this.getName() + " of form " + this.modelForm.getName(), module); > - retVal = this.entryAcsr.get(dataMap); > + if (dataMap instanceof GenericEntity) { > + GenericEntity genEnt = (GenericEntity) dataMap; > + if (genEnt.getModelEntity().isField(this.entryAcsr.getOriginalName())) { > + genEnt.get(this.entryAcsr.getOriginalName()); > + } > + } else { > + retVal = this.entryAcsr.get(dataMap); > + } > } else { > //Debug.logInfo("Getting entry, no entryAcsr so using field name " + this.name + " for field " + this.getName() + " of form " + this.modelForm.getName(), module); > // if no entry name was specified, use the field's name > |
Ok,
I've fixed the issue in rev. 540166 However something is still broken when I try to pack (invoice) a shipment, maybe something related to the shipment cost estimate service... but of course this is not related with the above issue. Just a rough day :( Jacopo Jacopo Cappellato wrote: > David, > > is it possible that this change is breaking the EditShipment form? > Have a look at this shipment: > > https://demo.hotwaxmedia.com/facility/control/EditShipment?shipmentId=10000 > > As you can see the shipmentId value is empty in the first field. > > Jacopo > > [hidden email] wrote: >> Author: jonesde >> Date: Sat May 19 23:37:22 2007 >> New Revision: 539831 >> >> URL: http://svn.apache.org/viewvc?view=rev&rev=539831 >> Log: >> Small improvements to include alt-target, actions and row-actions for >> extended forms; also change to not try to get from a GenericEntity if >> it isn't a field of that entity, avoids lots of warning messages >> >> Modified: >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java >> >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java >> >> >> Modified: >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java >> URL: >> http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java?view=diff&rev=539831&r1=539830&r2=539831 >> >> ============================================================================== >> >> --- >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java >> (original) >> +++ >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java >> Sat May 19 23:37:22 2007 >> @@ -238,15 +238,20 @@ >> this.defaultWidgetStyle = parent.defaultWidgetStyle; >> this.defaultTooltipStyle = parent.defaultTooltipStyle; >> this.itemIndexSeparator = parent.itemIndexSeparator; >> - //this.fieldList = parent.fieldList; >> - //this.fieldMap = parent.fieldMap; >> this.separateColumns = parent.separateColumns; >> this.targetType = parent.targetType; >> this.defaultMapName = parent.defaultMapName; >> this.targetWindowExdr = parent.targetWindowExdr; >> this.hideHeader = parent.hideHeader; >> + >> + this.altTargets = parent.altTargets; >> + this.actions = parent.actions; >> + this.rowActions = parent.rowActions; >> - + //these are done >> below in a special way... >> + //this.fieldList = parent.fieldList; >> + //this.fieldMap = parent.fieldMap; >> + >> // Create this fieldList/Map from clones of parent's >> Iterator fieldListIter = parent.fieldList.iterator(); >> while (fieldListIter.hasNext()) { >> >> Modified: >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java >> >> URL: >> http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java?view=diff&rev=539831&r1=539830&r2=539831 >> >> ============================================================================== >> >> --- >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java >> (original) >> +++ >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java >> Sat May 19 23:37:22 2007 >> @@ -43,6 +43,7 @@ >> import org.ofbiz.base.util.collections.MapStack; >> import org.ofbiz.base.util.string.FlexibleStringExpander; >> import org.ofbiz.entity.GenericDelegator; >> +import org.ofbiz.entity.GenericEntity; >> import org.ofbiz.entity.GenericEntityException; >> import org.ofbiz.entity.GenericValue; >> import org.ofbiz.entity.condition.EntityCondition; >> @@ -637,7 +638,14 @@ >> Object retVal = null; >> if (this.entryAcsr != null && !this.entryAcsr.isEmpty()) { >> //Debug.logInfo("Getting entry, using entryAcsr for >> field " + this.getName() + " of form " + this.modelForm.getName(), >> module); >> - retVal = this.entryAcsr.get(dataMap); >> + if (dataMap instanceof GenericEntity) { >> + GenericEntity genEnt = (GenericEntity) dataMap; >> + if >> (genEnt.getModelEntity().isField(this.entryAcsr.getOriginalName())) { >> + genEnt.get(this.entryAcsr.getOriginalName()); >> + } >> + } else { >> + retVal = this.entryAcsr.get(dataMap); >> + } >> } else { >> //Debug.logInfo("Getting entry, no entryAcsr so using >> field name " + this.name + " for field " + this.getName() + " of form >> " + this.modelForm.getName(), module); >> // if no entry name was specified, use the field's name >> |
Free forum by Nabble | Edit this page |