|
Version
WORK in PROGRESS
Table of Contents 1.2 What do you need to understand this book 6 3 Adapting the openCRX HTML GUI to Your Needs 8 3.1 Overview openCRX GUI Types 8 3.2 Customizing Options openCRX HTML GUI 9 3.3 Things to do before you start Customizing openCRX 10 3.4 Limitations of the generic HTML GUI 11 4.1.1 File Overloading at the Project Level 13 4.1.2 UI Configuration Overloading 13 4.1.3 Code Table Overloading 13 5.1 Enabling/Disabling Packages at the Application Level 14 5.2 Enabling/Disabling Packages at the User Level 15 6.1 Enabling/Disabling Locales at the Application Level 16 6.2 Setting the Default Locale at the User Level 17 7 CSS, Headers, Footers, etc. 18 7.2 HTML Header and Footer Files 19 8.2 UI Configuration Overloading 21 8.3.1 Elements of an Inspector 21 8.4.3.1 Enabling/Disabling Attributes 21 8.4.3.2 Positioning of Attributes (order, orderFieldGroup) 21 8.4.3.4 AlternateElementDefinition 21 8.5.1.1 Positioning of Tabs in a Grid Pane 22 8.5.1.2 Expanding/Collapsing Tabs 22 8.5.1.3 AdditionalElementDefinition 22 8.5.1.4 XML Filter Definitions 22 8.5.2 Object Row Attributes 22 8.5.2.1 Ordering of Attributes (order, orderObjectContainer) 22 8.5.2.2 Selection of Visible Attributes (showMaxMember) 22 8.5.2.3 Selection of Filterable Attributes (maxMember) 22 8.5.2.4 Advanced Attribute Selection (showMemberRange) 22 8.6 Various XML Tags Explained 23 8.6.14 orderObjectContainer 23 8.7.1 DataBindings for Properties 24 8.7.2 DataBindungs for Composite Objects 24 9.2.1 Adding Codes to Existing Code Tables 25 9.2.2 Disabling Existing Codes 25 9.2.3 Replacing Existing Code Tables 25 9.3 Segment-Specific Code Tables 25 10.1 MenuOps – openCRX Operations Menu 26 10.2 Navigation – openCRX Breadcrum 26 10.3 North – openCRX Header 26 10.4 RootMenu – openCRX Top Level Tabbed Menu 26 10.5 RootPanel – openCRX Top Level PopUp Menu 26 10.6 Search – openCRX Index-based Search 26 13 Advanced Customizing Options 29 13.5 Application Logic Extensions 29
List of Figures Figure 1: Types of openCRX GUIs 8 Figure 2: Non-Java GUIs for openCRX 8 Figure 3: openCRX Servlets enabling access with third-party clients 9 Figure 4: Customizing Options – openCRX Standard HTML GUI 9 Figure 5: openCRX Development and Customizing with Custom Project 12 Figure 6: Launch Wizard User Settings 15 Figure 7: Wizard User Settings – enable/disable Root Menu Entries 15 Figure 8: Set Default Locale by Saving User Settings 17
List of Listings Listing 1: List of Packages in web.xml 14 Listing 2: Enabling/Disabling Packages in web.xml 14 Listing 3: Locales in web.xml 16 Listing 4: Activating/Deactivating Locales in web.xml 16 Listing 5: Active Locales in Login.jsp 17 Listing 6: uiRefreshRate in web.xml 30 Listing 7: load-on-startup in web.xml 30 Listing 8: sesstion-timeout in web.xml 31 Listing 9: transport-guarantee in web.xml 31
1 About this BookThis book describes various ways of customizing the openCRX Standard HTML GUI to adapt the look and feel to your personal tastes and preferences or to your company's CI (corporate identity). openCRX is the leading enterprise-class open source CRM suite. openCRX is based on openMDX, an open source MDA framework based on the OMG's model driven architecture (MDA) standards. This guarantees total openness, standards compliance, a state-of-the-art component-based architecture, and virtually unlimited scalability. 1.1 Who this book is forThe intended audience are openCRX administrators and advanced users. 1.2 What do you need to understand this bookIt is helpful to have a good understanding of the openCRX architecture. We assume that you are able to read/understand the openCRX UML models and the openCRX Javadoc (Java API). It is also assumed that you are familiar with XML files and you should know how to program JSPs. 1.3 Tips, Warnings, etc.We make use the following pictograms:
2 PrerequisitesTo work through some of the examples and in particular to build your own customized openCRX, there as some prerequisites:
You can either follow the openCRX Server Installer documentation at http://www.opencrx.org/server.htm or you can do a manual installation of openCRX following the QuickStart guide.
Follow the openCRX SDK Installer documentation at http://www.opencrx.org/sdk.htm.
If you decide to
manipulate files directly in the webapps folder, the same files are
contained in one of the subdirectories of the
directory 3 Adapting the openCRX HTML GUI to Your Needs3.1 Overview openCRX GUI TypesopenCRX is distributed with a generic HTML GUI (based on openMDX/portal) that connects to the openCRX API as shown below: Figure 1: Types of openCRX GUIs This Ajax-enabled HTML GUI supports a wide range of modern browsers, including Firefox, Opera, Safari, Google Chrome, KDE Konqueror, and IE. It goes without saying that you can also program your own custom GUI. openCRX/store is an example DHTML GUI consisting of a set of manually programmed JSPs connecting to the openCRX API. It is also possible to develop non-Java-based GUIs for openCRX. You could – for example – write an XML-RRC Adapter (see Apache XML-RPC): Figure 2: Non-Java GUIs for openCRX Other options you might consider are SOAP (Simple Object Access Control) or REST (Representational State Transfer). openCRX also includes a set of servlets (ical, imap, ldap, vcs, ...) so that you can connect to openCRX with a wide range of specialized third-party clients like Mozilla Thunderbird, MS Outlook, KDE Kontact, and others: Figure 3: openCRX Servlets enabling access with third-party clients 3.2 Customizing Options openCRX HTML GUIThe openCRX Standard HTML GUI can be customized in many ways to suit your needs: Figure 4: Customizing Options – openCRX Standard HTML GUI Basic customizing options are relatively straight-forward and require no (or only moderate) programming know how. Advanced customizing options, however, require a good understanding of the openCRX architecture. This guide covers basic customizing options. If you're interested in advanced customizing options, have a look at the source code or consider attending an openCRX Developer Workshop (see www.opencrx.org for more information). 3.3 Things to do before you start Customizing openCRXAdapting openCRX to your needs typically involves the following steps:
Obviously, if you're only interested in changing some of the colors, there is not much to do in step 2 above. However, if you plan to capture your companies business processes, forms, etc. with openCRX, it pays off to spend some time on collecting the requirements and properly mapping them to openCRX before you get down to customizing...
3.4 Limitations of the generic HTML GUIEven though the openCRX HTML GUI is extremely flexible, we would like to point out a few limitations (not due to bad design, but rather we are looking at advanced features that have not been implemented yet). 3.4.1 Role-based UIAs of openCRX v 3.4.2 Model PermissionsModel permissions are not implemented yet. Hence you cannot control access to individual attributes of an object with simple customization (the openCRX security plugin controls access to complete objects, not to individual attributes of an object). You can, however, deploy multiple web applications or work with Layout JSPs to achieve the same goal. 4 Important HintsThe following information is so important that it deserves its own chapter!
Figure 5: openCRX Development and Customizing with Custom Project
4.1 OverloadingOverloading is a concept that allows you to selectively enhance (or replace) features of the standard distribution of openCRX with your own changes and/or extensions. Overloading can take place at various levels. 4.1.1 File Overloading at the Project LevelTypically, files in your custom project will be added to the custom EARs. However, if a file in your custom project has the same name as a file of the standard distribution, your file will replace the respective file of the standard distribution when you build custom EARs.
4.1.2 UI Configuration OverloadingIt is likely that you want to change some of the default customizing. Quite possibly, however, (a) you want to make a few changes only and (b) you want to keep these changes if you upgrade to a new version of openCRX. This is where UI configuration overloading can add value. Instead of changing the original UI configuration files provided with the standard distribution you create a new configuration file (or multiple configuration files) containing all your changes. Make sure that you name your file(s) containing changed UI Element Definitions such that your changes are loaded AFTER the default configuration files, thereby overloading the original configuration. More information is available in chapter 8.2 UI Configuration Overloading. 4.1.3 Code Table OverloadingSimilar to UI configuration overloading, you can also overload code tables. Instead of changing original code tables you create new code table files that contain your changes/extensions. It is also possible to deactivate codes of the standard distribution. Make sure that you name your file(s) containing changed code tables such that your changes are loaded AFTER the default code tables, thereby overloading the code tables. More information is available in chapter 9.2 Code Table Overloading.
5 Managing Packages5.1 Enabling/Disabling Packages at the Application LevelWith the openCRX standard distribution all available packages are enabled. The openCRX administrator may wish to disable certain packages at the application level if they are not used. This chapter shows how you can achieve this. The package list is contained in the file opencrx-core-CRX.ear\opencrx-core-CRX.war\WEB-INF\web.xml Look for the section <!-- Admin --> to find a list of available packages: Listing 1: List of Packages in web.xml <!-- Admin
-->
You can disable packages by commenting them out. The following example shows how to deactivate the package depot1: Listing 2: Enabling/Disabling Packages in web.xml
...
5.2 Enabling/Disabling Packages at the User LevelIndividual user can enable/disable root menu entries with the wizard User Settings (available on a user's Homage): Figure 6: Launch Wizard User Settings Once the wizard has loaded, uncheck entries you don't need: Figure 7: Wizard User Settings – enable/disable Root Menu Entries
6 Managing LocalesThe default installation of openCRX activates all locales that are included in the Open Source distribution. The openCRX administrator may wish to deactivate certain locales from the locale list. This chapter shows how you can achieve this. 6.1 Enabling/Disabling Locales at the Application LevelThe locale list is contained in the file opencrx-core-CRX.ear\opencrx-core-CRX.war\WEB-INF\web.xml Look for the section <!-- locales --> to find a list of available locales: Listing 3: Locales in web.xml <!-- locales
-->
You can deactivate locales by simply commenting them out. The following example shows how to deactivate the locale de_CH. Listing 4: Activating/Deactivating Locales in web.xml <!-- locales
-->
As the Login page is displayed before the authentication of the user has taken place, Login.jsp cannot access the above information. That is why the list of available and also the list of active locales are maintained in Login.jsp as well. Changing the list of active locales is straightforward. Simply comment out the relevant statements in the following code segment of Login.jsp: Listing 5: Active Locales in Login.jsp ...
The above example shows how to disable the locales fa_IR and nl_NL in the Login page of openCRX.
6.2 Setting the Default Locale at the User LevelA user's default locale can be set by choosing/activating the desired locale and then clicking on [Save Settings] in the header of the application as shown below: Figure 8: Set Default Locale by Saving User Settings If the login page supports a user's preferred locale xx_YY, you can request the login page in that locale xx_YY by appending the string "?locale=xx_YY" to the default login URL. Example: the following URL loads the German login page: http://demo.opencrx.org/opencrx-core-CRX/Login?locale=de_CH 7 CSS, Headers, Footers, etc.7.1 Cascading Style SheetsThe directory ...\opencrx-core-CRX\_style contains various CSS files:
7.2 HTML Header and Footer FilesThe Layout JSPs and the login page (Login.jsp) by default include various HTML files. They are located in the directory ...\opencrx-core-CRX and you can adapt them to your liking:
See also chapter 12 Layout JSPs for additional information.
8 UI XML Files8.1 Overview8.2 UI Configuration Overloading8.3 Inspector8.3.1 Elements of an Inspector8.3.2 Labels / Tooltips8.3.3 Icons8.4 Attribute Pane8.4.1 Tabs8.4.2 Field Groups8.4.3 Fields / Attributes8.4.3.1 Enabling/Disabling Attributes8.4.3.2 Positioning of Attributes (order, orderFieldGroup)8.4.3.3 Column Breaks8.4.3.4 AlternateElementDefinition
8.5 Grid Panes8.5.1 Tabs8.5.1.1 Positioning of Tabs in a Grid Pane8.5.1.2 Expanding/Collapsing Tabs8.5.1.3 AdditionalElementDefinition8.5.1.4 XML Filter Definitions8.5.2 Object Row Attributes8.5.2.1 Ordering of Attributes (order, orderObjectContainer)8.5.2.2 Selection of Visible Attributes (showMaxMember)8.5.2.3 Selection of Filterable Attributes (maxMember)8.5.2.4 Advanced Attribute Selection (showMemberRange)
8.6 Various XML Tags Explained8.6.1 active8.6.2 changeable8.6.3 columnBreak8.6.4 defaultValue8.6.5 filterable8.6.6 iconKey8.6.7 inPlace8.6.8 label8.6.9 minValue8.6.10 maxMember8.6.11 maxValue8.6.12 order8.6.13 orderFieldGroup8.6.14 orderObjectContainer8.6.15 showMaxMember8.6.16 showMemberRange8.6.17 spanRow8.6.18 sortable8.6.19 toolTip8.7 DataBindings8.7.1 DataBindings for Properties8.7.2 DataBindungs for Composite Objects9 Code Table XML Files9.1 Overview9.2 Code Table Overloading9.2.1 Adding Codes to Existing Code Tables9.2.2 Disabling Existing Codes9.2.3 Replacing Existing Code Tables9.3 Segment-Specific Code Tables
10 Groovy Controls10.1 MenuOps – openCRX Operations Menu10.2 Navigation – openCRX Breadcrum10.3 North – openCRX Header10.4 RootMenu – openCRX Top Level Tabbed Menu10.5 RootPanel – openCRX Top Level PopUp Menu10.6 Search – openCRX Index-based Search
11 JSP Wizards
12 Layout JSPsopenCRX is distributed with 2 default layout JSPs located in the directory opencrx-core-CRX.ear\opencrx-core-CRX.war\WEB-INF\config\layout\en_US: 12.1 show-Default.jspThis layout JSP renders all pages that show information (typically an Inspector containing information about the current object and all the grids containing associated information). This layout JSP is generic and can handle any object. It is provided by openMDX/portal. 12.2 edit-Default.jspSimilarly, this layout JSP renders all pages that are used to edit objects and create new objects. This layout JSP is generic and can handle any object. It is provided by openMDX/portal. 12.3 Custom Layout JSPsIf you have a need for specialized screens for a particular object in edit and/or show mode, you can write your own layout JSP and deploy it to the above-mentioned directory. The file name of your custom layout JSP determines which objects (or rather: objects of which class) will be handled by your custom layout JSP. Example: Let's assume you want to replace the default edit screen for openCRX Contacts (i.e. class org.opencrx.kernel.account1.Contact) with a custom layout JSP. Name your file edit-org.opencrx.kernel.account1.Contact.jsp and deploy it to the directory ...\WEB-INF\config\layout\en_US. After restarting Tomcat or your application server your new layout JSP will be active.
13 Advanced Customizing Options13.1 Workflows13.2 Java Controls13.3 Portal Extensions13.4 UML Model Extensions13.5 Application Logic Extensions
14 Other Customizing OptionsA collection of useful configuration and customizing options. 14.1 web.xmlAll of the following settings can be made in the
file 14.1.1 uiRefreshRateBy default, the UI configuration is loaded at startup only. If you are changing customizing files during a customization session you might want to reload the UI periodically to verify your changes without restarting the servlet container. You can do so by setting the respective value to something else than 0. The refresh period is measured in milliseconds, i.e. the following example would cause the UI configuration to reload once per minute: Listing 6: uiRefreshRate in web.xml ...
14.1.2 load-on-startupBy default, the ObjectInspectorServlet is initialized with the first login (and hence the first login can take some time). If you prefer to initialize the ObjectInspectorServlet right after the deployment of the respective EAR, uncomment the following section in web.xml: Listing 7: load-on-startup in web.xml ...
14.1.3 session-timeoutBy default, the session timeout is set to 30 minutes. If you want to shorten or lengthen the session timeout you can do so by changing the value of session-timeout (measured in minutes) in web.xml. The following example shows how to change the timeout to 2 hours: Listing 8: sesstion-timeout in web.xml ...
14.1.4 transport-guaranteeIf you want to force your users to connect with SSL you can require a transport guarantee and replace the default value NONE with CONFIDENTIAL. The following example shows how to require the application admin (admin-Root) to connect with SSL: Listing 9: transport-guarantee in web.xml ...
15 Next StepsYou might want to have a look at some of the additional documentation published at http://www.opencrx.org/documents.htm. The openCRX Admin Guide might be of particular interest to you. License
The contents of this file are
subject to a BSD license (the "License"); you may not use
this file except in compliance with the License. You may obtain a
copy of the License at http:// Copyright 2008 © CRIXP Corp. All rights reserved. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||