Author: hansbak
Date: Thu Nov 18 03:32:01 2010 New Revision: 1036323 URL: http://svn.apache.org/viewvc?rev=1036323&view=rev Log: simplify the setup component now only for a single company, used dependent state fields, and fixed various errors Added: ofbiz/trunk/applications/commonext/webapp/ofbizsetup/error/ ofbiz/trunk/applications/commonext/webapp/ofbizsetup/error/error.jsp Modified: ofbiz/trunk/applications/commonext/script/org/ofbiz/setup/SetupEvents.xml ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/controller.xml ofbiz/trunk/applications/commonext/widget/ofbizsetup/CommonScreens.xml ofbiz/trunk/applications/commonext/widget/ofbizsetup/Menus.xml ofbiz/trunk/applications/commonext/widget/ofbizsetup/ProfileScreens.xml ofbiz/trunk/applications/commonext/widget/ofbizsetup/SetupForms.xml ofbiz/trunk/applications/commonext/widget/ofbizsetup/SetupScreens.xml Modified: ofbiz/trunk/applications/commonext/script/org/ofbiz/setup/SetupEvents.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/script/org/ofbiz/setup/SetupEvents.xml?rev=1036323&r1=1036322&r2=1036323&view=diff ============================================================================== --- ofbiz/trunk/applications/commonext/script/org/ofbiz/setup/SetupEvents.xml (original) +++ ofbiz/trunk/applications/commonext/script/org/ofbiz/setup/SetupEvents.xml Thu Nov 18 03:32:01 2010 @@ -338,18 +338,6 @@ <set field="organizationPartyId" from-field="parameters.partyId"/> <set field="personContext.partyId" from-field="parameters.customerPartyId"/> <call-simple-method method-name="createUser" xml-resource="component://party/script/org/ofbiz/party/user/UserEvents.xml"/> - - <!-- Create PartyRelationship --> - <set field="lookupValue.partyIdFrom" from-field="tempMap.partyId"/> - <set field="lookupValue.partyIdTo" from-field="organizationPartyId"/> - <set field="lookupValue.roleTypeIdFrom" value="CUSTOMER"/> - <set field="lookupValue.roleTypeIdTo" value="INTERNAL_ORGANIZATIO"/> - <set field="lookupValue.partyRelationshipTypeId" value="CUSTOMER_REL"/> - <session-to-field field="lookupValue.userLogin" session-name="userLogin"/> - <call-service service-name="createPartyRelationship" in-map-name="lookupValue"/> - - <field-to-request field="organizationPartyId" request-name="partyId"/> - <field-to-request field="tempMap.partyId" request-name="customerId"/> </simple-method> <simple-method method-name="createFacilityAndContactMech" short-description="create Facility and ContactMech"> Modified: ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/controller.xml?rev=1036323&r1=1036322&r2=1036323&view=diff ============================================================================== --- ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/controller.xml Thu Nov 18 03:32:01 2010 @@ -26,41 +26,25 @@ <request-map uri="main"> <security https="true" auth="true"/> - <response name="success" type="view" value="initialsetup"/> + <response name="success" type="view" value="initialsetup" save-home-view="true"/> </request-map> <request-map uri="initialsetup"> <security https="true" auth="true"/> - <response name="success" type="view" value="initialsetup"/> + <response name="success" type="view" value="initialsetup" save-home-view="true"/> </request-map> - <request-map uri="editpartygroup"> + <request-map uri="showMessage"> <security https="true" auth="true"/> - <response name="success" type="view" value="EditPartyGroup"/> + <response name="success" type="view" value="showMessage"/> </request-map> + + <!-- party requests --> <request-map uri="updatePartyGroup"> <security https="true" auth="true"/> <event type="service" path="" invoke="updatePartyGroup"/> - <response name="success" type="request" value="viewprofile"/> + <response name="success" type="request" value="initialsetup"/> <response name="error" type="view" value="EditPartyGroup"/> </request-map> - <request-map uri="editperson"> - <security https="true" auth="true"/> - <response name="success" type="view" value="EditPerson"/> - </request-map> - <request-map uri="updatePerson"> - <security https="true" auth="true"/> - <event type="service" path="" invoke="updatePerson"/> - <response name="success" type="view-last"/> - <response name="error" type="view" value="EditPerson"/> - </request-map> - <request-map uri="viewprofile"> - <security https="true" auth="true"/> - <response name="success" type="view" value="viewprofile" save-home-view="true"/> - </request-map> - <request-map uri="showMessage"> - <security https="true" auth="true"/> - <response name="success" type="view" value="showMessage"/> - </request-map> <!-- Entity Export requests --> <request-map uri="EntityExportAll"> @@ -100,14 +84,14 @@ <request-map uri="createOrganization"> <security https="true" auth="true"/> <event type="simple" path="component://commonext/script/org/ofbiz/setup/SetupEvents.xml" invoke="createOrganization"/> - <response name="success" type="view" value="viewprofile"/> + <response name="success" type="view" value="initialsetup"/> <response name="error" type="view" value="initialsetup"/> </request-map> <request-map uri="OrganizationToComplete"> <security https="true" auth="true"/> <event type="simple" path="component://commonext/script/org/ofbiz/setup/SetupEvents.xml" invoke="setupDefaultGeneralLedger"/> - <response name="success" type="view" value="initialsetup"/> + <response name="success" type="url" value="/catalog"/> <response name="error" type="view" value="initialsetup"/> </request-map> @@ -214,9 +198,6 @@ <!-- View Mappings --> <view-map name="initialsetup" type="screen" page="component://commonext/widget/ofbizsetup/SetupScreens.xml#InitialSetup"/> <view-map name="showMessage" type="screen" page="component://commonext/widget/ofbizsetup/SetupScreens.xml#nopartyAcctgPreference"/> - <view-map name="viewprofile" type="screen" page="component://commonext/widget/ofbizsetup/ProfileScreens.xml#viewprofile"/> - <view-map name="EditPerson" type="screen" page="component://commonext/widget/ofbizsetup/ProfileScreens.xml#EditPerson"/> - <view-map name="EditPartyGroup" type="screen" page="component://commonext/widget/ofbizsetup/ProfileScreens.xml#EditPartyGroup"/> <view-map name="ViewFacility" type="screen" page="component://commonext/widget/ofbizsetup/SetupScreens.xml#ViewFacility"/> <view-map name="EditFacility" type="screen" page="component://commonext/widget/ofbizsetup/SetupScreens.xml#EditFacility"/> Added: ofbiz/trunk/applications/commonext/webapp/ofbizsetup/error/error.jsp URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/webapp/ofbizsetup/error/error.jsp?rev=1036323&view=auto ============================================================================== --- ofbiz/trunk/applications/commonext/webapp/ofbizsetup/error/error.jsp (added) +++ ofbiz/trunk/applications/commonext/webapp/ofbizsetup/error/error.jsp Thu Nov 18 03:32:01 2010 @@ -0,0 +1,52 @@ +<%-- +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. +--%> +<%@ page import="org.ofbiz.base.util.*" %> +<html> +<head> +<title>Open For Business Message</title> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +</head> + +<% String errorMsg = (String) request.getAttribute("_ERROR_MESSAGE_"); %> + +<body bgcolor="#FFFFFF"> +<div align="center"> + <br/> + <table width="100%" border="1" height="200"> + <tr> + <td> + <table width="100%" border="0" height="200"> + <tr bgcolor="#CC6666"> + <td height="45"> + <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="4" color="#FFFFFF"><b>:ERROR MESSAGE:</b></font></div> + </td> + </tr> + <tr> + <td> + <div align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><%=UtilFormatOut.replaceString(errorMsg, "\n", "<br/>")%></font></div> + </td> + </tr> + </table> + </td> + </tr> + </table> +</div> +<div align="center"></div> +</body> +</html> Modified: ofbiz/trunk/applications/commonext/widget/ofbizsetup/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/widget/ofbizsetup/CommonScreens.xml?rev=1036323&r1=1036322&r2=1036323&view=diff ============================================================================== --- ofbiz/trunk/applications/commonext/widget/ofbizsetup/CommonScreens.xml (original) +++ ofbiz/trunk/applications/commonext/widget/ofbizsetup/CommonScreens.xml Thu Nov 18 03:32:01 2010 @@ -51,11 +51,21 @@ </section> </screen> + <screen name="CommonPartyDecorator"> + <section> + <widgets> + <include-screen name="CommonSetupDecorator"/> + </widgets> + </section> + </screen> + <screen name="CommonSetupDecorator"> <section> <actions> - <set field="headerItem" value="init"/> - <set field="partyId" from-field="parameters.partyId"/> + <entity-condition entity-name="PartyRole" list="parties"> + <condition-expr field-name="roleTypeId" operator="equals" value="INTERNAL_ORGANIZATIO"/> + </entity-condition> + <set field="partyId" from-field="parties[0].partyId"/> <entity-one entity-name="Party" value-field="party"/> <entity-one entity-name="PartyGroup" value-field="lookupGroup"/> </actions> @@ -66,13 +76,26 @@ <condition> <and> <if-service-permission service-name="partyBasePermissionCheck" main-action="VIEW"/> - <not><if-empty field="party"/></not> + <if-compare operator="not-equals" value="init" field="headerItem"/> </and> </condition> <widgets> <include-menu location="component://commonext/widget/ofbizsetup/Menus.xml" name="SetupSubTabBar"/> </widgets> </section> + <section> + <condition> + <not><if-empty field="partyId"/></not> + </condition> + <widgets> + <container style="button-bar"> + <link target="OrganizationToComplete" text="${uiLabelMap.SetupSetToComplete}" style="buttontext"> + <parameter param-name="partyId" from-field="organizationPartyId"/> + <parameter param-name="roleTypeId" value="ORGANIZATION_ROLE"/> + </link> + </container> + </widgets> + </section> </decorator-section> <decorator-section name="body"> <section> Modified: ofbiz/trunk/applications/commonext/widget/ofbizsetup/Menus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/widget/ofbizsetup/Menus.xml?rev=1036323&r1=1036322&r2=1036323&view=diff ============================================================================== --- ofbiz/trunk/applications/commonext/widget/ofbizsetup/Menus.xml (original) +++ ofbiz/trunk/applications/commonext/widget/ofbizsetup/Menus.xml Thu Nov 18 03:32:01 2010 @@ -21,7 +21,7 @@ <menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd"> <menu name="SetupAppBar" title="${uiLabelMap.SetupApp}" extends="CommonAppBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> - <menu-item name="init" title="${uiLabelMap.SetupInitialSetup}"> + <menu-item name="main" title="${uiLabelMap.SetupInitialSetup}"> <link target="initialsetup"/> </menu-item> <menu-item name="export" title="${uiLabelMap.PageTitleEntityExportAll}"> @@ -32,31 +32,45 @@ <menu name="SetupSubTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml" selected-menuitem-context-field-name="tabButtonItemTop"> <menu-item name="organization" title="${uiLabelMap.SetupOrganization}"> - <link target="viewprofile"> - <parameter param-name="partyId"/> - </link> + <condition> + <not><if-empty field="partyId"/></not> + </condition> + <link target="initialsetup"/> </menu-item> <menu-item name="facility" title="${uiLabelMap.SetupFacility}"> + <condition> + <not><if-empty field="partyId"/></not> + </condition> <link target="EditFacility"> <parameter param-name="partyId"/> </link> </menu-item> <menu-item name="productstore" title="${uiLabelMap.SetupProductStore}"> + <condition> + <not><if-empty field="partyId"/></not> + </condition> <link target="EditProductStore"> <parameter param-name="partyId"/> </link> </menu-item> <menu-item name="website" title="${uiLabelMap.SetupWebSite}"> + <condition> + <not><if-empty field="partyId"/></not> + </condition> <link target="EditWebSite"> <parameter param-name="partyId"/> </link> </menu-item> <menu-item name="firstcustomer" title="${uiLabelMap.SetupFirstCustomer}"> - <link target="firstcustomer"> - <parameter param-name="partyId"/> - </link> + <condition> + <not><if-empty field="partyId"/></not> + </condition> + <link target="firstcustomer"/> </menu-item> <menu-item name="firstproduct" title="${uiLabelMap.SetupFirstProduct}"> + <condition> + <not><if-empty field="partyId"/></not> + </condition> <link target="firstproduct"> <parameter param-name="partyId"/> </link> Modified: ofbiz/trunk/applications/commonext/widget/ofbizsetup/ProfileScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/widget/ofbizsetup/ProfileScreens.xml?rev=1036323&r1=1036322&r2=1036323&view=diff ============================================================================== --- ofbiz/trunk/applications/commonext/widget/ofbizsetup/ProfileScreens.xml (original) +++ ofbiz/trunk/applications/commonext/widget/ofbizsetup/ProfileScreens.xml Thu Nov 18 03:32:01 2010 @@ -27,21 +27,13 @@ <actions> <set field="titleProperty" value="PartyCreateNewCustomer"/> <set field="tabButtonItemTop" value="firstcustomer"/> - <set field="target" value="createCustomer"/> - <set field="partyId" from-field="parameters.partyId"/> - <entity-condition entity-name="PartyRelationship" list="customerRels" filter-by-date="true"> - <condition-list> - <condition-expr field-name="partyIdTo" from-field="partyId"/> - <condition-expr field-name="roleTypeIdFrom" value="CUSTOMER"/> - <condition-expr field-name="roleTypeIdTo" value="INTERNAL_ORGANIZATIO"/> - <condition-expr field-name="partyRelationshipTypeId" value="CUSTOMER_REL"/> - </condition-list> + <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="customerRel" from-field="customerRels[0]"/> - + <set field="partyId" from-field="parties[0].partyId"/> <set field="customerPartyId" from-field="customerRel.partyIdFrom"/> - <set field="organizationPartyId" from-field="parameters.partyId"/> <set field="previousParams" from-field="sessionAttributes._PREVIOUS_PARAMS_"/> <property-to-field field="defaultCountryGeoId" resource="general" property="country.geo.id.default" default="USA"/> </actions> @@ -55,16 +47,28 @@ <widgets> <section> <condition> - <not><if-empty field="customerRel"/></not> + <if-empty field="parties"/> </condition> + <actions> + <!-- fields for setDependentDropdownValuesJs.ftl, it's a try on generalization but there are still issues. For instance: what if we have 2 couple of dependent dropdowns in the same form? --> + <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> - <include-screen name="Party"/> - <include-screen name="Contact"/> - </widgets> - <fail-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> @@ -80,223 +84,14 @@ <screen name="viewprofile"> <section> - <actions> - <set field="tabButtonItemTop" value="organization"/> - <set field="organizationPartyId" from-field="parameters.partyId"/> - <entity-condition entity-name="PartyRole" list="partyRoles"> - <condition-list combine="and"> - <condition-expr field-name="partyId" operator="equals" from-field="organizationPartyId"/> - <condition-expr field-name="roleTypeId" operator="equals" value="ORGANIZATION_ROLE"/> - </condition-list> - </entity-condition> - <set field="partyRole" from-field="partyRoles[0]"/> - </actions> + <actions> + <set field="parameters.partyId" from-field="partyId"/> + </actions> <widgets> - <decorator-screen name="CommonSetupDecorator" location="${parameters.mainDecoratorLocation}"> - <decorator-section name="body"> - <section> - <condition> - <if-empty field="partyRole"/> - </condition> - <widgets> - <container style="button-bar"> - <link target="OrganizationToComplete" text="${uiLabelMap.SetupSetToComplete}" style="buttontext"> - <parameter param-name="partyId" from-field="organizationPartyId"/> - <parameter param-name="roleTypeId" value="ORGANIZATION_ROLE"/> - </link> - </container> - </widgets> - </section> - <include-screen name="Party"/> - <include-screen name="Contact"/> - </decorator-section> - </decorator-screen> - </widgets> - </section> - </screen> - - <screen name="Party"> - <section> - <actions> - <entity-condition entity-name="PartyRelationship" list="customerRels" filter-by-date="true"> - <condition-list> - <condition-expr field-name="partyIdTo" from-field="parameters.partyId"/> - <condition-expr field-name="roleTypeIdFrom" value="CUSTOMER"/> - <condition-expr field-name="roleTypeIdTo" value="INTERNAL_ORGANIZATIO"/> - <condition-expr field-name="partyRelationshipTypeId" value="CUSTOMER_REL"/> - </condition-list> - </entity-condition> - <set field="customerRel" from-field="customerRels[0]"/> - - <set field="partyId" from-field="customerPartyId" default-value="${organizationPartyId}"/> - <entity-and entity-name="PartyNameHistory" list="partyNameHistoryList"> - <field-map field-name="partyId" from-field="partyId"/> - <order-by field-name="-changeDate"/> - </entity-and> - <entity-one entity-name="PartyAndGroup" value-field="lookupGroup"> - <field-map field-name="partyId" from-field="parameters.partyId"/> - </entity-one> - <entity-one entity-name="PartyAndPerson" value-field="lookupPerson"> - <field-map field-name="partyId" from-field="customerPartyId"/> - </entity-one> - </actions> - <widgets> - <section> - <condition> - <and> - <if-compare field="tabButtonItemTop" operator="equals" value="firstcustomer"/> - <not><if-empty field="lookupPerson"/></not> - </and> - </condition> - <widgets> - <container> - <label style="h1" text="${uiLabelMap.SetupTheFirstCustomerOf} ${lookupGroup.groupName}"/> - </container> - <container style="clear"/> - <section> - <condition> - <or> - <if-has-permission permission="PARTYMGR" action="_GRP_UPDATE"/> - <if-compare-field field="customerPartyId" operator="equals" to-field="userLogin.partyId"/> - </or> - </condition> - <widgets> - <screenlet title="${uiLabelMap.PartyPersonalInformation}" navigation-menu-name="personUpdate" id="PartyPersonalInformationPanel"> - <include-menu name="personUpdate" location="component://commonext/widget/ofbizsetup/Menus.xml"/> - <include-form name="ViewPartyPerson" location="component://party/widget/partymgr/PartyForms.xml"/> - <section> - <condition> - <not><if-empty field="partyNameHistoryList"/></not> - </condition> - <widgets> - <include-form name="ViewPartyPersonHistory" location="component://party/widget/partymgr/PartyForms.xml"/> - </widgets> - </section> - </screenlet> - </widgets> - <fail-widgets> - <screenlet title="${uiLabelMap.PartyPersonalInformation}" navigation-menu-name="personUpdate" id="PartyPersonalInformationPanel"> - <include-form name="ViewPartyPerson" location="component://party/widget/partymgr/PartyForms.xml"/> - <section> - <condition> - <not><if-empty field="partyNameHistoryList"/></not> - </condition> - <widgets> - <include-form name="ViewPartyPersonHistory" location="component://party/widget/partymgr/PartyForms.xml"/> - </widgets> - </section> - </screenlet> - </fail-widgets> - </section> - </widgets> - </section> - <section> - <condition> - <and> - <if-compare field="tabButtonItemTop" operator="equals" value="organization"/> - <not><if-empty field="lookupGroup"/></not> - </and> - </condition> - <widgets> - <section> - <condition> - <if-has-permission permission="PARTYMGR" action="_GRP_UPDATE"/> - </condition> - <widgets> - <screenlet title="${uiLabelMap.SetupOrganizationInformation}" navigation-menu-name="groupUpdate" id="PartyGroupInformationPanel"> - <include-menu name="groupUpdate" location="component://commonext/widget/ofbizsetup/Menus.xml"/> - <include-form name="ViewOrganization" location="component://commonext/widget/ofbizsetup/SetupForms.xml"/> - <section> - <condition> - <not><if-empty field="partyNameHistoryList"/></not> - </condition> - <widgets> - <include-form name="ViewPartyGroupHistory" location="component://party/widget/partymgr/PartyForms.xml"/> - </widgets> - </section> - </screenlet> - </widgets> - <fail-widgets> - <screenlet title="${uiLabelMap.SetupOrganizationInformation}" navigation-menu-name="groupUpdate" id="PartyGroupInformationPanel"> - <include-form name="ViewOrganization" location="component://commonext/widget/ofbizsetup/SetupForms.xml"/> - <section> - <condition> - <not><if-empty field="partyNameHistoryList"/></not> - </condition> - <widgets> - <include-form name="ViewPartyGroupHistory" location="component://party/widget/partymgr/PartyForms.xml"/> - </widgets> - </section> - </screenlet> - </fail-widgets> - </section> - </widgets> - </section> - </widgets> - </section> - </screen> - - <screen name="Contact"> - <section> - <actions> - <set field="partyId" from-field="customerPartyId" default-value="${parameters.partyId}"/> - <script location="component://party/webapp/partymgr/WEB-INF/actions/party/GetContactMechs.groovy"/> - <script location="component://party/webapp/partymgr/WEB-INF/actions/party/GetUserLoginPrimaryEmail.groovy"/> - </actions> - <widgets> - <platform-specific> - <html> - <html-template location="component://party/webapp/partymgr/party/profileblocks/Contact.ftl"/> - </html> - </platform-specific> - </widgets> - </section> - </screen> - - <screen name="EditPartyGroup"> - <section> - <actions> - <set field="titleProperty" value="SetupEditOrganizationInformation"/> - <set field="tabButtonItemTop" value="organization"/> - <set field="labelTitleProperty" value="SetupEditOrganizationInformation"/> - - <set field="donePage" from-field="parameters.DONE_PAGE" default-value="viewprofile"/> - <set field="partyId" from-field="parameters.partyId"/> - <entity-one entity-name="PartyAndGroup" value-field="partyGroup"/> - </actions> - <widgets> - <decorator-screen name="CommonSetupDecorator" location="${parameters.mainDecoratorLocation}"> - <decorator-section name="body"> - <screenlet title="${uiLabelMap.SetupEditOrganizationInformation}"> - <include-form name="EditPartyGroup" location="component://party/widget/partymgr/PartyForms.xml"/> - </screenlet> - </decorator-section> - </decorator-screen> - </widgets> - </section> - </screen> - - <screen name="EditPerson"> - <section> - <actions> - <set field="titleProperty" value="PageTitleEditPersonalInformation"/> - <set field="tabButtonItemTop" value="firstcustomer"/> - <set field="labelTitleProperty" value="PageTitleEditPersonalInformation"/> - - <set field="donePage" from-field="parameters.DONE_PAGE" default-value="firstcustomer"/> - <set field="partyId" from-field="parameters.customerPartyId"/> - <entity-one entity-name="PartyAndPerson" value-field="personInfo"/> - <set field="parameters.partyId" from-field="parameters.organizationPartyId"/> - </actions> - <widgets> - <decorator-screen name="CommonSetupDecorator" location="${parameters.mainDecoratorLocation}"> - <decorator-section name="body"> - <screenlet title="${uiLabelMap.PageTitleEditPersonalInformation}"> - <include-form name="EditCustomer" location="component://commonext/widget/ofbizsetup/SetupForms.xml"/> - </screenlet> - </decorator-section> - </decorator-screen> + <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> + Modified: ofbiz/trunk/applications/commonext/widget/ofbizsetup/SetupForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/widget/ofbizsetup/SetupForms.xml?rev=1036323&r1=1036322&r2=1036323&view=diff ============================================================================== --- ofbiz/trunk/applications/commonext/widget/ofbizsetup/SetupForms.xml (original) +++ ofbiz/trunk/applications/commonext/widget/ofbizsetup/SetupForms.xml Thu Nov 18 03:32:01 2010 @@ -24,24 +24,17 @@ <form name="NewOrganization" type="single" target="${target}${previousParams}" focus-field-name="USER_TITLE" header-row-style="header-row" default-table-style="basic-table"> <field name="USE_ADDRESS"><hidden value="${USE_ADDRESS}"/></field> + <field name="require_email"><hidden value="${require_email}"/></field> <field name="partyId"><text/></field> <field name="groupName" title="${uiLabelMap.SetupOrganizationName}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text size="30" maxlength="60"/></field> - <field name="ShippingAddressTitle" title="${uiLabelMap.PartyAddressMailingShipping}" title-area-style="group-label"><display description=" " also-hidden="false"/></field> <field name="USER_ADDRESS1" title="${uiLabelMap.CommonAddress1}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text size="30" maxlength="60"/></field> <field name="USER_ADDRESS2" title="${uiLabelMap.CommonAddress2}"><text size="30" maxlength="60"/></field> <field name="USER_CITY" title="${uiLabelMap.CommonCity}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text size="30" maxlength="60"/></field> - <field name="USER_STATE" title="${uiLabelMap.CommonState}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"> - <drop-down allow-empty="true"> - <entity-options entity-name="Geo" key-field-name="geoId" description="${geoId} - ${geoName}"> - <entity-constraint name="geoTypeId" operator="in" value="STATE,PROVINCE"/> - <entity-order-by field-name="geoId"/> - </entity-options> - </drop-down> - </field> + <field name="USER_STATE" title="${uiLabelMap.CommonState}" widget-style="required"><drop-down allow-empty="false"/></field> <field name="USER_POSTAL_CODE" title="${uiLabelMap.CommonZipPostalCode}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text size="10" maxlength="30"/></field> <field name="USER_COUNTRY" title="${uiLabelMap.CommonCountry}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"> - <drop-down allow-empty="false" no-current-selected-key="${defaultCountryGeoId}"> + <drop-down no-current-selected-key="${defaultCountryGeoId}"> <entity-options entity-name="Geo" key-field-name="geoId" description="${geoId}: ${geoName}"> <entity-constraint name="geoTypeId" value="COUNTRY"/> <entity-order-by field-name="geoId"/> Modified: ofbiz/trunk/applications/commonext/widget/ofbizsetup/SetupScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/widget/ofbizsetup/SetupScreens.xml?rev=1036323&r1=1036322&r2=1036323&view=diff ============================================================================== --- ofbiz/trunk/applications/commonext/widget/ofbizsetup/SetupScreens.xml (original) +++ ofbiz/trunk/applications/commonext/widget/ofbizsetup/SetupScreens.xml Thu Nov 18 03:32:01 2010 @@ -24,35 +24,52 @@ <screen name="InitialSetup"> <section> <actions> + <set field="tabButtonItemTop" value="organization"/> <set field="titleProperty" value="SetupCreateNewOrganization"/> <set field="target" value="createOrganization"/> <set field="previousParams" from-field="sessionAttributes._PREVIOUS_PARAMS_"/> + <property-to-field field="defaultCountryGeoId" resource="general" property="country.geo.id.default" default="USA"/> <entity-condition entity-name="PartyRole" list="parties"> <condition-expr field-name="roleTypeId" operator="equals" value="INTERNAL_ORGANIZATIO"/> </entity-condition> - <property-to-field field="defaultCountryGeoId" resource="general" property="country.geo.id.default" default="USA"/> + <set field="partyId" from-field="parties[0].partyId"/> + <set field="parameters.partyId" from-field="parties[0].partyId"/> </actions> <widgets> - <decorator-screen name="CommonSetupDecorator" location="${parameters.mainDecoratorLocation}"> - <decorator-section name="body"> - <section> - <condition> - <if-has-permission permission="PARTYMGR" action="_CREATE"/> - </condition> - <widgets> - <screenlet title="${uiLabelMap.AccountingAvailableInternalOrganizations}"> - <include-form name="ListOrganizations" location="component://commonext/widget/ofbizsetup/SetupForms.xml"/> - </screenlet> + <decorator-screen name="CommonSetupDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <section> + <condition> + <if-empty field="parties"/> + </condition> + <widgets> + <section> + <actions> + <!-- fields for setDependentDropdownValuesJs.ftl, it's a try on generalization but there are still issues. For instance: what if we have 2 couple of dependent dropdowns in the same form? --> + <set field="dependentForm" value="NewOrganization"/> + <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.SetupCreateNewOrganization}"> <include-form name="NewOrganization" location="component://commonext/widget/ofbizsetup/SetupForms.xml"/> </screenlet> - </widgets> - <fail-widgets> - <label style="h3">${uiLabelMap.PartyMgrCreatePermissionError}</label> - </fail-widgets> - </section> - </decorator-section> - </decorator-screen> + </widgets> + </section> + </widgets> + <fail-widgets> + <include-screen name="viewprofile" location="component://commonext/widget/ofbizsetup/ProfileScreens.xml"/> + </fail-widgets> + </section> + </decorator-section> + </decorator-screen> </widgets> </section> </screen> |
Free forum by Nabble | Edit this page |