Customizing XML Pages
Editing XML Page
For the xml editor to be able to check errors in your xml and provide you with helpful hints you have to make sure the editor knows about the schema definition file for the used namespace. In various editors it can be made differently but you can always add an explicit reference to the schema definition file as follows:
<page version="5.1"
xmlns="http://schemas.vineyard.fi/tools"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schemas.vineyard.fi/tools PageLayout.xsd"
>
In the above example the Pagelout.xsd is located locally in the same folder with the xml file. For more options please refer to the detailed information about the schemaLocation attribute.
Version
The version attribute should be correctly set. For example it defines which sizing attributes can be used. Currently there are only two versions available: “5.0” and “5.1”
<page version="5.1"
Page Layout
Note: Up-to date detailed information about Vine XML pages can be found in the schema file PageLayout.xsd available in the installation of Vine client for Windows (Vintage).
Table element
The layout of an xml page is defined by the main table element (of the TableType type) which has a number of attributes and must include at least one nested table or panel.
For example:
<table orientation ="Vertical">
</table>
Orientation attribute
Whether a table (main or nested) includes cells located in a column or in a row is defined by the orientation attribute which defines how the cell dividing border (splitter) will be located:
- orientation = "Vertical". The cell dividing border/splitter will bo located vertically so the cells are located in a row.
Component or nested table | Component or nested table |
- orientation = "Horizontal". The cell dividing border/splitter will bo located vertically so the cells are located in a column.
Component or nested table |
Component or nested table |
Autosize attribute
This is an optional attribute that is by default set to true. This attribute is ignored by Vine Web.
Sizing attributes in Vine for Windows and Web
Depends on the version attribute in the root page element
- if version=”5.0”, ‘size’ is used (if autoSize="false") ‘size’ is hardcoded height of the cell in percentage relative to the whole page. This is to support older summary view forms.
In web it defines the ratio (in percentage) of the cell to the containing table size.
- if version=”5.1”, then ’width’ and ’height’ used. Width and height are defined in % from the visible area allocated for summary view.
Please note that the size of the table containing panels is defined by sizes of the panels. Width and height are not allowed for tables. For example, if you have a table containing multiple panels one under another you need to set the same width for all the panels.
Today Page
There is a standard today page for every standard tabbed page in Vine for Windows/Web. For example:
Today_1.xml – Classic tab
Today_2.xml – Sales tab
Today_3.xml – Marketing tab
These files are included in the Vine for Windows/Web installers but can be customized and uploaded as plug-ins to the Vine database. It is also possible to create a new today page for a new custom tab (by default a new tab will use the Today page of the Classic tab).
The general structure of Today xml files is defined in the PageLayout.xsd schema definition file which is also included in the Vine for Windows installation but can't be changed in any way. When designing a new today page you must respect the settings of Today.xsd.
Saving Today Page
Today page xml should be saved using the Tools organizer where you can paste your xml and click Save:

The today page plugin file with the name “Today_<areatabid>.xml” will be saved to the vy_plugin table.
Customizing Today Sales
Adding Today Sales to Today Page
The today sales component can be added to the Today page as any other component by adding it to the today.xml file.
Editing TodaySales.xml
The contents of the today sales tools is stored in the todaysales.xml file (a sample is included in the Vine for Windows installation, but should be adjusted to work and uploaded as a plug-in to the Vine database) and the structure of the todaysales.xml is defined in the todaysales.xsd file (included in the Vine for Windows installation, can't be changed).
Layout
The layout of the today sales block is defined by the table element which can include an arbitrary number of gauge elements and one table of links to the right of the list of set of gauges.
For example, the following trivial sample will produce one gauge and one report link:
<?xml version="1.0" encoding="utf-8"?>
<table type="Gauges">
<gauge name="Calls" description="Calls Description">
<goals sql="select 100,200,300 from dual"/>
<results sql="select 250 from dual"/>
</gauge>
<table type="Links" minwidth="50">
<link classname="" component="Sample Report.rpt" name="Current Sales Report" LinkType="OleDBReport"></link>
</table>
</table>

Gauges
A gauge element can have several elements configured using the following attributes:
- Name. Shows the name of the gauge in the top left corner.
- Description. Show the description below the gauge.
- Goals. Three targets: red, yellow and green can be set using sql attribute.
- Results. Defines the location of the gauge arrow with the provided sql
<gauge name="Calls" description="Calls Description">
<goals sql="select 100,200,300 from dual"/>
<results sql="select 250 from dual"/>
</gauge>
Links
The following link types are allowed (as defined in the TodaySales.xsd):
- Plugin. You can define any plug-in that will be launched when user click the link. The classname and component attributes must be provided. You can pass the object’s data using currentobjectID and currentObjectType:
<link classname="SalesGoal.SalesGoal" component="SalesGoal.dll" name="Sales Goal" Sql="" LinkType="Plugin" currentObjectID="currentUserID" currentObjectType="VY_PERSON"></link>
- ClassicReport. This can be used for old type (“Vintage 4”) plug-ins.
<link classname="" component="OpenSalesCases.rep" name="Today Sales Report" Sql="" LinkType="ClassicReport"></link>
- OleDBReport. Used for new Crystal Reports.
<link classname="" component="Sample Report.rpt" name="Current Sales Report" LinkType="OleDBReport"></link>
- SqlLink. This is designed to show data from sql. Retrieve the displayed text using sql command
Comments
0 comments
Please sign in to leave a comment.