[OFBiz] Dev - Arrays of Form Elements

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

[OFBiz] Dev - Arrays of Form Elements

Ihrig, Jens (Key-Work)
I have following Problem:
I need to send 2 (or perphaps more) form-fields with the same fieldname
via a ofbiz form.
The result should lead into a list which is the parameter of a service.

This should look like this :


----
Excerpt from form-def

<form ...>

<!-- other form fields-->

<field position="1" name="applicableProductTypeId"
title="${uiLabelMap.SVCApplicability}">
            <drop-down allow-empty="false">
                                <entity-options
entity-name="ProductTypeAndAttributes" key-field-name="productTypeId"
description="${description}" >        
                                        <entity-constraint
name="attrName" value="Selectable4SVCApplicabilty"/>
                                        <entity-order-by
field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
               
               
<field position="1" name="applicableProductTypeId" title=" ">

                <drop-down allow-empty="true">
                                <entity-options
entity-name="ProductTypeAndAttributes" key-field-name="productTypeId"
description="${description}" >        
                                        <entity-constraint
name="attrName" value="Selectable4SVCApplicabilty"/>
                                        <entity-order-by
field-name="description"/>
                </entity-options>
            </drop-down>
</field>


<!-- other form fields -->

</form>
-----

----
Excerpt from service-def
<services>
        <service name="createSVC" default-entity-name="Product"
engine="group"
                location="createSVC" invoke="" auth="true">
        <description>Create a Service</description>
        <implements service="interfaceProduct"/>
                <auto-attributes include="pk" mode="INOUT"
optional="true"/>
                <attribute name="productTypeId" type="String" mode="IN"
optional="false" />
                <attribute name="description" type="String" mode="IN"
optional="false" />
                <attribute name="longDescription" type="String"
mode="IN" optional="true" />
                <attribute name="isPhoto" type="String" mode="IN"
optional="true" />
                <attribute name="nocDependant" type="String" mode="IN"
optional="true" />
                <attribute name="applicableProductTypeId" type="List"
mode="IN" optional="true" />
    </service>
</services>

----



Is this possible somehow ?
 



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