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

实验项目管理主要有:curd功能。

查询:


新增:


修改:


LabProjectScreens.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="FindLabProject">
        <section>
            <actions>
                <set field="titleProperty" value="LabProjectManange"/>
				<set field="headerItem" value="LabProjectManange"/>
                <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="EditLabProject" text="${uiLabelMap.EditLabProject}" style="buttontext"/>
                                        </container>
                                    </decorator-section>
                                    <decorator-section name="search-options">
                                        <include-form name="FindLabProject" location="component://booking/widget/booking/LabProjectForms.xml"/>
                                    </decorator-section>
                                    <decorator-section name="search-results">
                                        <include-form name="ListFindLabProject" location="component://booking/widget/booking/LabProjectForms.xml"/>
                                    </decorator-section>
                                </decorator-screen>
                            </widgets>
                        </section>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>
	<screen name="EditLabProject">
        <section>
            <actions>
                <set field="titleProperty" value="LabProjectManange"/>
                <set field="headerItem" value="LabProjectManange"/>
				<entity-one entity-name="LabProject" value-field="labProject"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonBookingDecorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
						<container style="button-bar">
							<link target="FindLabProject" text="${uiLabelMap.CommonBack}" style="buttontext"/>
						</container>
                        <screenlet title="${groovy: parameters.proId ? uiLabelMap.CommonEdit : uiLabelMap.CommonAdd}">
                            <include-form name="EditLabProject" location="component://booking/widget/booking/LabProjectForms.xml"/>
                        </screenlet>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>
	
	<screen name="LookupLabProject">
        <section>
            <actions>
                <property-map resource="BookingUiLabels" map-name="uiLabelMap" global="true"/>
                <set field="title" value="${uiLabelMap.PageTitleLookupLabProject}"/>
                <set field="queryString" from-field="result.queryString"/>
                <set field="entityName" value="LabProject"/>
                <set field="searchFields" value="[proId, proName]"/>
            </actions>
            <widgets>
                <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">
                    <decorator-section name="search-options">
                        <include-form name="LookupLabProject" location="component://booking/widget/booking/LabProjectForms.xml"/>
                    </decorator-section>
                    <decorator-section name="search-results">
                        <include-form name="ListLookupLabProject" location="component://booking/widget/booking/LabProjectForms.xml"/>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>
	
</screens>


LabProjectForms.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="FindLabProject" target="FindLabProject" title="" type="single"
        header-row-style="header-row" default-table-style="basic-table">
        <field name="proId" title="${uiLabelMap.BookingLabProjectId}"><text-find/></field>
        <field name="submitButton" title="${uiLabelMap.CommonFind}"><submit/></field>
    </form>

    <form name="ListFindLabProject" list-name="listIt" title="" type="list" paginate-target="FindLabProject"
        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="LabProjectAndCourseAndTerm"/>
                <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="proId" title="${uiLabelMap.BookingLabProjectId}"><display/></field>
        <field name="proName" title="${uiLabelMap.BookingLabProjectName}"><display/></field>
        <field name="courseId" title="${uiLabelMap.BookingCourseId}"><display/></field>
		<field name="courseName" title="${uiLabelMap.BookingCourseName}"><display/></field>
		<field name="termName" title="${uiLabelMap.TermTermName}"><display/></field>
		
		<field name="updateLink" title=" " widget-style="buttontext">
            <hyperlink description="${uiLabelMap.CommonUpdate}" target="EditLabProject" >
                <parameter param-name="proId"/>
            </hyperlink>
        </field>
        <field name="deleteLink" title=" " widget-style="buttontext">
            <hyperlink description="${uiLabelMap.CommonDelete}" target="deleteLabProject" also-hidden="false">
                <parameter param-name="proId"/>
            </hyperlink>
        </field>
        
    </form>
	
	<form name="EditLabProject" target="updateLabProject" title="" type="single" header-row-style="header-row" 
		default-table-style="basic-table" default-map-name="labProject" default-entity-name="LabProject">
		<alt-target use-when="labProject==null" target="createLabProject"/>
		<auto-fields-service service-name="updateLabProject" map-name=""/>
		<field use-when="labProject!=null" name="proId" title="${uiLabelMap.BookingLabProjectId}" tooltip="${uiLabelMap.BookingNotModification}." ><display/></field>
        <field use-when="labProject==null" name="proId" title="${uiLabelMap.BookingLabProjectId}"><text size="20" maxlength="20" /></field>
		<field name="proName" title="${uiLabelMap.BookingLabProjectName}"><text size="20" maxlength="20" /></field>
        <field name="courseId" title="${uiLabelMap.BookingCourseId}"><lookup target-form-name="LookupCourse"/></field>
		<field name="termName" title="${uiLabelMap.TermTermName}"><lookup target-form-name="LookupTerm"/></field>
        <field name="submitButton" title="${uiLabelMap.CommonSubmit}">
			<submit/>
		</field>
    </form>
	
	<form name="LookupLabProject" target="LookupLabProject" title="" type="single"
        header-row-style="header-row" default-table-style="basic-table">
        <!-- <auto-fields-entity entity-name="LabProject" default-field-type="hidden"/> -->
        <field name="proName" title="${uiLabelMap.BookingLabProjectName}"><text-find/></field>
		<field name="courseName" title="${uiLabelMap.BookingCourseName}"><text-find/></field>
        <field name="submitButton" title="${uiLabelMap.CommonFind}"><submit/></field>
    </form>
    <form name="ListLookupLabProject" list-name="listIt" title="" type="list" paginate-target="LookupLabProject"
        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="LabProjectAndCourseAndTerm"/>
                <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="proId" title="${uiLabelMap.BookingLabProjectId}" widget-style="buttontext">  
			<hyperlink description="${proId}" target="javascript:set_value('${proId}')" also-hidden="false" target-type="plain"/>  
		</field>
        <field name="proName" title="${uiLabelMap.BookingLabProjectName}"><display/></field>
        <field name="courseId" title="${uiLabelMap.BookingCourseId}"><display/></field>
		<field name="courseName" title="${uiLabelMap.BookingCourseName}"><display/></field>
		<field name="termName" title="${uiLabelMap.TermTermName}"><display/></field>
		

    </form>
</forms>

返回导航页

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值