You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by tej minhas <mi...@gmail.com> on 2007/03/01 01:36:00 UTC
should an attribute in the service def appear in parameters?
My service def is:
<service name="createQuickQuoteItem" default-entity-name="QuoteItem"
engine="simple"
location="org/ofbiz/order/quote/QuoteServices.xml"
invoke="createQuickQuoteItem" auth="true">
<description>Create a Quick Quote Item</description>
<auto-attributes include="pk" mode="INOUT" optional="true"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
<attribute name="distDiscount" type="String" mode="IN"
optional="true"/>
</service>
My form that invokes the service is:
<form name="EditQuickQuoteItem" type="single"
target="createQuickQuoteItem?distDiscount=${distDiscount}" title=""
default-map-name="quoteItem"
default-title-style="tableheadtext"
default-widget-style="inputBox" default-tooltip-style="tabletext">
<actions>
<set field="quoteItemSeqId" value="${}"/>
<set field="productId" value="${}"/>
<set field="quantity" value="${}"/>
<set field="quoteUnitPrice" value="${}"/>
<set field="estimatedDeliveryDate" value="${}"/>
<set field="comments" value="${}"/>
<set field="distDiscount" value="5"/>
In the service itself:
<log level="info" message="================================>
parameters=[${parameters}]"/>
<log level="info" message="================================>
distDiscount=[${parameters.distDiscount}]"/>
But "parameters" does not contain "distDiscount".
What am I doing wrong (probably a long list..)? Thanks in advance.
Re: should an attribute in the service def appear in parameters?
Posted by Chris Howe <cj...@yahoo.com>.
a crude way to debug this to put the ${context} to the log. See if it
shows up anywhere and if it does, you can backtrace it to find out why
it is where it is.
--- tej minhas <mi...@gmail.com> wrote:
> My service def is:
>
> <service name="createQuickQuoteItem"
> default-entity-name="QuoteItem"
> engine="simple"
> location="org/ofbiz/order/quote/QuoteServices.xml"
> invoke="createQuickQuoteItem" auth="true">
> <description>Create a Quick Quote Item</description>
> <auto-attributes include="pk" mode="INOUT" optional="true"/>
> <auto-attributes include="nonpk" mode="IN" optional="true"/>
> <attribute name="distDiscount" type="String" mode="IN"
> optional="true"/>
> </service>
>
> My form that invokes the service is:
>
> <form name="EditQuickQuoteItem" type="single"
> target="createQuickQuoteItem?distDiscount=${distDiscount}" title=""
> default-map-name="quoteItem"
> default-title-style="tableheadtext"
> default-widget-style="inputBox" default-tooltip-style="tabletext">
> <actions>
> <set field="quoteItemSeqId" value="${}"/>
> <set field="productId" value="${}"/>
> <set field="quantity" value="${}"/>
> <set field="quoteUnitPrice" value="${}"/>
> <set field="estimatedDeliveryDate" value="${}"/>
> <set field="comments" value="${}"/>
>
> <set field="distDiscount" value="5"/>
>
> In the service itself:
>
> <log level="info" message="================================>
> parameters=[${parameters}]"/>
> <log level="info" message="================================>
> distDiscount=[${parameters.distDiscount}]"/>
>
>
>
> But "parameters" does not contain "distDiscount".
>
> What am I doing wrong (probably a long list..)? Thanks in advance.
>