applications/product/widget/catalog/ConfigScreens.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="FindProductConfigItems">
<section>
<actions>
<set field="titleProperty" value="PageTitleFindConfigItems"/>
</actions>
<widgets>
<decorator-screen name="CommonConfigDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
<!-- SCIPIO: done in decorator
<decorator-section name="menu-bar">
<include-menu name="ConfigItemSubTabBar" location="component://product/widget/catalog/CatalogMenus.xml"/>
</decorator-section>-->
<decorator-section name="search-options">
<include-form location="component://product/widget/catalog/ConfigForms.xml" name="FindProductConfigItems"/>
</decorator-section>
<decorator-section name="search-results">
<include-form location="component://product/widget/catalog/ConfigForms.xml" name="ListProductConfigItems"/>
</decorator-section>
</decorator-screen>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="EditProductConfigItem">
<section>
<actions>
<set field="titleProperty" value="PageTitleEditConfigItem"/>
<set field="activeSubMenuItem" value="EditProductConfigItem"/>
<!--<set field="labelTitleProperty" value="ProductConfigItem"/>-->
<set field="configItemId" from-field="parameters.configItemId"/>
<entity-one entity-name="ProductConfigItem" value-field="configItem" auto-field-map="true"/>
<set field="isCreateConfigItem" type="Boolean" value="${groovy: !(context.configItem || (parameters.configItemId && parameters.isCreate != 'true'))}"/>
<set field="labelTitleProperty" value="${groovy: isCreateConfigItem ? 'ProductNewConfigItem' : 'ProductConfigItem'}"/>
</actions>
<widgets>
<decorator-screen name="CommonConfigDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet>
<include-form name="EditProductConfigItem" location="component://product/widget/catalog/ConfigForms.xml"/>
</screenlet>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="EditProductConfigOptions">
<section>
<actions>
<set field="titleProperty" value="PageTitleEditConfigOptions"/>
<set field="activeSubMenuItem" value="EditProductConfigOptions"/>
<set field="labelTitleProperty" value="ProductConfigOptions"/>
<set field="configItemId" from-field="parameters.configItemId"/>
<entity-one entity-name="ProductConfigItem" value-field="configItem" auto-field-map="true"/>
<set field="configOptionId" from-field="parameters.configOptionId"/>
<entity-one entity-name="ProductConfigOption" value-field="configOption" auto-field-map="true"/>
<set field="productId" from-field="parameters.productId"/>
<entity-one entity-name="ProductConfigProduct" value-field="productConfigProduct" auto-field-map="true"/>
<entity-condition entity-name="ProductConfigOption" list="configOptionList">
<condition-expr field-name="configItemId" from-field="configItemId"/>
<order-by field-name="sequenceNum"/>
</entity-condition>
<entity-condition entity-name="ProductConfigProduct" list="configProducts">
<condition-list combine="and">
<condition-expr field-name="configItemId" from-field="configItemId"/>
<condition-expr field-name="configOptionId" from-field="configOptionId"/>
</condition-list>
<order-by field-name="sequenceNum"/>
</entity-condition>
</actions>
<widgets>
<decorator-screen name="CommonConfigDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<include-screen name="configOptions"/>
<include-screen name="configComponent"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="configOptions">
<section>
<widgets>
<section>
<condition><not><if-empty field="configOptionId"/></not></condition>
<widgets>
<screenlet title="${uiLabelMap.PageTitleEditConfigOptions}">
<link style="${styles.link_nav} ${styles.action_add}" text="${uiLabelMap.ProductCreateNewConfigOptions}" target="EditProductConfigOptions">
<parameter param-name="configItemId"/>
</link>
<include-form name="CreateConfigOption" location="component://product/widget/catalog/ConfigForms.xml"/>
</screenlet>
</widgets>
<fail-widgets>
<screenlet title="${uiLabelMap.ProductCreateNewConfigOptions}">
<include-form name="CreateConfigOption" location="component://product/widget/catalog/ConfigForms.xml"/>
</screenlet>
</fail-widgets>
</section>
<screenlet title="${uiLabelMap.ProductConfigOptionList}">
<include-form name="ProductConfigOptionList" location="component://product/widget/catalog/ConfigForms.xml"/>
</screenlet>
</widgets>
</section>
</screen>
<screen name="configComponent">
<section>
<condition>
<not>
<if-empty field="configOptionId"/>
</not>
</condition>
<widgets>
<screenlet title="${uiLabelMap.ProductComponents} - ${configOption.configOptionId} - ${configOption.description}">
<include-form name="ProductConfigList" location="component://product/widget/catalog/ConfigForms.xml"/>
</screenlet>
<section>
<condition>
<not><if-empty field="productId"/></not>
</condition>
<widgets>
<screenlet title="${uiLabelMap.AddProductComponent}">
<link style="${styles.link_nav} ${styles.action_add}" text="${uiLabelMap.AddProductComponent}" target="EditProductConfigOptions">
<parameter param-name="configItemId"/>
<parameter param-name="configOptionId"/>
</link>
<include-form name="CreateProductConfigProduct" location="component://product/widget/catalog/ConfigForms.xml"/>
</screenlet>
</widgets>
<fail-widgets>
<screenlet title="${uiLabelMap.AddProductComponent}">
<link style="${styles.link_nav} ${styles.action_add}" text="${uiLabelMap.AddProductComponent}" target="EditProductConfigOptions">
<parameter param-name="configItemId"/>
<parameter param-name="configOptionId"/>
</link>
<include-form name="CreateProductConfigProduct" location="component://product/widget/catalog/ConfigForms.xml"/>
</screenlet>
</fail-widgets>
</section>
</widgets>
</section>
</screen>
<screen name="EditProductConfigItemContent">
<section>
<actions>
<set field="titleProperty" value="PageTitleEditProductConfigItemContent"/>
<set field="activeSubMenuItem" value="EditProductConfigItemContent"/>
<set field="labelTitleProperty" value="ProductConfigItemContent"/><!-- ProductContent -->
<set field="configItemId" from-field="parameters.configItemId"/>
<entity-one entity-name="ProductConfigItem" value-field="configItem" auto-field-map="true"/>
<script location="component://product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContent.groovy"/>
</actions>
<widgets>
<decorator-screen name="CommonConfigDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<platform-specific>
<html><html-template location="component://product/webapp/catalog/config/EditProductConfigItemContent.ftl"/></html>
</platform-specific>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="EditProductConfigItemContentContent">
<section>
<actions>
<set field="titleProperty" value="PageTitleEditProductConfigItemContent"/>
<set field="activeSubMenuItem" value="EditProductConfigItemContent"/>
<set field="labelTitleProperty" value="ProductConfigItemContent"/>
<set field="configItemId" from-field="parameters.configItemId"/>
<entity-one entity-name="ProductConfigItem" value-field="configItem" auto-field-map="true"/>
<set field="fromDate" from-field="requetParameters.fromDate" type="Timestamp"/>
<script location="component://product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContentContent.groovy"/>
</actions>
<widgets>
<decorator-screen name="CommonConfigDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<platform-specific>
<html><html-template location="component://product/webapp/catalog/config/EditProductConfigItemContentContent.ftl"/></html>
</platform-specific>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="ProductConfigItemArticle">
<section>
<actions>
<set field="titleProperty" value="PageTitleEditProductConfigItemContent"/>
<set field="activeSubMenuItem" value="ProductConfigItemArticle"/>
<set field="labelTitleProperty" value="ProductConfigItemContent"/>
<set field="configItemId" from-field="parameters.configItemId"/>
<entity-one entity-name="ProductConfigItem" value-field="configItem" auto-field-map="true"/>
</actions>
<widgets>
<decorator-screen name="CommonConfigDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet>
<include-form name="ListProductConfigItem" location="component://product/widget/catalog/ConfigForms.xml"/>
</screenlet>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
</screens>