applications/product/widget/catalog/LookupScreens.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is subject to the terms and conditions defined in the
files 'LICENSE' and 'NOTICE', which are part of this source
code package.
-->
<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
<screen name="LookupProduct">
<section>
<condition>
<if-service-permission service-name="catalogPermissionCheck" main-action="VIEW"/>
</condition>
<actions>
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
<set field="title" value="${uiLabelMap.PageTitleLookupProduct}"/>
<set field="queryString" from-field="result.queryString"/>
<set field="entityName" value="Product"/>
<set field="searchFields" value="[productId, internalName, brandName]"/>
</actions>
<widgets>
<decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">
<decorator-section name="search-options">
<include-form name="lookupProduct" location="component://product/widget/catalog/FieldLookupForms.xml"/>
</decorator-section>
<decorator-section name="search-results">
<include-form name="listLookupProduct" location="component://product/widget/catalog/FieldLookupForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="LookupVirtualProduct">
<section>
<condition>
<if-service-permission service-name="catalogPermissionCheck" main-action="VIEW"/>
</condition>
<actions>
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
<set field="title" value="${uiLabelMap.PageTitleLookupProductVirtual}"/>
<set field="queryString" from-field="result.queryString"/>
<set field="entityName" value="Product"/>
<set field="searchFields" value="[productId, brandName, internalName]"/>
<set field="andCondition" value="${groovy: return org.ofbiz.entity.condition.EntityCondition.makeCondition("isVirtual", "Y")}"/>
</actions>
<widgets>
<decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">
<decorator-section name="search-options">
<include-form name="lookupVirtualProduct" location="component://product/widget/catalog/FieldLookupForms.xml"/>
</decorator-section>
<decorator-section name="search-results">
<include-form name="listLookupVirtualProduct" location="component://product/widget/catalog/FieldLookupForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="LookupVariantProduct">
<section>
<condition>
<if-service-permission service-name="catalogPermissionCheck" main-action="VIEW"/>
</condition>
<actions>
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
<set field="title" value="${uiLabelMap.PageTitleLookupProductVariant}"/>
<set field="entityName" value="Product"/>
<set field="queryString" from-field="result.queryString"/>
<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}"/>
<script location="component://product/webapp/catalog/WEB-INF/actions/lookup/LookupVariantProduct.groovy"/>
</actions>
<widgets>
<decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">
<decorator-section name="search-results">
<platform-specific>
<html><html-template location="component://product/webapp/catalog/lookup/LookupVariantProduct.ftl"/></html>
</platform-specific>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="LookupProductAndPrice">
<section>
<condition>
<if-service-permission service-name="catalogPermissionCheck" main-action="VIEW"/>
</condition>
<actions>
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
<set field="title" value="${uiLabelMap.PageTitleLookupProductPrice}"/>
<set field="queryString" from-field="result.queryString"/>
<property-to-field field="defaultCurrencyUomId" resource="general" property="currency.uom.id.default" default="USD"/>
<set field="entityName" value="ProductAndPriceView"/>
<set field="searchFields" value="[productId, internalName]"/>
<set field="displayFields" value="[productId, internalName, price, currencyUomId]"/>
</actions>
<widgets>
<decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">
<decorator-section name="search-options">
<include-form name="lookupProductAndPrice" location="component://product/widget/catalog/FieldLookupForms.xml"/>
</decorator-section>
<decorator-section name="search-results">
<include-form name="listLookupProductAndPrice" location="component://product/widget/catalog/FieldLookupForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="LookupProductCategory">
<section>
<condition>
<if-service-permission service-name="catalogPermissionCheck" main-action="VIEW"/>
</condition>
<actions>
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
<set field="title" value="${uiLabelMap.PageTitleLookupProductCategory}"/>
<set field="queryString" from-field="result.queryString"/>
<set field="entityName" value="ProductCategory"/>
<set field="searchFields" value="[productCategoryId, categoryName, description]"/>
</actions>
<widgets>
<decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">
<decorator-section name="search-options">
<include-form name="lookupProductCategory" location="component://product/widget/catalog/FieldLookupForms.xml"/>
</decorator-section>
<decorator-section name="search-results">
<include-form name="listLookupProductCategory" location="component://product/widget/catalog/FieldLookupForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="LookupProductFeature">
<section>
<condition>
<if-service-permission service-name="catalogPermissionCheck" main-action="VIEW"/>
</condition>
<actions>
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
<set field="title" value="${uiLabelMap.PageTitleLookupProductFeature}"/>
<set field="queryString" from-field="result.queryString"/>
<set field="entityName" value="ProductFeature"/>
<set field="searchFields" value="[productFeatureId, description, productFeatureCategoryId]"/>
</actions>
<widgets>
<decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">
<decorator-section name="search-options">
<include-form name="lookupProductFeature" location="component://product/widget/catalog/FieldLookupForms.xml"/>
</decorator-section>
<decorator-section name="search-results">
<include-form name="listLookupProductFeature" location="component://product/widget/catalog/FieldLookupForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<!-- ProductStore Lookup Screen -->
<screen name="LookupProductStore">
<section>
<condition>
<if-service-permission service-name="catalogPermissionCheck" main-action="VIEW"/>
</condition>
<actions>
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
<set field="title" value="${uiLabelMap.PageTitleLookupProductStore}"/>
<set field="entityName" value="ProductStore"/>
<set field="queryString" from-field="result.queryString"/>
<set field="entityName" value="ProductStore"/>
<set field="searchFields" value="[productStoreId, companyName, storeName]"/>
</actions>
<widgets>
<decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">
<decorator-section name="search-options">
<include-form name="LookupProductStore" location="component://product/widget/catalog/FieldLookupForms.xml"/>
</decorator-section>
<decorator-section name="search-results">
<include-form name="listLookupProductStore" location="component://product/widget/catalog/FieldLookupForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="LookupSupplierProduct">
<section>
<condition>
<if-service-permission service-name="catalogPermissionCheck" main-action="VIEW"/>
</condition>
<actions>
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
<entity-one entity-name="PartyNameView" value-field="pnv"/>
<set field="title" value="${uiLabelMap.PageTitleLookupSupplierProduct} ${pnv.firstName} ${pnv.middleName} ${pnv.lastName} ${pnv.groupName} [${parameters.partyId}]"/>
<set field="queryString" from-field="result.queryString"/>
<set field="entityName" value="SupplierProductAndProduct"/>
<set field="searchFields" value="[productId, partyId, brandName, internalName]"/>
<!-- SCIPIO: only and if partyId is set -->
<set field="andCondition" value="${groovy: return (parameters.partyId ? org.ofbiz.entity.condition.EntityCondition.makeCondition(org.ofbiz.base.util.UtilMisc.toMap('partyId', parameters.partyId)) : null)}"/>
<!-- SCIPIO: distinct -->
<set field="searchDistinct" value="true"/>
</actions>
<widgets>
<decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">
<decorator-section name="search-options">
<include-form name="lookupSupplierProduct" location="component://product/widget/catalog/FieldLookupForms.xml"/>
</decorator-section>
<decorator-section name="search-results">
<include-form name="listLookupSupplierProduct" location="component://product/widget/catalog/FieldLookupForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="LookupCostComponentCalc">
<section>
<condition>
<if-service-permission service-name="catalogPermissionCheck" main-action="VIEW"/>
</condition>
<actions>
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
<set field="title" value="${uiLabelMap.PageTitleLookupCostComponentCalc}"/>
<set field="queryString" from-field="result.queryString"/>
<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}"/>
<set field="entityName" value="CostComponentCalc"/>
<set field="searchFields" value="[costComponentCalcId, description, costGlAccountTypeId, offsettingGlAccountTypeId]"/>
</actions>
<widgets>
<decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">
<decorator-section name="search-options">
<include-form name="lookupCostComponentCalc" location="component://product/widget/catalog/FieldLookupForms.xml"/>
</decorator-section>
<decorator-section name="search-results">
<include-form name="listLookupCostComponentCalc" location="component://product/widget/catalog/FieldLookupForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
</screens>