0

I am trying to use default CRUD operation functionalists provided by ofbiz entity engine in a custom component for a custom entity, this is the screen in ProjectScreens.xml :

<screen name="main">
    <section>
        <actions>
            <set field="headerItem" value="main"/><!-- this highlights the selected menu-item with name "main" -->
        </actions>
        <widgets>
            <decorator-screen name="ProjectCommonDecorator" location="${parameters.mainDecoratorLocation}">
                <decorator-section name="body">

                    <label style="h3" text="show division entity here.."></label>

                </decorator-section>
            </decorator-screen>
        </widgets>
    </section>
</screen>

Instead of label I want to show a screen which will have a table showing all division from database and it will have all options for CRUD. Just like a screen provided by default Entity engine for a entity :

enter image description here

Is there a way to use default options or I have to write services. It can also work if a hyperlink from my custom component goes to this screen of entity engine.

Naveen
  • 773
  • 3
  • 17
  • 40

1 Answers1

0

Yes. You will have to use service for this. The quickest way is to use entity auto method instead of simple methods for writing service. The entity auto just requires in and out parameters and performs rest of the stuff itself. Ofbiz does not provide any scaffolding like functionality which could generate code for basic CRUD (as grails and other frameworks do). For this you can refer example component which is available in trunk branch (not in released version) and look for create and edit example services. They have entity auto examples.

Ejaz Ahmed
  • 654
  • 4
  • 17