minilang question

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

minilang question

Carlos Villavicencio
Hello, I was reading the exaple component and then in ExampleForms.xml file,
in the ListExamples form, there is an action where it brings data from the
Example table (entity), how I can add conditions like "where" or something
more customized?

Is there any detailed manual / tutorial with all this things that we
beginners need to start develop in ofbiz. I'm totally lost.

Thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: minilang question

Rashko Rejmer
Hi Carlos,

In the action you have this code:
 <entity-condition entity-name="Example"><order-by
field-name="exampleName"/></entity-condition>

You can add expressions to entity-condition element like this
<entity-condition entity-name="Example">
               <condition-expr field-name="exampleTypeId"
operator="equals" value="REAL_WORLD"/>
               <order-by field-name="exampleName"/>
            </entity-condition>
You can also combine many condition expressions using <condition-list>
element.

I am not sure if introduction videos cover this but you can check:
http://docs.ofbiz.org/display/OFBTECH/Framework+Introduction+Videos+and
+Diagrams

Regards,
Rashko Rejmer

On Mon, 2008-06-02 at 11:07 -0500, Carlos Villavicencio wrote:
> Hello, I was reading the exaple component and then in ExampleForms.xml file,
> in the ListExamples form, there is an action where it brings data from the
> Example table (entity), how I can add conditions like "where" or something
> more customized?
>
> Is there any detailed manual / tutorial with all this things that we
> beginners need to start develop in ofbiz. I'm totally lost.
>
> Thanks in advance.

Reply | Threaded
Open this post in threaded view
|

Re: minilang question

Jacques Le Roux
Administrator
For minilang I will recommend to have an XML editor with completion.
To know more about that : http://docs.ofbiz.org/display/OFBIZ/Mini-Language+Guide (from
http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Documentation+Index). Look for "XML completion tool"
Else you may read annotations/documentation in simple-method.xsd but it will be a lot more tedious...

Jacques

From: "Rashko Rejmer" <[hidden email]>

> Hi Carlos,
>
> In the action you have this code:
> <entity-condition entity-name="Example"><order-by
> field-name="exampleName"/></entity-condition>
>
> You can add expressions to entity-condition element like this
> <entity-condition entity-name="Example">
>               <condition-expr field-name="exampleTypeId"
> operator="equals" value="REAL_WORLD"/>
>               <order-by field-name="exampleName"/>
>            </entity-condition>
> You can also combine many condition expressions using <condition-list>
> element.
>
> I am not sure if introduction videos cover this but you can check:
> http://docs.ofbiz.org/display/OFBTECH/Framework+Introduction+Videos+and
> +Diagrams
>
> Regards,
> Rashko Rejmer
>
> On Mon, 2008-06-02 at 11:07 -0500, Carlos Villavicencio wrote:
>> Hello, I was reading the exaple component and then in ExampleForms.xml file,
>> in the ListExamples form, there is an action where it brings data from the
>> Example table (entity), how I can add conditions like "where" or something
>> more customized?
>>
>> Is there any detailed manual / tutorial with all this things that we
>> beginners need to start develop in ofbiz. I'm totally lost.
>>
>> Thanks in advance.
>