On Feb 5, 2008, at 11:58 PM, Sumit Pandit wrote:
> Hello All,
>
> Look at this code :-
>
> controller entry :-
> <request-map uri="showFixedAssetDepreciation">
> <security https="true" auth="true"/>
> <event type="simple" invoke="calculateFixedAssetDepreciation"
> path="org/ofbiz/accounting/fixedasset/FixedAssetServices.xml"/>
> <response name="success" type="view"
> value="ShowFixedAssetDepreciation"/>
> <response name="depreciationMtdNotAvail" type="request"
> value="depreciationMethodAssignment"/>
> <response name="error" type="view"
> value="ShowFixedAssetDepreciation"/>
> </request-map>
>
> For such responce i use following code in simple method :-
> <add-error><fail-property resource="AccountingUiLabels"
> property="AccountingReqDepMtdAssignment"/></add-error>
> <check-errors error-code="depreciationMtdNotAvail"/>
>
> After execution of these lines the code is returned successfully and
> request
> "depreciationMethodAssignment" is called properly but the error
> message
> which I added is not being displayed. But if I simply use <check-
> errors/>
> than the added error is displayed properly.
>
> Can some one suggest me that if i missed something.
>
> Thanks for suggestion.
Does the depreciationMethodAssignment request have an event associated
with it? If so that could be interfering with the error message. In
other words, the depreciationMtdNotAvail response goes to a request
where the error response goes to a view, and those could do very
different things.
-David