[OFBiz] Dev - [Fwd: [OFBiz] SVN: r6080 - in trunk/framework/widget: dtd src/org/ofbiz/widget/screen]

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[OFBiz] Dev - [Fwd: [OFBiz] SVN: r6080 - in trunk/framework/widget: dtd src/org/ofbiz/widget/screen]

Jacopo Cappellato
David, all,

I think that an issue was introduced in rev. 6080 in the widget-form.xsd
file (see attached svn commit log).

When it is parsed I get the following errors:

Checking file:/D:/ofbiz/ofbiz/framework/widget/dtd/widget-form.xsd...
src-resolve: Cannot resolve the name 'condition-object' to a(n) 'element
declaration' component. [1.015]
src-resolve: Cannot resolve the name 'condition-object' to a(n) 'element
declaration' component. [1.143]
src-resolve: Cannot resolve the name 'condition-object' to a(n) 'element
declaration' component. [1.173]
XML validation finished.

As the messages suggest, the "condition-object" element declaration is
missing...

Any hints on how to solve this?

Thanks,

Jacopo

Author: jonesde
Date: 2005-11-05 21:57:57 -0600 (Sat, 05 Nov 2005)
New Revision: 6080

Modified:
   trunk/framework/widget/dtd/widget-form.xsd
   trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
Log:
Added missing condition-object defs for form widget; fixed issue with get-related when the source doesn't exist

Modified: trunk/framework/widget/dtd/widget-form.xsd
===================================================================
--- trunk/framework/widget/dtd/widget-form.xsd 2005-11-05 15:26:59 UTC (rev 6079)
+++ trunk/framework/widget/dtd/widget-form.xsd 2005-11-06 03:57:57 UTC (rev 6080)
@@ -1012,6 +1012,7 @@
                 <xs:choice minOccurs="0">
                     <xs:element ref="condition-expr"/>
                     <xs:element ref="condition-list"/>
+                    <xs:element ref="condition-object"/>
                 </xs:choice>
                 <xs:element minOccurs="0" ref="having-condition-list"/>
                 <xs:element minOccurs="0" maxOccurs="unbounded" ref="select-field"/>
@@ -1139,6 +1140,7 @@
             <xs:choice maxOccurs="unbounded">
                 <xs:element ref="condition-expr"/>
                 <xs:element ref="condition-list"/>
+                <xs:element ref="condition-object"/>
             </xs:choice>
             <xs:attributeGroup ref="attlist.condition-list"/>
         </xs:complexType>
@@ -1168,6 +1170,7 @@
             <xs:choice maxOccurs="unbounded">
                 <xs:element ref="condition-expr"/>
                 <xs:element ref="condition-list"/>
+                <xs:element ref="condition-object"/>
             </xs:choice>
             <xs:attributeGroup ref="attlist.having-condition-list"/>
         </xs:complexType>

Modified: trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
===================================================================
--- trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java 2005-11-05 15:26:59 UTC (rev 6079)
+++ trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java 2005-11-06 03:57:57 UTC (rev 6080)
@@ -541,16 +541,16 @@
 
         public void runAction(Map context) {
             Object valueObject = valueNameAcsr.get(context);
+            if (valueObject == null) {
+                Debug.logVerbose("Value not found with name: " + valueNameAcsr + ", not getting related...", module);
+                return;
+            }
             if (!(valueObject instanceof GenericValue)) {
                 String errMsg = "Env variable for value-name " + valueNameAcsr.toString() + " is not a GenericValue object; for the relation-name: " + relationName + "]";
                 Debug.logError(errMsg, module);
                 throw new IllegalArgumentException(errMsg);
             }
             GenericValue value = (GenericValue) valueObject;
-            if (value == null) {
-                Debug.logWarning("Value not found with name: " + valueNameAcsr + ", not getting related...", module);
-                return;
-            }
             try {
                 if (useCache) {
                     toValueNameAcsr.put(context, value.getRelatedOneCache(relationName));

 
_______________________________________________
Svn mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/svn


 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: [OFBiz] Dev - [Fwd: [OFBiz] SVN: r6080 - in trunk/framework/widget: dtd src/org/ofbiz/widget/screen]

David E. Jones

Thanks Jacopo, I had seen this but forgot about it... It was  
happening because while I put the lines in the XSD file to refer to  
the condition-object element I didn't move over the definition of the  
condition-object element. That is now in SVN, rev 6116.

-David


On Nov 12, 2005, at 1:10 AM, Jacopo Cappellato wrote:

> David, all,
>
> I think that an issue was introduced in rev. 6080 in the widget-
> form.xsd file (see attached svn commit log).
>
> When it is parsed I get the following errors:
>
> Checking file:/D:/ofbiz/ofbiz/framework/widget/dtd/widget-form.xsd...
> src-resolve: Cannot resolve the name 'condition-object' to a(n)  
> 'element declaration' component. [1.015]
> src-resolve: Cannot resolve the name 'condition-object' to a(n)  
> 'element declaration' component. [1.143]
> src-resolve: Cannot resolve the name 'condition-object' to a(n)  
> 'element declaration' component. [1.173]
> XML validation finished.
>
> As the messages suggest, the "condition-object" element declaration  
> is missing...
>
> Any hints on how to solve this?
>
> Thanks,
>
> Jacopo
>
> From: [hidden email]
> Date: November 5, 2005 8:58:24 PM MST
> To: [hidden email]
> Subject: [OFBiz] SVN: r6080 - in trunk/framework/widget: dtd src/
> org/ofbiz/widget/screen
> Reply-To: "OFBiz SVN Commit Notifications (High Traffic)"  
> <[hidden email]>
>
>
> Author: jonesde
> Date: 2005-11-05 21:57:57 -0600 (Sat, 05 Nov 2005)
> New Revision: 6080
>
> Modified:
>    trunk/framework/widget/dtd/widget-form.xsd
>    trunk/framework/widget/src/org/ofbiz/widget/screen/
> ModelScreenAction.java
> Log:
> Added missing condition-object defs for form widget; fixed issue  
> with get-related when the source doesn't exist
>
> Modified: trunk/framework/widget/dtd/widget-form.xsd
> ===================================================================
> --- trunk/framework/widget/dtd/widget-form.xsd 2005-11-05 15:26:59  
> UTC (rev 6079)
> +++ trunk/framework/widget/dtd/widget-form.xsd 2005-11-06 03:57:57  
> UTC (rev 6080)
> @@ -1012,6 +1012,7 @@
>                  <xs:choice minOccurs="0">
>                      <xs:element ref="condition-expr"/>
>                      <xs:element ref="condition-list"/>
> +                    <xs:element ref="condition-object"/>
>                  </xs:choice>
>                  <xs:element minOccurs="0" ref="having-condition-
> list"/>
>                  <xs:element minOccurs="0" maxOccurs="unbounded"  
> ref="select-field"/>
> @@ -1139,6 +1140,7 @@
>              <xs:choice maxOccurs="unbounded">
>                  <xs:element ref="condition-expr"/>
>                  <xs:element ref="condition-list"/>
> +                <xs:element ref="condition-object"/>
>              </xs:choice>
>              <xs:attributeGroup ref="attlist.condition-list"/>
>          </xs:complexType>
> @@ -1168,6 +1170,7 @@
>              <xs:choice maxOccurs="unbounded">
>                  <xs:element ref="condition-expr"/>
>                  <xs:element ref="condition-list"/>
> +                <xs:element ref="condition-object"/>
>              </xs:choice>
>              <xs:attributeGroup ref="attlist.having-condition-list"/>
>          </xs:complexType>
>
> Modified: trunk/framework/widget/src/org/ofbiz/widget/screen/
> ModelScreenAction.java
> ===================================================================
> --- trunk/framework/widget/src/org/ofbiz/widget/screen/
> ModelScreenAction.java 2005-11-05 15:26:59 UTC (rev 6079)
> +++ trunk/framework/widget/src/org/ofbiz/widget/screen/
> ModelScreenAction.java 2005-11-06 03:57:57 UTC (rev 6080)
> @@ -541,16 +541,16 @@
>
>          public void runAction(Map context) {
>              Object valueObject = valueNameAcsr.get(context);
> +            if (valueObject == null) {
> +                Debug.logVerbose("Value not found with name: " +  
> valueNameAcsr + ", not getting related...", module);
> +                return;
> +            }
>              if (!(valueObject instanceof GenericValue)) {
>                  String errMsg = "Env variable for value-name " +  
> valueNameAcsr.toString() + " is not a GenericValue object; for the  
> relation-name: " + relationName + "]";
>                  Debug.logError(errMsg, module);
>                  throw new IllegalArgumentException(errMsg);
>              }
>              GenericValue value = (GenericValue) valueObject;
> -            if (value == null) {
> -                Debug.logWarning("Value not found with name: " +  
> valueNameAcsr + ", not getting related...", module);
> -                return;
> -            }
>              try {
>                  if (useCache) {
>                      toValueNameAcsr.put(context,  
> value.getRelatedOneCache(relationName));
>
>
> _______________________________________________
> Svn mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/svn
>
>
>
>
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev