Author: ashish
Date: Thu Apr 23 12:31:06 2009 New Revision: 767904 URL: http://svn.apache.org/viewvc?rev=767904&view=rev Log: I have changed the request name. As it is not good practice to keep two request same and change the case only (For ex: we have CreateLead & createLead). I think it creates ambiguity. The best practice(as far as I learned) is to use "New" prefix for all the request if you are using the form only to create a record. Although if you are using the same form for create & update then you should add "Edit" prefix before each request. SFA will be bit large very soon so its safe to remove such issues in early stage. Here is the code snippet : <request-map uri="CreateLead"> <security https="true" auth="true"/> <response name="success" type="view" value="CreateLead"/> </request-map> <request-map uri="createLead"> <security https="true" auth="true"/> <event type="service" invoke="createLead"/> <response name="success" type="request" value="viewprofile"/> <response name="error" type="view" value="CreateLead"/> </request-map> Modified: ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml ofbiz/trunk/applications/marketing/widget/sfa/AccountScreens.xml ofbiz/trunk/applications/marketing/widget/sfa/ContactScreens.xml ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml ofbiz/trunk/applications/marketing/widget/sfa/forms/ContactForms.xml ofbiz/trunk/applications/marketing/widget/sfa/forms/LeadForms.xml Modified: ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml?rev=767904&r1=767903&r2=767904&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml Thu Apr 23 12:31:06 2009 @@ -61,15 +61,15 @@ <security https="true" auth="true"/> <response name="success" type="view" value="FindAccounts"/> </request-map> - <request-map uri="NewAccounts"> + <request-map uri="NewAccount"> <security https="true" auth="true"/> - <response name="success" type="view" value="NewAccounts"/> + <response name="success" type="view" value="NewAccount"/> </request-map> <request-map uri="createAccount"> <security https="true" auth="true"/> <event type="service" invoke="createAccount"/> <response name="success" type="view" value="FindAccounts"/> - <response name="error" type="view" value="NewAccounts"/> + <response name="error" type="view" value="NewAccount"/> </request-map> <!-- Lead Requests --> @@ -77,15 +77,15 @@ <security https="true" auth="true"/> <response name="success" type="view" value="FindLeads"/> </request-map> - <request-map uri="CreateLead"> + <request-map uri="NewLead"> <security https="true" auth="true"/> - <response name="success" type="view" value="CreateLead"/> + <response name="success" type="view" value="NewLead"/> </request-map> <request-map uri="createLead"> <security https="true" auth="true"/> <event type="service" invoke="createLead"/> <response name="success" type="request" value="viewprofile"/> - <response name="error" type="view" value="CreateLead"/> + <response name="error" type="view" value="NewLead"/> </request-map> <request-map uri="ConvertLead"> <security https="true" auth="true"/> @@ -113,15 +113,15 @@ <response name="success" type="request" value="viewprofile"/> <response name="error" type="view" value="MergeLeads"/> </request-map> - <request-map uri="CreateLeadFromVCard"> + <request-map uri="NewLeadFromVCard"> <security https="true" auth="true"/> - <response name="success" type="view" value="CreateLeadFromVCard"/> + <response name="success" type="view" value="NewLeadFromVCard"/> </request-map> <request-map uri="createLeadFromVCard"> <security https="true" auth="true"/> <event type="service" invoke="importVCard"/> <response name="success" type="request" value="viewprofile"/><!-- What would be the view in case a vCard has more than one contact --> - <response name="error" type="view" value="CreateLeadFromVCard"/> + <response name="error" type="view" value="NewLeadFromVCard"/> </request-map> <request-map uri="quickAddLead"> <security https="true" auth="true"/> @@ -133,15 +133,15 @@ <security https="true" auth="true"/> <response name="success" type="view" value="FindContacts"/> </request-map> - <request-map uri="CreateContact"> + <request-map uri="NewContact"> <security https="true" auth="true"/> - <response name="success" type="view" value="CreateContact"/> + <response name="success" type="view" value="NewContact"/> </request-map> <request-map uri="createContact"> <security https="true" auth="true"/> <event type="service" invoke="createContact"/> <response name="success" type="request" value="viewprofile"/> - <response name="error" type="view" value="CreateContact"/> + <response name="error" type="view" value="NewContact"/> </request-map> <request-map uri="MergeContacts"> <security https="true" auth="true"/> @@ -153,15 +153,15 @@ <response name="success" type="request" value="viewprofile"/> <response name="error" type="view" value="MergeContacts"/> </request-map> - <request-map uri="CreateContactFromVCard"> + <request-map uri="NewContactFromVCard"> <security https="true" auth="true"/> - <response name="success" type="view" value="CreateContactFromVCard"/> + <response name="success" type="view" value="NewContactFromVCard"/> </request-map> <request-map uri="createContactFromVCard"> <security https="true" auth="true"/> <event type="service" invoke="importVCard"/> <response name="success" type="request" value="viewprofile"/><!-- What would be the view in case a vCard contains more than one contact --> - <response name="error" type="view" value="CreateContactFromVCard"/> + <response name="error" type="view" value="NewContactFromVCard"/> </request-map> <request-map uri="createVCardFromContact"> <security https="true" auth="true"/> @@ -235,19 +235,19 @@ <view-map name="EditOpportunity" type="screen" page="component://marketing/widget/sfa/OpportunityScreens.xml#EditOpportunity"/> <view-map name="FindAccounts" type="screen" page="component://marketing/widget/sfa/AccountScreens.xml#FindAccounts"/> - <view-map name="NewAccounts" type="screen" page="component://marketing/widget/sfa/AccountScreens.xml#NewAccounts"/> + <view-map name="NewAccount" type="screen" page="component://marketing/widget/sfa/AccountScreens.xml#NewAccount"/> <view-map name="FindLeads" type="screen" page="component://marketing/widget/sfa/LeadScreens.xml#FindLeads"/> - <view-map name="CreateLead" type="screen" page="component://marketing/widget/sfa/LeadScreens.xml#CreateLead"/> + <view-map name="NewLead" type="screen" page="component://marketing/widget/sfa/LeadScreens.xml#NewLead"/> <view-map name="CloneLead" type="screen" page="component://marketing/widget/sfa/LeadScreens.xml#CloneLead"/> <view-map name="ConvertLead" type="screen" page="component://marketing/widget/sfa/LeadScreens.xml#ConvertLead"/> <view-map name="MergeLeads" type="screen" page="component://marketing/widget/sfa/LeadScreens.xml#MergeLeads"/> - <view-map name="CreateLeadFromVCard" type="screen" page="component://marketing/widget/sfa/LeadScreens.xml#CreateLeadFromVCard"/> + <view-map name="NewLeadFromVCard" type="screen" page="component://marketing/widget/sfa/LeadScreens.xml#NewLeadFromVCard"/> <view-map name="FindContacts" type="screen" page="component://marketing/widget/sfa/ContactScreens.xml#FindContacts"/> - <view-map name="CreateContact" type="screen" page="component://marketing/widget/sfa/ContactScreens.xml#CreateContact"/> + <view-map name="NewContact" type="screen" page="component://marketing/widget/sfa/ContactScreens.xml#NewContact"/> <view-map name="MergeContacts" type="screen" page="component://marketing/widget/sfa/ContactScreens.xml#MergeContacts"/> - <view-map name="CreateContactFromVCard" type="screen" page="component://marketing/widget/sfa/ContactScreens.xml#CreateContactFromVCard"/> + <view-map name="NewContactFromVCard" type="screen" page="component://marketing/widget/sfa/ContactScreens.xml#NewContactFromVCard"/> <view-map name="FindSalesForecast" type="screen" page="component://marketing/widget/sfa/ForecastScreens.xml#FindSalesForecast"/> <view-map name="EditSalesForecast" type="screen" page="component://marketing/widget/sfa/ForecastScreens.xml#EditSalesForecast"/> Modified: ofbiz/trunk/applications/marketing/widget/sfa/AccountScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/AccountScreens.xml?rev=767904&r1=767903&r2=767904&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/widget/sfa/AccountScreens.xml (original) +++ ofbiz/trunk/applications/marketing/widget/sfa/AccountScreens.xml Thu Apr 23 12:31:06 2009 @@ -74,7 +74,7 @@ </widgets> </section> </screen> - <screen name="NewAccounts"> + <screen name="NewAccount"> <section> <actions> <set field="headerItem" value="Accounts"/> Modified: ofbiz/trunk/applications/marketing/widget/sfa/ContactScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/ContactScreens.xml?rev=767904&r1=767903&r2=767904&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/widget/sfa/ContactScreens.xml (original) +++ ofbiz/trunk/applications/marketing/widget/sfa/ContactScreens.xml Thu Apr 23 12:31:06 2009 @@ -66,7 +66,7 @@ </widgets> </section> </screen> - <screen name="CreateContact"> + <screen name="NewContact"> <section> <actions> <set field="titleProperty" value="PageTitleCreateContact"/> @@ -83,7 +83,7 @@ <container style="screenlet-body"> <section> <widgets> - <include-form name="CreateContact" location="component://marketing/widget/sfa/forms/ContactForms.xml"/> + <include-form name="NewContact" location="component://marketing/widget/sfa/forms/ContactForms.xml"/> </widgets> </section> </container> @@ -141,7 +141,7 @@ </section> </screen> - <screen name="CreateContactFromVCard"> + <screen name="NewContactFromVCard"> <section> <actions> <set field="titleProperty" value="PageTitleCreateContactFromVCard"/> @@ -158,7 +158,7 @@ <container style="screenlet-body"> <section> <widgets> - <include-form name="CreateContactFromVCard" location="component://marketing/widget/sfa/forms/ContactForms.xml"/> + <include-form name="NewContactFromVCard" location="component://marketing/widget/sfa/forms/ContactForms.xml"/> </widgets> </section> </container> Modified: ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml?rev=767904&r1=767903&r2=767904&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml (original) +++ ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml Thu Apr 23 12:31:06 2009 @@ -64,7 +64,7 @@ </section> </screen> - <screen name="CreateLead"> + <screen name="NewLead"> <section> <actions> <set field="titleProperty" value="PageTitleCreateLead"/> @@ -196,7 +196,7 @@ </section> </screen> - <screen name="CreateLeadFromVCard"> + <screen name="NewLeadFromVCard"> <section> <actions> <set field="titleProperty" value="PageTitleCreateLeadFromVCard"/> @@ -214,7 +214,7 @@ <section> <widgets> <label><br/></label> - <include-form name="CreateLeadFromVCard" location="component://marketing/widget/sfa/forms/LeadForms.xml"/> + <include-form name="NewLeadFromVCard" location="component://marketing/widget/sfa/forms/LeadForms.xml"/> </widgets> </section> </container> Modified: ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml?rev=767904&r1=767903&r2=767904&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml (original) +++ ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml Thu Apr 23 12:31:06 2009 @@ -52,7 +52,7 @@ <menu name="AccountSubTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml" menu-container-style="button-bar button-style-2 no-clear"> <menu-item name="NewAccounts" title="${uiLabelMap.PageTitleCreateAccount}"> - <link target="NewAccounts"/> + <link target="NewAccount"/> </menu-item> </menu> @@ -85,11 +85,11 @@ <menu name="LeadSubTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml" menu-container-style="button-bar button-style-2 no-clear"> - <menu-item name="CreateLead" title="${uiLabelMap.CommonCreateNew}"> - <link target="CreateLead"/> + <menu-item name="NewLead" title="${uiLabelMap.CommonCreateNew}"> + <link target="NewLead"/> </menu-item> - <menu-item name="CreateLeadFromVCard" title="${uiLabelMap.SfaImportLead}"> - <link target="CreateLeadFromVCard"/> + <menu-item name="NewLeadFromVCard" title="${uiLabelMap.PageTitleCreateLeadFromVCard}"> + <link target="NewLeadFromVCard"/> </menu-item> </menu> @@ -105,11 +105,11 @@ </menu> <menu name="ContactSubTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml" menu-container-style="button-bar button-style-2 no-clear"> - <menu-item name="CreateContact" title="${uiLabelMap.CommonCreateNew}"> - <link target="CreateContact"/> + <menu-item name="NewContact" title="${uiLabelMap.CommonCreateNew}"> + <link target="NewContact"/> </menu-item> - <menu-item name="CreateContactFromVCard" title="${uiLabelMap.SfaCreateContactFromVCard}"> - <link target="CreateContactFromVCard"/> + <menu-item name="NewContactFromVCard" title="${uiLabelMap.SfaCreateContactFromVCard}"> + <link target="NewContactFromVCard"/> </menu-item> </menu> <menu name="SalesForecastTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> Modified: ofbiz/trunk/applications/marketing/widget/sfa/forms/ContactForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/forms/ContactForms.xml?rev=767904&r1=767903&r2=767904&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/widget/sfa/forms/ContactForms.xml (original) +++ ofbiz/trunk/applications/marketing/widget/sfa/forms/ContactForms.xml Thu Apr 23 12:31:06 2009 @@ -43,7 +43,7 @@ </hyperlink> </field> </form> - <form name="CreateContact" type="single" target="createContact" header-row-style="header-row" default-table-style="basic-table"> + <form name="NewContact" type="single" target="createContact" header-row-style="header-row" default-table-style="basic-table"> <field name="firstName" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text/></field> <field name="lastName" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text/></field> <field name="suffix"><text/></field> @@ -103,7 +103,7 @@ <field name="submitButton" position="3" title="${uiLabelMap.SfaMergeContacts}" widget-style="buttontext" tooltip-style="button-text"><submit button-type="text-link"/></field> </form> - <form name="CreateContactFromVCard" type="upload" target="createContactFromVCard" header-row-style="header-row" default-table-style="basic-table"> + <form name="NewContactFromVCard" type="upload" target="createContactFromVCard" header-row-style="header-row" default-table-style="basic-table"> <field name="infile" title="${uiLabelMap.SfaUploadVCard}"><file/></field> <field name="serviceName"><hidden value="createContact"/></field> <field name="submitButton" title="${uiLabelMap.CommonUpload}" widget-style="smallSubmit"><submit button-type="button"/></field> Modified: ofbiz/trunk/applications/marketing/widget/sfa/forms/LeadForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/forms/LeadForms.xml?rev=767904&r1=767903&r2=767904&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/widget/sfa/forms/LeadForms.xml (original) +++ ofbiz/trunk/applications/marketing/widget/sfa/forms/LeadForms.xml Thu Apr 23 12:31:06 2009 @@ -126,7 +126,7 @@ <field name="submitButton" position="3" title="${uiLabelMap.SfaMergeLeads}" widget-style="buttontext" tooltip-style="button-text"><submit button-type="text-link"/></field> </form> - <form name="CreateLeadFromVCard" type="upload" target="createLeadFromVCard" header-row-style="header-row" default-table-style="basic-table"> + <form name="NewLeadFromVCard" type="upload" target="createLeadFromVCard" header-row-style="header-row" default-table-style="basic-table"> <field name="infile" title="${uiLabelMap.SfaUploadVCard}"><file/></field> <field name="serviceName"><hidden value="createLead"/></field> <field name="submitButton" title="${uiLabelMap.CommonUpload}" widget-style="smallSubmit"><submit button-type="button"/></field> |
Free forum by Nabble | Edit this page |