ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexey Gorbachev ...@inbox.ru>
Subject Re[2]: Using entity-auto
Date Tue, 31 Mar 2015 19:13:57 GMT

Hi!
Thanks Peter Arnold ( parnold@paec.cl ) for help. After commenting 

<!-- <permission-service service-name="basePermissionCheck"
main-action="UPDATE"/> -->

update works, so problem was with the permission-service.

But "create" doesn't work.
I created special test enitity definition to test create 
    <entity entity-name="Test" package-name="org.ofbiz.test" title="One record for each
test element">
        <field name="idf" type="id-ne"></field>
        <field name="number" type="numeric"></field>

        <prim-key field="idf"/>
    </entity>
and added it to form

    <form name="CreateTestForm" type="single" target="createTest">
          <auto-fields-service service-name="createTest"/>
          <field name="submitButton" title="Create" widget-style="smallSubmit"><submit
button-type="button"/></field>
    </form>

screens
    <screen name="TestForm">
            <section>
                <actions>
                    <set field="headerItem" value="personForm"/>
                    <set field="titleProperty" value="PageTitlePracticePersonForm"/>
                </actions>
                <widgets>
                    <decorator-screen name="CommonWarrantDecorator" location="${parameters.commonDecoratorLocation}">
                        <decorator-section name="body">
                            <label text="Test List" style="h2"/>
                            <include-form name="CreateTestForm"
location="component://rt/widget/WarrantForms.xml"></include-form>
                        </decorator-section>
                    </decorator-screen>       
                </widgets>
            </section>
    </screen>

and controller
    <request-map uri="testform">
        <security https="true" auth="true"/>
        <event type="service" invoke="createTest"/>
        <response name="success" type="view" value="TestForm"/>
    </request-map>
    
    <request-map uri="createTest">
        <security https="true" auth="true"/>
        <event type="service" invoke="createTest"/>
        <response name="success" type="view" value="TestForm"/>
    </request-map>

Form appeared, but after clicking on create button nothing was added (I tried to view added
data in webtools -> Entity Engine)

Best regards, Alexey.


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message