list minilang question

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

list minilang question

marceloh

I need to program a service that retrieves a list of genericValues from the database using find-by-and tag and calculates a new value for each genercValue. How can I include this new column in the result list to be consumed in a table (form type "list") of a form?

Thanks
Marcelo
Reply | Threaded
Open this post in threaded view
|

Re: list minilang question

David E Jones-2

The best way is probably to create a List of Maps, each Map  
containing the GenericValue object and other derived or looked up  
values.

-David


On Oct 29, 2006, at 9:32 PM, marceloh wrote:

> I need to program a service that retrieves a list of genericValues  
> from the
> database using find-by-and tag and calculates a new value for each
> genercValue. How can I include this new column in the result list  
> to be
> consumed in a table (form type "list") of a form?
>
> Thanks
> Marcelo
> --
> View this message in context: http://www.nabble.com/list-minilang- 
> question-tf2537347.html#a7069002
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>

Reply | Threaded
Open this post in threaded view
|

Re: list minilang question

cjhowe
In reply to this post by marceloh
try something like this:
<entity-and entity-name="FooEntity"
list-name="barList">
    <field-map field="bazField"/>
</entity-and>
<iterate list-name="barList" entry-name="quxEntry">
    <create-object class-name="java.util.HashMap"
field-name="quuxField">
        <field field-name="quxEntry"
type="java.util.Map"/>
    </create-object>
    <set field="quuxField.extraField" value="QUUUX"/>
    <field-to-list list-name="myFinalList"
field-name="quuxField"/>
</iterate>


--- marceloh <[hidden email]> wrote:

>
>
> I need to program a service that retrieves a list of
> genericValues from the
> database using find-by-and tag and calculates a new
> value for each
> genercValue. How can I include this new column in
> the result list to be
> consumed in a table (form type "list") of a form?
>
> Thanks
> Marcelo
> --
> View this message in context:
>
http://www.nabble.com/list-minilang-question-tf2537347.html#a7069002
> Sent from the OFBiz - User mailing list archive at
> Nabble.com.
>
>

Reply | Threaded
Open this post in threaded view
|

Re: list minilang question

marceloh
I've tried your suggestion. Perfect !!!
Thanks.
Marcelo
--------------------

cjhowe wrote
try something like this:
<entity-and entity-name="FooEntity"
list-name="barList">
    <field-map field="bazField"/>
</entity-and>
<iterate list-name="barList" entry-name="quxEntry">
    <create-object class-name="java.util.HashMap"
field-name="quuxField">
        <field field-name="quxEntry"
type="java.util.Map"/>
    </create-object>
    <set field="quuxField.extraField" value="QUUUX"/>
    <field-to-list list-name="myFinalList"
field-name="quuxField"/>
</iterate>


--- marceloh <marcelo_hamra@hotmail.com> wrote:

>
>
> I need to program a service that retrieves a list of
> genericValues from the
> database using find-by-and tag and calculates a new
> value for each
> genercValue. How can I include this new column in
> the result list to be
> consumed in a table (form type "list") of a form?
>
> Thanks
> Marcelo
> --
> View this message in context:
>
http://www.nabble.com/list-minilang-question-tf2537347.html#a7069002
> Sent from the OFBiz - User mailing list archive at
> Nabble.com.
>
>