[OFBiz] Users - Add Product to Category Error

Chris Howe cjhowe76013 at yahoo.com
Fri Mar 4 14:59:34 EST 2005


In the Catalog Manager, when adding a product to a Category there is nocheck to see if the product being added exists.  Upon submit theservice 

<service name="addProductToCategory" default-entity-name="ProductCategoryMember" engine="simple"
               location="org/ofbiz/product/category/CategoryServices.xml"invoke="addProductToCategory" auth="true">
        <description>Add Product To Category</description>
        <auto-attributes include="pk" mode="IN" optional="false"/>
        <auto-attributes include="nonpk" mode="IN" optional="true"/>
        <override name="fromDate" optional="true"/>
    </service>

is run which runs the simple mehtod...

    <simple-method method-name="addProductToCategory" short-description="Add Product to Category">
        <!-- note that the securitysemantics require the user to have the general admin permission,
            or the rolelimited permission and association with the category, not the product-->
        <string-to-field string="addProductToCategory" field-name="callingMethodName"/>
        <string-to-field string="CREATE" field-name="checkAction"/>
        <call-simple-method method-name="checkCategoryRelatedPermission"/>
        <check-errors/>

        <make-value value-name="newEntity" entity-name="ProductCategoryMember"/>
        <set-pk-fields map-name="parameters" value-name="newEntity"/>
        <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
        
        <if-empty field-name="fromDate" map-name="newEntity">
            <now-timestamp-to-env env-name="nowTimestamp"/>
           <env-to-field env-name="nowTimestamp" field-name="fromDate"map-name="newEntity"/>
        </if-empty>
        
        <create-value value-name="newEntity"/>
    </simple-method>


I haven't gone into the entity or service engine deep enough to know where the form validation should go

		
---------------------------------
Celebrate Yahoo!'s 10th Birthday! 
 Yahoo! Netrospective: 100 Moments of the Web 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ofbiz.org/pipermail/users/attachments/20050304/6ae3fb37/attachment.htm


More information about the Users mailing list