You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by ian tabangay <it...@gmail.com> on 2008/04/01 12:54:29 UTC

Defining a required parameter

Hi.
I would like to ask where a parameter whose mode value is OUT and optional
value is false for the attribute element in the service xml definition
whould be defined.

like:
*<attribute name="partyList" mode="OUT" type="List"/>*


Thank you for community's assistance to a noob like me.

~ ian

Re: Defining a required parameter

Posted by Valentina Sirkova <vs...@iguanait.com>.
On Tue, 2008-04-01 at 18:54 +0800, ian tabangay wrote:
> Hi.
> I would like to ask where a parameter whose mode value is OUT and optional
> value is false for the attribute element in the service xml definition
> whould be defined.
> 
> like:
> *<attribute name="partyList" mode="OUT" type="List"/>*
> 
> 
> Thank you for community's assistance to a noob like me.
> 
> ~ ian
Hi,

Yes this is correct as by default parameters are required. If you want
to make it optional then you would have to set optional to true.

<attribute name="partyList" mode="OUT" type="List" optional="true"/>

There are plenty of examples on that in the framework, just browse thru
the services.xml definitions, and also have a look here - very good
examples http://ofbiz.apache.org/docs/services.html

Valentina