Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...



productsList.xml

Code Block
themeEclipse
languagexmlthemeEclipse
linenumberstrue
<?xml version="1.0" encoding="UTF-8"?>

<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schema.qcadoo.org/view" 
	xsi:schemaLocation="http://schema.qcadoo.org/view http://schema.qcadoo.org/view.xsd"
	name="products"
	modelName="product"
	menuAccessible="true">

	<component type="window" name="window">
		<ribbon>
			<group template="gridNewCopyAndRemoveAction"/>
		</ribbon>
		<component type="grid" name="products" reference="grid">
			<option type="column" name="number" fields="number" link="true"
				width="150" />
			<option type="column" name="name" fields="name" link="true"
				width="300" />
			<option type="column" name="typeOfMaterial" fields="typeOfMaterial" />
			<option type="column" name="ean" fields="ean" />
			<option type="order" column="name" direction="asc"/>
			<option type="correspondingView" value="products/product" />
			<option type="correspondingComponent" value="form" />
			<option type="searchable" value="name,number,typeOfMaterial,ean" />
			<option type="orderable" value="name,number,typeOfMaterial,ean" />
			<option type="fullscreen" value="true" />
			<option type="multiselect" value="true" />
		</component>
		<option type="fixedHeight" value="true" />
		<option type="header" value="false" />
	</component>
</view>



file1productDetails.xml

Code Block
themeEclipse
languagexml
themeEclipse
linenumberstrue
	<view name<?xml version="product1.0" modelencoding="productUTF-8"?>
		<component type="window" name="window">
			<ribbon>
				<group template="navigation"/>
				<group template="formSaveCopyAndRemoveActions"/>
			</ribbon>
		
<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schema.qcadoo.org/view" 
	xsi:schemaLocation="http://schema.qcadoo.org/view http://schema.qcadoo.org/view.xsd"
	name="product"
	modelName="product">

	<component type="formwindow" name="product" reference="form">
                             <script>
                                    <![CDATA[
                                        var window">
		<ribbon>
			<group template="navigation"/>
			<group template="formSaveCopyAndRemoveActions"/>
		</ribbon>
		<component type="form" name="product" reference="form">
			<script>
				<![CDATA[
					var save = #{window}.getRibbonItem("actions.save");

                                        this					this.addOnChangeListener({
                                            onSetValue: 						onSetValue: function(value) {
                                                if 							if (value && value.content && !value.content.entityId) {
                                                    save								save.disable();
                                                }
                                            }
                                        });
                                    ]]>
                                </script>
								}
						}
					});
				]]>
			</script>
			<component type="gridLayout" name="gridLayout" columns="3" rows="11">
					<layoutElement column="1" row="1">
						<component type="input" name="number" field="number" reference="number" />
					</layoutElement>
					<layoutElement column="1" row="2">
						<component type="textarea" name="name" field="name" hasDescription="true" />
					</layoutElement>
					<layoutElement column="1" row="3">
						<component type="select" name="typeOfMaterial" field="typeOfMaterial" />
					</layoutElement>
					<layoutElement column="1" row="4">
						<component type="select" name="unit" field="unit" />
					</layoutElement>
					<layoutElement column="2" row="1">
						<component type="input" name="ean" field="ean" />
					</layoutElement>
					<layoutElement column="2" row="2">
						<component type="select" name="category" field="category" />
					</layoutElement>
					<layoutElement column="2" row="3">
						<component type="input" name="batch" field="batch" />
					</layoutElement>
					<layoutElement column="2" row="4">
						<component type="checkbox" name="genealogyBatchReq" field="genealogyBatchReq">
							<option type="labelWidth" value="60" />
						</component>
					</layoutElement>
					<layoutElement column="1" row="5" width="3" height="7">
						<component type="borderLayout" name="substitutesBorderLayout" reference="substitutesBorderLayout">
							<option type="label" value="substitutesBorderLayoutLabel" />
							<component type="gridLayout" name="gridsLayout" columns="5" rows="6" hasBorders="false">
								<layoutElement column="1" row="1" width="2" height="6">
									<component type="grid" name="substitutes" reference="substitutes" source="#{form}.substitutes">
										<option type="column" name="number" fields="number" link="true" width="50"/>
										<option type="column" name="name" fields="name" link="true" width="100"/>
									<option type="order" column="priority" direction="100""asc"/>
									<option type="correspondingView" value="products/substitute" />
										<option type="ordercorrespondingComponent" columnvalue="priorityform" direction="asc"/>
										<option type="correspondingViewcorrespondingViewInModal" value="products/substitutetrue" />
										<option type="correspondingComponentpaginable" value="formfalse" />
										<option type="correspondingViewInModalcreatable" value="true" />
										<option type="paginabledeletable" value="falsetrue" />
										<option type="creatablefullscreen" value="true" />
										<option type="deletablemultiselect" value="true" />
								</component>
							</layoutElement>
								<option type<layoutElement column="3" row="fullscreen1" valuewidth="true3" /height="6">
										<option<component type="multiselectgrid" valuename="truesubstituteComponents" />
									</component>
								</layoutElement>
source="#{substitutes}.components">
									<layoutElement<option columntype="3column" rowname="1number" widthfields="3product"
height="6">
										<component typeexpression="grid#product['number']" namelink="substituteComponentstrue" 										source="#{substitutes}.components"width="50"/>
										<option type="column" name="numbername" fields="product"
											expression="#product['numbername']" link="true" width="50100"/>
									<option type="column" name="quantity" fields="quantity" width="40"/>
									<option type="column" name="nameunit" fields="product"
											expression="#product['nameunit']" link="truefalse" width="10030"/>
										<option type="columnorder" namecolumn="quantity" fields="quantitynumber" widthdirection="40desc"/>
										<option type="columncorrespondingView" namevalue="unitproducts/substituteComponent" fields="product"/>
											expression<option type="#product['unit']correspondingComponent" linkvalue="falseform" width="30"/>
										<option type="ordercorrespondingViewInModal" columnvalue="numbertrue" direction="desc"/>
										<option type="correspondingViewpaginable" value="products/substituteComponentfalse" />
										<option type="correspondingComponentcreatable" value="formtrue" />
										<option type="correspondingViewInModaldeletable" value="true" />
										<option type="paginablefullscreen" value="falsetrue" />
										<option type="creatablemultiselect" value="true" />
								</component>
					<option type="deletable" value="true" />
									</layoutElement>
						</component>
					</component>
				</layoutElement>
			</component>
			<option type="fullscreenheader" value="true" />
										<option type="multiselectexpression" value="true#name" />
									</component>
								</layoutElement>component>
							</component>
						</component>
					</layoutElement>
				</component>
				<option type="header" value="true"/>
				<option type="expression" value="#name" />
			</component>
		</component>
		<preRenderHook bean="com.qcadoo.mes.products.ProductService" method="generateProductNumber" />
	</view>

...

Code Block
languagexml
themeEclipse
linenumberstrue

	<view name="substitute" model="substitute">
	<hooks>
		<beforeRender class="com.qcadoo.mes.products.ProductService" method="generateProductNumber" />
	</hooks>
</view>



productSubstituteDetails.xml

Code Block
themeEclipse
languagexml
linenumberstrue

<?xml version="1.0" encoding="UTF-8"?>

<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schema.qcadoo.org/view" 
	xsi:schemaLocation="http://schema.qcadoo.org/view http://schema.qcadoo.org/view.xsd"
	name="substitute"
	modelName="substitute"

	<component type="window" name="window">
			<ribbon>
				<group template="navigation"/>
				<group template="formSaveAndRemoveActions"/>
			</ribbon>
ribbon>
		<component type="form" name="substitute" reference="form">
			<component type="gridLayout" name="gridLayout" columns="1" rows="3">
				<component<layoutElement typecolumn="form1" namerow="substitute" reference="form"1">
					<component type="gridLayoutinput" name="gridLayoutnumber" columnsfield="1number" rows="3"/>
				</layoutElement>
				<layoutElement column="1" row="2" height="12">
						<component type="inputtextarea" name="numbername" field="numbername" />
					</layoutElement>
			</component>
			<layoutElement<option columntype="1header" rowvalue="2" height="2"true"/>
						<component<option type="textareaexpression" namevalue="name" field="name#name" />
					</layoutElement>
				</component>
				<option type="header" value="true"/>
				<option type="expression" value="#name" />
			</component>
		</component>
	</view>

...

Code Block
languagexml
themeEclipse
linenumberstrue

	<view </component>
	</component>
</view>



productSubstituteComponentDetails.xml

Code Block
themeEclipse
languagexml
linenumberstrue

<?xml version="1.0" encoding="UTF-8"?>

<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schema.qcadoo.org/view" 
	xsi:schemaLocation="http://schema.qcadoo.org/view http://schema.qcadoo.org/view.xsd"
	name="substituteComponent"
model	modelName="substituteComponent">

		<component type="window" name="window">
			<ribbon>
				<group template="navigation"/>
				<group template="formSaveAndRemoveActions"/>
			</ribbon>
			<component type="form" name="substituteComponent" reference="form">
				<component type="gridLayout" name="gridLayout" columns="1" rows="3">
					<layoutElement column="1" row="1">
						<component type="lookup" name="product" field="product" reference="product">
							<option type="column" name="name" fields="name" link="true"
								width="200" />
							<option type="column" name="ean" fields="ean" />
							<option type="searchable" value="name,ean" />
							<option type="orderable" value="name,ean" />
							<option type="expression" value="'&lt;b&gt;' + #number + '&lt;/b&gt; - ' + #name"/>
							<option type="fieldCode" value="number" />
							<listener event="onSelectedEntityChange" beanclass="com.qcadoo.mes.products.util.UnitService" method="fillProductUnit" />
						</component>
					</layoutElement>
					<layoutElement column="1" row="2">
						<component type="input" name="quantity" field="quantity" />
					</layoutElement>
					<layoutElement column="1" row="3">
						<component type="input" name="unit" reference="unit" defaultEnabled="false" />
					</layoutElement>
				</component>
				<option type="header" value="true"/>
				<option type="expression" value="#product['name'] + ' x ' + #quantity" />
			</component>
		</component>
	<hooks>
		<preRenderHook<beforeRender beanclass="com.qcadoo.mes.products.util.UnitService" method="fillProductUnitPreRender" />
	</hooks>
</view>