Question related to simple method usage

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

Question related to simple method usage

Chen Xi
Hi:
   I am currently involved developing project with ofbiz framework. In
create/update entity process, I adopt simple method to achieve. Simple
method is efficient, however I have some question to ask about the usage of
it.
   1. If I try to identify the duplicate record which is not the PK, can
someone provide the sample code which can check the duplicate record by
using simple method?
   2. Once I successfully create/update the record, I wish to create the
confirm message to inform user that the record has been successfully
created/updated. In the simple method syntax, how to apply this feature?

Regards
   Chen Xi
Reply | Threaded
Open this post in threaded view
|

Re: Question related to simple method usage

BJ Freeman
simple methods is based on minilang.
http://docs.ofbiz.org/display/OFBIZ/Mini-Language+Guide
simple-methods as events or services.

1) look up simple methods that have the find-by. if the entity is
properly defined, there should not be duplicate records.

2)in orderreturnservices.xml
       <set field="responseMessage" value="Return Request
#${newEntity.returnId} was created successfully."/>
        <field-to-result field-name="responseMessage"
result-name="successMessage"/>



Chen Xi sent the following on 12/29/2007 1:47 AM:

> Hi:
>    I am currently involved developing project with ofbiz framework. In
> create/update entity process, I adopt simple method to achieve. Simple
> method is efficient, however I have some question to ask about the usage of
> it.
>    1. If I try to identify the duplicate record which is not the PK, can
> someone provide the sample code which can check the duplicate record by
> using simple method?
>    2. Once I successfully create/update the record, I wish to create the
> confirm message to inform user that the record has been successfully
> created/updated. In the simple method syntax, how to apply this feature?
>
> Regards
>    Chen Xi
>