Hello,
Your example show an entity-auto service, which will, in this "invoke"
case, create a record in Example table.
If you look a bit further in the link you gave, you'll see :
|<service name=||"createPracticePerson"|
|default||-entity-name=||"Person"| |engine=||"simple"|
|location=||"component://practice/script/org/hotwax/practice/PracticeServices.xml"|
|invoke=||"createPracticePerson"| |auth=||"true"||>|
|<description>Create a Person</description>|
|<auto-attributes include=||"pk"| |mode=||"OUT"| |optional=||"false"||/>|
|<attribute name=||"salutation"| |mode=||"IN"| |type=||"String"|
|optional=||"true"||/>|
|<attribute name=||"firstName"| |mode=||"IN"| |type=||"String"|
|optional=||"false"||/>|
|<attribute name=||"middleName"| |mode=||"IN"| |type=||"String"|
|optional=||"true"||/>|
|<attribute name=||"lastName"| |mode=||"IN"| |type=||"String"|
|optional=||"false"||/>|
|<attribute name=||"suffix"| |mode=||"IN"| |type=||"String"|
|optional=||"true"||/>|
|</service>
Which is a minilang service, in these kind of services, you'll find
example to create more data.
But in you case, to fetch data into forms, it's best to use
<action></action> in screen/form widget, see there for more info
https://cwiki.apache.org/confluence/display/OFBIZ/Understanding+the+OFBiz+Widget+Toolkit
Or look for some examples in *Forms.xml files.
|
HTH
Gil
On 02/09/2015 15:09, Barou wrote:
Sorry about my new bee question.
I am not sure if I am in the right place.
When I look at Ofbiz doc I se many examples like the link below.
https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+Tutorial+-+A+Beginners+Development+Guide#OFBizTutorial-ABeginnersDevelopmentGuide-WritingCRUDOperations
for example:
<service name="createExample" default-entity-name="Example"
engine="entity-auto" invoke="create" auth="true">
<description>Create a Example</description>
<permission-service service-name="exampleGenericPermission"
main-action="CREATE"/>
<auto-attributes include="pk" mode="OUT" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
<override name="exampleTypeId" optional="false"/>
<override name="statusId" optional="false"/>
<override name="exampleName" optional="false"/>
</service>
How can I create service that read from several table ?
Is there a service already implemented in the ofbiz I can use for this
purpose ?
And how do I send user credentials from a form then used that to fetch the
records created for example in the product table ?
--
View this message in context:
http://ofbiz.135035.n4.nabble.com/Is-this-forum-only-for-experienced-Ofbizers-tp4671812.html
Sent from the OFBiz - User mailing list archive at Nabble.com.