| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| --> |
| |
| <screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd"> |
| |
| <!-- First Customer --> |
| <screen name="FirstCustomer"> |
| <section> |
| <actions> |
| <set field="titleProperty" value="PartyCreateNewCustomer"/> |
| <set field="tabButtonItemTop" value="firstcustomer"/> |
| <set field="target" value="createCustomer"/> |
| <set field="partyId" value="CUST"/> |
| <entity-condition entity-name="PartyRole" list="parties"> |
| <condition-expr field-name="roleTypeId" operator="equals" value="CUSTOMER"/> |
| </entity-condition> |
| <set field="partyId" from-field="parties[0].partyId"/> |
| <set field="customerPartyId" from-field="customerRel.partyIdFrom"/> |
| <set field="previousParams" from-field="sessionAttributes._PREVIOUS_PARAMS_"/> |
| <property-to-field field="defaultCountryGeoId" resource="general" property="country.geo.id.default" default="USA"/> |
| </actions> |
| <widgets> |
| <decorator-screen name="CommonSetupDecorator" location="${parameters.mainDecoratorLocation}"> |
| <decorator-section name="body"> |
| <section> |
| <condition> |
| <if-has-permission permission="PARTYMGR" action="_CREATE"/> |
| </condition> |
| <widgets> |
| <section> |
| <condition> |
| <if-empty field="parties"/> |
| </condition> |
| <actions> |
| <!-- fields for setDependentDropdownValuesJs.ftl, it's a try on generalization, if you need an example with more than one dropdown in a form have a look at EditProductPriceRules screen --> |
| <set field="dependentForm" value="NewCustomer"/> |
| <set field="paramKey" value="countryGeoId"/> |
| <set field="mainId" value="USER_COUNTRY"/> |
| <set field="dependentId" value="USER_STATE"/> |
| <set field="requestName" value="getAssociatedStateList"/> |
| <set field="responseName" value="stateList"/> |
| <set field="dependentKeyName" value="geoId"/> |
| <set field="descName" value="geoName"/> |
| <set field="selectedDependentOption" value="_none_"/> |
| </actions> |
| <widgets> |
| <platform-specific><html><html-template location="component://common/webcommon/includes/setDependentDropdownValuesJs.ftl"/></html></platform-specific> |
| <screenlet title="${uiLabelMap.PartyCreateNewCustomer}"> |
| <include-form name="NewCustomer" location="component://commonext/widget/ofbizsetup/SetupForms.xml"/> |
| </screenlet> |
| </widgets> |
| <fail-widgets> |
| <include-screen name="viewprofile"/> |
| </fail-widgets> |
| </section> |
| </widgets> |
| <fail-widgets> |
| <label style="h3">${uiLabelMap.PartyMgrCreatePermissionError}</label> |
| </fail-widgets> |
| </section> |
| </decorator-section> |
| </decorator-screen> |
| </widgets> |
| </section> |
| </screen> |
| |
| <screen name="viewprofile"> |
| <section> |
| <actions> |
| <set field="parameters.partyId" from-field="partyId"/> |
| </actions> |
| <widgets> |
| <include-screen name="Party" location="applications/party/widget/partymgr/ProfileScreens.xml"/> |
| <include-screen name="Contact" location="applications/party/widget/partymgr/ProfileScreens.xml"/> |
| </widgets> |
| </section> |
| </screen> |
| </screens> |
| |