Modal

This element is used to display modal windows on the page.

Attributes

NameDescriptionValue
id

Unique Identifier.

Any
nameThe name of modal.Any
visiblemodesThe modes the button should be visible.A comma-separated list of the modes (read, new, edit)
visibilityconditionsThe conditions that should be met in order to display the component.'[[pagefunction, datatype, datapath ]]' operator(==,!=) 'value'
setmodeThe mode of the page when the button is clicked.

read, new, edit

refreshThe parts of the page that should be refreshed when the button is clicked.

page

mainmenu

main

details

tab,tabID

component,is_on_tab:is_on_menu:tabID:componentID

element,is_on_tab:is_on_menu:tabid:componentID:elementID

section,sectionID

area,areaID

singleselect

If multiselect is specified then multiple lines of quicksearch can be selected.

Used for type: quicksearch

multiselect
valueThe value of the modal.Any
typeThe type of modal.
 search, quicksearchtreesearch ,create , quickcreate,time,date,sharednotes,notes 
xmlfile

The Data Entry xml file to open as modal.

Used for types: create, quickcreate

The file path under the folder 'Crm/WebContent/pages/dataEntry'

datasetnameThe dataset file name for search.
Used for types: search, quicksearchtreesearch 

The file path under the folder 'Crm/WebContent/pages/search' 

(multiple datasets can be specified: datasetname1:datasetname2)

or

ejb function ejbname;function call (example: ejb/CRMUIAccountDefinition;fc=addCreditRatings[/] )

datasetsearchtableThe main table name of dataset.
Used for types: search, quicksearchtreesearch
A valid table name
datasetsearchfieldThe fields to be shown on the modal.
Used for types: quicksearchtreesearch
Valid fields that are specified in the search file
datasetreturnhiddenfieldThe fields to be returned from a search file.
Used for types: search, quicksearchtreesearch
Valid fields that are specified in the search file
datatypeThe data type of the modal.java.lang.Integer, java.lang.String, ...
datapathThe data path of the modal.Needs to correspond to the CRMDO object field
autosearch

If its true then the user doesn't have to press the search button.

Used for types: search, quicksearchtreesearch

true or false
hidesearchbox

If its true then no search text box will be available. Used in tabs (tab menu) and for quick search.

Used for types: search, quicksearchtreesearch 

true or false
filterAn extra filter for SQL.

Used for types: search, quicksearchtreesearch

Any valid SQL condition (the keyword AND is not needed for the first condition)
assignandclosemodal

Closes the modal and assigns the values as defined when the modal was called.

Used only when a page is opened as a modal.

Used for types: create, quickcreate

true or false
assignments

Defines the assignment(s) to be assigned when a modal is closed.

<assignment>…</assignment>

onopenfunction

Defines the function call(s) triggered when a modal is opened.

Used for types: create, quickcreate

<functions>…</functions>
onclosefunction

Defines the function call(s) triggered when a modal is closed.

Used for types: search, quicksearchtreesearch, create, quickcreate 

<functions>…</functions>
searchfunctionThe function(s) to use to search for.<functions>…</functions>

Examples

 Create

 

Create
<modal>
	<id>mdlAddMoreInformation</id>
	<name>Add More Information</name>
	<visibilityconditions>'[[getValue,java.lang.String,contactInformation/name]]'!=''</visibilityconditions> 
	<visiblemodes>edit,new</visiblemodes>
	<type>create</type>
	<refresh>page</refresh>
	<datatype>alias</datatype>
	<datapath>dummyContact</datapath>
	<xmlfile>contactinfo/contactInformation</xmlfile>
	<hiddencomponents></hiddencomponents>
	<hiddentabs></hiddentabs>
	<onopenfunction>
		<functions>
			<function>
				<type>ejb</type>
				<classname>ejb/CRMUICommunicationCentre</classname>
				<functionname>echoDto</functionname>
				<resultaction>replace</resultaction>
				<datatype>root</datatype>
				<parameters>
					<parameter>
						<value>[[getValue,java.lang.String,contactInformation]]</value>
						<datatype>java.lang.Object</datatype>
					</parameter>
				</parameters>
			</function>
		</functions>
	</onopenfunction>
	<assignments>
		<assignment>
			<datapath>contactInformation</datapath>
			<value>[[getDTO]]</value>
			<datatype>java.lang.Object</datatype>
		</assignment>
	</assignments>
</modal>

 Search

 

Search
<modal>
    <id>Find</id>
    <visiblemodes>edit,new</visiblemodes>
    <visibilityconditions>'[[getAlias,java.lang.String,contactInformationOption]]'=='EXISTING_CUSTOMER'</visibilityconditions>
    <name>Find</name>
    <type>search</type>
    <refresh>page</refresh>
    <setmode>edit</setmode>
    <datasetname>contactinfo.load</datasetname>
    <datasetreturnhiddenfield>CIID</datasetreturnhiddenfield>
    <datatype>alias</datatype>
    <datapath>customerInformation</datapath>
    <assignments>
        <assignment>
            <classname>com.crm.dataobject.contactinfo.CRMDOContactInformation</classname>
            <datapath>contactInformation</datapath>
            <value>CIID</value>
            <datatype>load</datatype>
        </assignment>
    </assignments>
    <onclosefunction>
        <functions>
            <function>
                <type>ejb</type>
                <classname>ejb/CRMUISubscriptionCreation</classname>
                <functionname>loadForm</functionname>
                <resultaction>replace</resultaction>
                <datatype>root</datatype>
                <parameters>
                    <parameter>
                        <value>[[getValue,java.lang.String,contactInformation]]</value>
                        <datatype>java.lang.Object</datatype>
                    </parameter>
                </parameters>
            </function>
        </functions>
    </onclosefunction>
</modal>

 Quick Search

 

Quick Search
    
<modal>
    <id>mdlBill</id>
    <type>quicksearch</type>
    <refresh>page</refresh>
    <datasetname>billing.load</datasetname>
    <datasetreturnhiddenfield>BILLID</datasetreturnhiddenfield>
    <datasetsearchtable>BILLS</datasetsearchtable>
    <datasetsearchfield>BILLNUM;ACCRECNAME;BILLFROMDATE;BILLTODATE;BILLACTUALTOTALAMT;BILLTOPAYAMT</datasetsearchfield>
    <filter>CONTACTINFORMATION.CIID = '[[getValue,java.lang.String,contactInformation/id]]'</filter>
    <assignments>
        <assignment>
            <classname>com.crm.dataobject.billing.CRMDOBill</classname>
            <datapath>bill</datapath>
            <value>id</value>
            <datatype>load</datatype>
        </assignment>
    </assignments>
    <onclosefunction>
        <functions>
            <function>
                <type>ejb</type>
                <classname>ejb/CRMUICommunicationCentre</classname>
                <functionname>setQuickPaymentAmount</functionname>
                <resultaction>replace</resultaction>
                <datapath>root</datapath>
                <parameters>
                    <parameter>
                        <value>[[getDTO]]</value>
                        <datatype>java.lang.Object</datatype>
                    </parameter>
                </parameters>
            </function>
        </functions>
    </onclosefunction>
</modal>
 Tree Search

 

Quick Search
<modal>
    <id>mdlCategoryQuickSearch</id>
    <name>Category Quick Search</name>
    <type>treesearch</type>
    <refresh>component,false:false:null:cmpCategory</refresh>
    <datasetname>contactinfo.categories</datasetname>
    <datasetreturnhiddenfield>CICATEGORYID</datasetreturnhiddenfield>
    <datasetsearchtable>CONTACTINFOCATEGORIES</datasetsearchtable>
    <datasetsearchfield>CICATEGORYNAME</datasetsearchfield>
    <assignments>
        <assignment>
            <classname>com.crm.dataobject.contactinfo.CRMDOContactInfoCategory</classname>
            <datapath>category</datapath>
            <value>id</value>
            <datatype>load</datatype>
        </assignment>
    </assignments>
</modal>
 Notes

 

Notes
<modal>
    <id>mdlView</id>
    <name>View</name>
    <visiblemodes>edit,new</visiblemodes>
    <type>notes</type>
    <refresh>tab,tabAddresses</refresh>
    <assignments>
        <assignment>
            <datapath>addresses[CURRENT_ROW]/careOfName</datapath>
        </assignment>
    </assignments>
</modal>
 Date

 

Date
<modal>
    <id>mdlDueDate</id>
    <visiblemodes>edit,new</visiblemodes>
    <name>Date</name>
    <type>date</type>
    <refresh>component,false:false:null:cmpDueDate</refresh>
    <setmode>edit</setmode>
    <assignments>
        <assignment>
            <datapath>dueDate</datapath>
            <datatype>java.util.Date</datatype>
        </assignment>
    </assignments>
</modal>