You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Scott Gray <sc...@hotwaxmedia.com> on 2010/08/16 03:41:21 UTC

Re: svn commit: r985745 - in /ofbiz/trunk/applications/product: script/org/ofbiz/product/category/CategoryServices.xml servicedef/services_view.xml

Hi Jacques,

Is this service not used anywhere?  It doesn't look like you've updated any calling code.

Thanks
Scott

HotWax Media
http://www.hotwaxmedia.com

On 16/08/2010, at 8:25 AM, jleroux@apache.org wrote:

> Author: jleroux
> Date: Sun Aug 15 20:25:01 2010
> New Revision: 985745
> 
> URL: http://svn.apache.org/viewvc?rev=985745&view=rev
> Log:
> Uses a better syntax w/out any fixed naming conventions. Thanks to Andrew. More to come soon in Example component.
> 
> Modified:
>    ofbiz/trunk/applications/product/script/org/ofbiz/product/category/CategoryServices.xml
>    ofbiz/trunk/applications/product/servicedef/services_view.xml
> 
> Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/category/CategoryServices.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/category/CategoryServices.xml?rev=985745&r1=985744&r2=985745&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/product/script/org/ofbiz/product/category/CategoryServices.xml (original)
> +++ ofbiz/trunk/applications/product/script/org/ofbiz/product/category/CategoryServices.xml Sun Aug 15 20:25:01 2010
> @@ -843,7 +843,7 @@ under the License.
> 
>     <!-- To help dynamically populate a products dropdown given a product category id from a change in another dropdown, possibly sorted on sequenceNum -->    
>     <simple-method method-name="getAssociatedProductsList" short-description="Set the product options for selected product category" login-required="false">
> -        <set field="parameters.categoryId" from-field="parameters.mainId"/>
> +        <set field="parameters.categoryId" from-field="parameters.productCategoryId"/>
>         <set-service-fields service-name="getProductCategoryMembers" map="parameters" to-map="getProductCategoryMembersMap"/>        
>         <call-service service-name="getProductCategoryMembers" in-map-name="getProductCategoryMembersMap">
>             <result-to-field result-name="categoryMembers" field="productsList"/>
> @@ -856,13 +856,13 @@ under the License.
>                 <field-map field-name="productId" from-field="productMember.productId"/>
>             </entity-one>
>             <set field="productName" value="${product.internalName}: ${product.productId}"/>
> -            <field-to-list list="valuesList" field="productName"/>
> +            <field-to-list list="products" field="productName"/>
>         </iterate>
> -        <if-empty field="valuesList">
> +        <if-empty field="products">
>             <property-to-field resource="ProductUiLabels" property="ProductNoProducts" field="noOption"/>
> -            <field-to-list list="valuesList" field="noOption"/>
> +            <field-to-list list="products" field="noOption"/>
>         </if-empty>
> -        <field-to-result field="valuesList"/>
> +        <field-to-result field="products"/>
>     </simple-method>
> 
> </simple-methods>
> 
> Modified: ofbiz/trunk/applications/product/servicedef/services_view.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_view.xml?rev=985745&r1=985744&r2=985745&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/product/servicedef/services_view.xml (original)
> +++ ofbiz/trunk/applications/product/servicedef/services_view.xml Sun Aug 15 20:25:01 2010
> @@ -119,8 +119,8 @@ under the License.
> 
>     <service name="getAssociatedProductsList" engine="simple" auth="false"
>         location="component://product/script/org/ofbiz/product/category/CategoryServices.xml" invoke="getAssociatedProductsList">
> -        <attribute name="mainId" mode="IN" type="String" optional="false"/>
> -        <attribute name="valuesList" mode="OUT" type="java.util.List"/>
> +        <attribute name="productCategoryId" mode="IN" type="String" optional="false"/>
> +        <attribute name="products" mode="OUT" type="java.util.List"/>
>     </service>
> 
>     <service name="getPreviousNextProducts" engine="java"
> 
> 


Re: svn commit: r985745 - in /ofbiz/trunk/applications/product: script/org/ofbiz/product/category/CategoryServices.xml servicedef/services_view.xml

Posted by Jacques Le Roux <ja...@les7arts.com>.
Hi Scott,

It's done at r986370

Jacques

Scott Gray wrote:
> Hi Jacques,
>
> Is this service not used anywhere?  It doesn't look like you've updated any calling code.
>
> Thanks
> Scott
>
> HotWax Media
> http://www.hotwaxmedia.com
>
> On 16/08/2010, at 8:25 AM, jleroux@apache.org wrote:
>
>> Author: jleroux
>> Date: Sun Aug 15 20:25:01 2010
>> New Revision: 985745
>>
>> URL: http://svn.apache.org/viewvc?rev=985745&view=rev
>> Log:
>> Uses a better syntax w/out any fixed naming conventions. Thanks to Andrew. More to come soon in Example component.
>>
>> Modified:
>>    ofbiz/trunk/applications/product/script/org/ofbiz/product/category/CategoryServices.xml
>>    ofbiz/trunk/applications/product/servicedef/services_view.xml
>>
>> Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/category/CategoryServices.xml
>> URL:
>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/category/CategoryServices.xml?rev=985745&r1=985744&r2=985745&view=diff
>> ============================================================================== ---
>> ofbiz/trunk/applications/product/script/org/ofbiz/product/category/CategoryServices.xml (original) +++
>> ofbiz/trunk/applications/product/script/org/ofbiz/product/category/CategoryServices.xml Sun Aug 15 20:25:01 2010 @@ -843,7
>> +843,7 @@ under the License.
>>
>>     <!-- To help dynamically populate a products dropdown given a product category id from a change in another dropdown,
>>     possibly sorted on sequenceNum --> <simple-method method-name="getAssociatedProductsList" short-description="Set the product
>> options for selected product category" login-required="false"> -        <set field="parameters.categoryId"
>> from-field="parameters.mainId"/> +        <set field="parameters.categoryId" from-field="parameters.productCategoryId"/>
>>         <set-service-fields service-name="getProductCategoryMembers" map="parameters" to-map="getProductCategoryMembersMap"/>
>>         <call-service service-name="getProductCategoryMembers" in-map-name="getProductCategoryMembersMap">
>>             <result-to-field result-name="categoryMembers" field="productsList"/>
>> @@ -856,13 +856,13 @@ under the License.
>>                 <field-map field-name="productId" from-field="productMember.productId"/>
>>             </entity-one>
>>             <set field="productName" value="${product.internalName}: ${product.productId}"/>
>> -            <field-to-list list="valuesList" field="productName"/>
>> +            <field-to-list list="products" field="productName"/>
>>         </iterate>
>> -        <if-empty field="valuesList">
>> +        <if-empty field="products">
>>             <property-to-field resource="ProductUiLabels" property="ProductNoProducts" field="noOption"/>
>> -            <field-to-list list="valuesList" field="noOption"/>
>> +            <field-to-list list="products" field="noOption"/>
>>         </if-empty>
>> -        <field-to-result field="valuesList"/>
>> +        <field-to-result field="products"/>
>>     </simple-method>
>>
>> </simple-methods>
>>
>> Modified: ofbiz/trunk/applications/product/servicedef/services_view.xml
>> URL:
>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_view.xml?rev=985745&r1=985744&r2=985745&view=diff
>> ============================================================================== ---
>> ofbiz/trunk/applications/product/servicedef/services_view.xml (original) +++
>> ofbiz/trunk/applications/product/servicedef/services_view.xml Sun Aug 15 20:25:01 2010 @@ -119,8 +119,8 @@ under the License.
>>
>>     <service name="getAssociatedProductsList" engine="simple" auth="false"
>>         location="component://product/script/org/ofbiz/product/category/CategoryServices.xml" invoke="getAssociatedProductsList">
>> -        <attribute name="mainId" mode="IN" type="String" optional="false"/>
>> -        <attribute name="valuesList" mode="OUT" type="java.util.List"/>
>> +        <attribute name="productCategoryId" mode="IN" type="String" optional="false"/>
>> +        <attribute name="products" mode="OUT" type="java.util.List"/>
>>     </service>
>>
>>     <service name="getPreviousNextProducts" engine="java" 



Re: svn commit: r985745 - in /ofbiz/trunk/applications/product: script/org/ofbiz/product/category/CategoryServices.xml servicedef/services_view.xml

Posted by Jacques Le Roux <ja...@les7arts.com>.
Hi Scott,

No, not yet, as I said  "More to come soon in Example component." It will be used for dependent dropdowns examples in form widget 
there with also country/states examples. Country/states is a better examples because we now the size, for category/products it can 
be used OOTB and maybe in some custom cases. But if there are too much products (or even categories) then it's not a good idea. It's 
Prototype based but, I checked, switching to jQuery is easy (like most of other things).

BTW, apart the tree do you know if we use much Dojo OOTB? It looks like it's more Prototype.

Jacques

Scott Gray wrote:
> Hi Jacques,
>
> Is this service not used anywhere?  It doesn't look like you've updated any calling code.
>
> Thanks
> Scott
>
> HotWax Media
> http://www.hotwaxmedia.com
>
> On 16/08/2010, at 8:25 AM, jleroux@apache.org wrote:
>
>> Author: jleroux
>> Date: Sun Aug 15 20:25:01 2010
>> New Revision: 985745
>>
>> URL: http://svn.apache.org/viewvc?rev=985745&view=rev
>> Log:
>> Uses a better syntax w/out any fixed naming conventions. Thanks to Andrew. More to come soon in Example component.
>>
>> Modified:
>>    ofbiz/trunk/applications/product/script/org/ofbiz/product/category/CategoryServices.xml
>>    ofbiz/trunk/applications/product/servicedef/services_view.xml
>>
>> Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/category/CategoryServices.xml
>> URL:
>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/category/CategoryServices.xml?rev=985745&r1=985744&r2=985745&view=diff
>> ============================================================================== ---
>> ofbiz/trunk/applications/product/script/org/ofbiz/product/category/CategoryServices.xml (original) +++
>> ofbiz/trunk/applications/product/script/org/ofbiz/product/category/CategoryServices.xml Sun Aug 15 20:25:01 2010 @@ -843,7
>> +843,7 @@ under the License.
>>
>>     <!-- To help dynamically populate a products dropdown given a product category id from a change in another dropdown,
>>     possibly sorted on sequenceNum --> <simple-method method-name="getAssociatedProductsList" short-description="Set the product
>> options for selected product category" login-required="false"> -        <set field="parameters.categoryId"
>> from-field="parameters.mainId"/> +        <set field="parameters.categoryId" from-field="parameters.productCategoryId"/>
>>         <set-service-fields service-name="getProductCategoryMembers" map="parameters" to-map="getProductCategoryMembersMap"/>
>>         <call-service service-name="getProductCategoryMembers" in-map-name="getProductCategoryMembersMap">
>>             <result-to-field result-name="categoryMembers" field="productsList"/>
>> @@ -856,13 +856,13 @@ under the License.
>>                 <field-map field-name="productId" from-field="productMember.productId"/>
>>             </entity-one>
>>             <set field="productName" value="${product.internalName}: ${product.productId}"/>
>> -            <field-to-list list="valuesList" field="productName"/>
>> +            <field-to-list list="products" field="productName"/>
>>         </iterate>
>> -        <if-empty field="valuesList">
>> +        <if-empty field="products">
>>             <property-to-field resource="ProductUiLabels" property="ProductNoProducts" field="noOption"/>
>> -            <field-to-list list="valuesList" field="noOption"/>
>> +            <field-to-list list="products" field="noOption"/>
>>         </if-empty>
>> -        <field-to-result field="valuesList"/>
>> +        <field-to-result field="products"/>
>>     </simple-method>
>>
>> </simple-methods>
>>
>> Modified: ofbiz/trunk/applications/product/servicedef/services_view.xml
>> URL:
>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_view.xml?rev=985745&r1=985744&r2=985745&view=diff
>> ============================================================================== ---
>> ofbiz/trunk/applications/product/servicedef/services_view.xml (original) +++
>> ofbiz/trunk/applications/product/servicedef/services_view.xml Sun Aug 15 20:25:01 2010 @@ -119,8 +119,8 @@ under the License.
>>
>>     <service name="getAssociatedProductsList" engine="simple" auth="false"
>>         location="component://product/script/org/ofbiz/product/category/CategoryServices.xml" invoke="getAssociatedProductsList">
>> -        <attribute name="mainId" mode="IN" type="String" optional="false"/>
>> -        <attribute name="valuesList" mode="OUT" type="java.util.List"/>
>> +        <attribute name="productCategoryId" mode="IN" type="String" optional="false"/>
>> +        <attribute name="products" mode="OUT" type="java.util.List"/>
>>     </service>
>>
>>     <service name="getPreviousNextProducts" engine="java"