ofbiz实战——实验项目批次管理界面以及代码

来源:互联网 发布:linux git 忽略文件夹 编辑:程序博客网 时间:2024/05/20 10:12

查询:


新增:


修改:


LabProjectBatchScreens.xml

<?xml version="1.0" encoding="UTF-8"?><screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"        xmlns="http://ofbiz.apache.org/Widget-Screen" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Screen http://ofbiz.apache.org/dtds/widget-screen.xsd"><screen name="FindLabProjectBatch">        <section>            <actions>                <set field="titleProperty" value="LabProjectBatchManange"/><set field="headerItem" value="LabProjectBatchManange"/>                <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/>                <property-to-field resource="widget" property="widget.form.defaultViewSize" field="viewSizeDefaultValue"/>                <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="${viewSizeDefaultValue}"/>            </actions>            <widgets>                <decorator-screen name="CommonBookingDecorator" location="component://booking/widget/booking/CommonScreens.xml">                    <decorator-section name="body">                        <section>                            <widgets>                                <decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">                                    <decorator-section name="menu-bar">                                        <container style="button-bar">                                            <link target="EditLabProjectBatch" text="${uiLabelMap.EditLabProjectBatch}" style="buttontext"/>                                        </container>                                    </decorator-section>                                    <decorator-section name="search-options">                                        <include-form name="FindLabProjectBatch" location="component://booking/widget/booking/LabProjectBatchForms.xml"/>                                    </decorator-section>                                    <decorator-section name="search-results">                                        <include-form name="ListFindLabProjectBatch" location="component://booking/widget/booking/LabProjectBatchForms.xml"/>                                    </decorator-section>                                </decorator-screen>                            </widgets>                        </section>                    </decorator-section>                </decorator-screen>            </widgets>        </section>    </screen><screen name="EditLabProjectBatch">        <section>            <actions>                <set field="titleProperty" value="LabProjectBatchManange"/>                <set field="headerItem" value="LabProjectBatchManange"/><entity-one entity-name="LabProjectBatch" value-field="labProjectBatch"/>            </actions>            <widgets>                <decorator-screen name="CommonBookingDecorator" location="${parameters.mainDecoratorLocation}">                    <decorator-section name="body"><container style="button-bar"><link target="FindLabProjectBatch" text="${uiLabelMap.CommonBack}" style="buttontext"/></container>                        <screenlet title="${groovy: parameters.batchId ? uiLabelMap.CommonEdit : uiLabelMap.CommonAdd}">                            <include-form name="EditLabProjectBatch" location="component://booking/widget/booking/LabProjectBatchForms.xml"/>                        </screenlet>                    </decorator-section>                </decorator-screen>            </widgets>        </section>    </screen><screen name="LookupLabProjetBatch">        <section>            <actions>                <property-map resource="BookingUiLabels" map-name="uiLabelMap" global="true"/>                <set field="title" value="${uiLabelMap.PageTitleLookupLabProjetBatch}"/>                <set field="queryString" from-field="result.queryString"/>                <set field="entityName" value="LabProjectBatchAndLabProjectAndTeacher"/>                <set field="searchFields" value="[batchId, proName, tchName]"/>            </actions>            <widgets>                <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">                    <decorator-section name="search-options">                        <include-form name="LookupLabProjetBatch" location="component://booking/widget/booking/LabProjetBatchForms.xml"/>                    </decorator-section>                    <decorator-section name="search-results">                        <include-form name="ListLookupLabProjetBatch" location="component://booking/widget/booking/LabProjetBatchForms.xml"/>                    </decorator-section>                </decorator-screen>            </widgets>        </section>    </screen></screens>


LabProjectBatchForms.xml

<?xml version="1.0" encoding="UTF-8"?><forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"         xmlns="http://ofbiz.apache.org/Widget-Form" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Form http://ofbiz.apache.org/dtds/widget-form.xsd">        <form name="FindLabProjectBatch" target="FindLabProjectBatch" title="" type="single"        header-row-style="header-row" default-table-style="basic-table"><field name="courseId" title="${uiLabelMap.BookingCourseId}"><lookup target-form-name="LookupCourse"/></field><field name="proId" title="${uiLabelMap.BookingLabProjectId}"><lookup target-form-name="LookupLabProject"/></field><field name="termName" title="${uiLabelMap.TermTermName}"><lookup target-form-name="LookupTerm"/></field><field name="tchId" title="${uiLabelMap.BookingTeacherTchId}"><lookup target-form-name="LookupTeacher"/></field><field name="address" title="${uiLabelMap.BookingLabProjectBatchAddress}"><text-find/></field><field name="capacity" title="${uiLabelMap.BookingLabProjectBatchCapacity}"><text-find/></field><field name="date" title="${uiLabelMap.BookingLabProjectBatchDate}"><date-find type="date" /></field><field name="classNO" title="${uiLabelMap.BookingLabProjectBatchClassNO}"><text-find/></field><field name="asured" title="${uiLabelMap.BookingLabProjectBatchAsured}">            <drop-down allow-empty="true" ><option key="Y" description="${uiLabelMap.CommonYes}"/>                <option key="N" description="${uiLabelMap.CommonNo}"/>            </drop-down>        </field>        <field name="submitButton" title="${uiLabelMap.CommonFind}"><submit/></field>    </form>    <form name="ListFindLabProjectBatch" list-name="listIt" title="" type="list" paginate-target="FindLabProjectBatch"        odd-row-style="alternate-row" default-table-style="basic-table hover-bar">        <actions>            <service service-name="performFind" result-map="result" result-map-list="listIt">                <field-map field-name="inputFields" from-field="requestParameters"/>                <field-map field-name="entityName" value="LabProjectBatchAndLabProjectAndTeacher"/>                <field-map field-name="viewIndex" from-field="viewIndex"/>                <field-map field-name="viewSize" from-field="viewSize"/><field-map field-name="noConditionFind" value="Y"/>            </service>        </actions><field name="batchId" title="${uiLabelMap.BookingLabProjectBatchId}"><display/></field><field name="courseName" title="${uiLabelMap.BookingCourseName}"><display/></field><field name="proName" title="${uiLabelMap.BookingLabProjectName}"><display/></field><field name="termName" title="${uiLabelMap.TermTermName}"><display/></field><field name="tchName" title="${uiLabelMap.BookingTeacherName}"><display/></field><field name="address" title="${uiLabelMap.BookingLabProjectBatchAddress}"><display/></field><field name="capacity" title="${uiLabelMap.BookingLabProjectBatchCapacity}"><display/></field><field name="bookingTotalNums" title="${uiLabelMap.BookingTotalNums}"><display/></field><field name="bookingPassNums" title="${uiLabelMap.BookingPassNums}"><display/></field><field name="date" title="${uiLabelMap.BookingLabProjectBatchDate}"><display/></field><field name="classNO" title="${uiLabelMap.BookingLabProjectBatchClassNO}"><display/></field><field name="asured" title="${uiLabelMap.BookingLabProjectBatchAsured}"><display description="${groovy: asured == 'Y' ? uiLabelMap.CommonYes : uiLabelMap.CommonNo}"/></field><field name="updateLink" title=" " widget-style="buttontext">            <hyperlink description="${uiLabelMap.CommonUpdate}" target="EditLabProjectBatch" >                <parameter param-name="batchId"/>            </hyperlink>        </field>        <field name="deleteLink" title=" " widget-style="buttontext">            <hyperlink description="${uiLabelMap.CommonDelete}" target="deleteLabProjectBatch" also-hidden="false">                <parameter param-name="batchId"/>            </hyperlink>        </field>            </form><form name="EditLabProjectBatch" target="updateLabProjectBatch" title="" type="single" header-row-style="header-row" default-table-style="basic-table" default-map-name="labProjectBatch" default-entity-name="LabProjectBatch"><alt-target use-when="labProjectBatch==null" target="createLabProjectBatch"/><auto-fields-service service-name="updateLabProjectBatch" map-name=""/><field use-when="labProjectBatch!=null" name="batchId" title="${uiLabelMap.BookingLabProjectBatchId}" tooltip="${uiLabelMap.BookingNotModification}." ><display/></field>        <field use-when="labProjectBatch==null" name="batchId" title="${uiLabelMap.BookingLabProjectBatchId}"><text size="20" maxlength="20" /></field><field name="proId" title="${uiLabelMap.BookingLabProjectId}"><lookup target-form-name="LookupLabProject"/></field><field name="tchId" title="${uiLabelMap.BookingTeacherTchId}"><lookup target-form-name="LookupTeacher"/></field><field name="address" title="${uiLabelMap.BookingLabProjectBatchAddress}"><text/></field><field name="capacity" title="${uiLabelMap.BookingLabProjectBatchCapacity}"><text/></field><field name="date" title="${uiLabelMap.BookingLabProjectBatchDate}"><date-time type="date" /></field><field name="classNO" title="${uiLabelMap.BookingLabProjectBatchClassNO}"><text/></field><field name="asured" title="${uiLabelMap.BookingLabProjectBatchAsured}">            <drop-down allow-empty="false" no-current-selected-key="N"><option key="Y" description="${uiLabelMap.CommonYes}"/>                <option key="N" description="${uiLabelMap.CommonNo}"/>            </drop-down>        </field>        <field name="submitButton" title="${uiLabelMap.CommonSubmit}"><submit/></field>    </form><form name="LookupLabProjetBatch" target="LookupLabProjetBatch" title="" type="single"        header-row-style="header-row" default-table-style="basic-table">        <!-- <auto-fields-entity entity-name="LabProjetBatch" default-field-type="hidden"/> -->        <field name="courseId" title="${uiLabelMap.BookingCourseId}"><lookup target-form-name="LookupCourse"/></field><field name="proId" title="${uiLabelMap.BookingLabProjectId}"><lookup target-form-name="LookupLabProject"/></field><field name="tchId" title="${uiLabelMap.BookingTeacherTchId}"><lookup target-form-name="LookupTeacher"/></field><field name="address" title="${uiLabelMap.BookingLabProjectBatchAddress}"><text-find/></field><field name="capacity" title="${uiLabelMap.BookingLabProjectBatchCapacity}"><text-find/></field><field name="date" title="${uiLabelMap.BookingLabProjectBatchDate}"><date-time type="date" /></field><field name="classNO" title="${uiLabelMap.BookingLabProjectBatchClassNO}"><text-find/></field>        <field name="submitButton" title="${uiLabelMap.CommonFind}"><submit/></field>    </form>    <form name="ListLookupLabProjetBatch" list-name="listIt" title="" type="list" paginate-target="LookupLabProjetBatch"        odd-row-style="alternate-row" default-table-style="basic-table" view-size="20">       <actions>            <service service-name="performFind" result-map="result" result-map-list="listIt">                <field-map field-name="inputFields" from-field="requestParameters"/>                <field-map field-name="entityName" value="LabProjectBatchAndLabProjectAndTeacher"/>                <field-map field-name="viewIndex" from-field="viewIndex"/>                <field-map field-name="viewSize" from-field="viewSize"/><field-map field-name="noConditionFind" value="Y"/>            </service>        </actions><field name="batchId" title="${uiLabelMap.BookingLabProjetBatchId}" widget-style="buttontext">  <hyperlink description="${batchId}" target="javascript:set_value('${batchId}')" also-hidden="false" target-type="plain"/>  </field><field name="courseName" title="${uiLabelMap.BookingCourseName}"><display/></field><field name="proName" title="${uiLabelMap.BookingLabProjectName}"><display/></field><field name="tchName" title="${uiLabelMap.BookingTeacherName}"><display/></field><field name="address" title="${uiLabelMap.BookingLabProjectBatchAddress}"><display/></field><field name="capacity" title="${uiLabelMap.BookingLabProjectBatchCapacity}"><display/></field><field name="date" title="${uiLabelMap.BookingLabProjectBatchDate}"><display/></field><field name="classNO" title="${uiLabelMap.BookingLabProjectBatchClassNO}"><display/></field><field name="asured" title="${uiLabelMap.BookingLabProjectBatchAsured}"><display/></field>    </form></forms>

返回导航页







阅读全文
0 0