Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Panel
nameidblue0

Data entry pages are used to display a single record and consist of two XML files: the layout file and the definition file. Through a data entry page, the user can create, view, modify, delete or apply other operations on a record. 


What does this section cover?

Table of Contents

Creating Data Entry Pages

To create a new data entry page, you need to create two XML files: a layout file and a definition file. All data entry page files must be placed under ../pages/dataEntry/<module_name> directory. 

Expand
titleWarehouse Data Entry Page
 

Creating Definition Files

Data entry definition file is used to describe the page's components: their type and functionality.

...

In the following example warehouse.xml is created under ../pages/dataEntry/inventory

Code Block
firstline
languagexml
themeEclipse
languagefirstlinexml1
titlewarehouse.xml
1collapsetrue
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/dataEntry.xsd">
	<id>inventory/warehouse</id>
	<name>Warehouse</name>
	<datapath>name</datapath>
	<module>INVENTORY_MANAGEMENT</module>

	<functioncall>
		<functions>
			<function>
			</function>		
		</functions>
	</functioncall>
	
	<datasources>
		<datasource>
			<key>form</key>
			<classname>com.crm.web.generator.datasource.DTODatasource</classname>
		</datasource>
	</datasources>

	<mainmenu>
		<components>
			<component>
				<id>cmpHome</id>
				<name>Home</name>
				<visiblemodes>read</visiblemodes>
				<elements>
					<button>
						<id>btnHome</id>
						<name>Home</name>
						<setmode>read</setmode>
						<refresh>page</refresh>
						<url>page.do?xml=inventory/warehouses&amp;act=summary</url>
					</button>
				</elements>
			</component>
 
			...
 
	</components>

	</mainmenu>
	<main>
		<components>
			<component>
				<id>cmpType</id>
				<name/>
				<elements>
					<selectbox>
						<id>slbType</id>
						<label>key_type</label>
						<lookuptype>ejb</lookuptype>
						<datapath>type</datapath>
						<datapathid>id</datapathid>
						<classname>com.crm.dataobject.inventory.CRMDOWarehouseType</classname>
						<datatype>load</datatype>
						<reload>true</reload>
						<refresh>page</refresh>
						<width>30</width>
						<onload>
							<type>ejb</type>
							<classname>ejb/CRMUIWarehouseType</classname>
							<functionname>getTypeOptions</functionname>
							<parameters>
								<parameter>
									<value>Select Type</value>
									<datatype>java.lang.String</datatype>
								</parameter>
							</parameters>
						</onload>
					</selectbox>
				</elements>
			</component>
 
			...
 
		</components>
	</main>

	<details>
		<tabs>
			...
		</tabs>
	</details>
</page>

Creating Layout Files

Data entry layout file is used to determine, as its name suggests, the layout of the page: where each component is to be placed on the screen. 

...

In the following example warehouselayout.xml is created under ../pages/dataEntry/inventory

Code Block
firstline
languagexml
themeEclipse
languagefirstlinexml1
titlewarehouselayout.xml
1collapsetrue
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/dataEntryLayout.xsd">
	<mainmenu>
		<components>
			<component><id>cmpHome</id></component>

			...

		</components>
	</mainmenu>
	
	<main>
		<view>
			<type>areas</type>
			<screenareas>
				<screenarea>
					<leftscreenarea>
						<sections>
							<section><id>secMainInformation</id></section>
							<section><id>secBalances</id></section>
							<section><id>secLogInformation</id></section>
						</sections>
					</leftscreenarea>
				</screenarea>
			</screenareas>
		</view>

		<sections>
			<section>
				<id>secMainInformation</id>
				<name>key_main_information</name>
				<disable>false</disable>
				<instruction>key_instruction_warehouse_sec_main_information</instruction>
				<left>
					<components>
						<component><id>cmpType</id></component>
						<component><id>file:general/name.xml</id></component>
						<component><id>file:general/altCode.xml</id></component>
					</components>
				</left>
				<right>
					<components>
						<component><id>file:networkmanagement/ownerGroup.xml</id></component>
						<component><id>cmpPrivacyLevel</id></component>
						<component><id>file:general/description.xml</id></component>
					</components>
				</right>
			</section>
 
			...

		</sections>
	</main>

	<details>
		<tabs>
			<tab>
				<id>tabBalances</id>
				<disable>true</disable>
				<preload>true</preload>
				<showheader>false</showheader>
				<components>
					<component><id>cmpProductType</id></component>
					<component><id>cmpProduct</id></component>
					<component><id>cmpQuantity</id></component>
					<component><id>cmpIncludedInBundles</id></component>
					<component><id>cmpComponents</id></component>
				</components>
			</tab>
		</tabs>
	</details>
</page>

 


For more information on how to customise customising data entry pages, go to Customise Customize Data Entry Pages. For a full list of data entry page attributes, go to Data Entry Pages Documentation.

To continue implementing the view layer, go to Report PagesDeveloping reports