Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
nameblue

This section describes how custom search pages can be created, in order for the system's release functionality, to be overridden or extended.

 

What does this section cover?

Table of Contents

 

By adding a folder and an XML file in the respective custom search page path, and naming the search file with the same name as the release search file name, you override it and the system will use your own when calling that search file. By creating folders in new package spaces, you must use the correct path in your custom summary or data entry pages.

 

...

Create Custom Search Pages

For an introduction to search pages, go to Developing search pages (Deprecated).

All search pages must be created under <custom_project>/WebContent/pages/search/<module_name> directory. 

To override the system's release functionality, the custom page must have the same filename and parent directory name as the release search page. To extend the system's release functionality, the custom page must have a different filename, than any other release search page having the same parent directory name.

 

In the following example, a search page is created to search for all users, declared as super user in the system. We could either override the load.xml release search file , or located under  ../WebContent/pages/search/users, or create a new loadsystemusers.xml file . The latter is preferred since overriding the load.xml will affect all other pages calling this search file. in the respective custom project directory. In this case, we didn't want all pages using load.xml to be affected, therefore we created loadsystemusers.xml under <custom_project>/web/WebContent/pages/search/users.

Expand
titleCreating A Custom Search Page

 

Code Block
themeEclipse
languagexml
titleloadSystemUsers.xml
<dataset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/search.xsd">
<searchcaption>Search Users</searchcaption>
<sqltype>Select</sqltype>
	<tables>
		<table><tablename>USERS</tablename></table>
	</tables>
 
	<joins/>
 
	<fields>
		<fielditem>
			<field>USERS.USERID</field>
			<expression>VALUE</expression>
			<datatype>ftXString</datatype>
			<fieldlen>32</fieldlen>
			<searchcriteria>0</searchcriteria>
			<visible>0</visible>
			<executable>1</executable>
			<indexorder>1</indexorder>
		</fielditem>
		<fielditem>
			<field>USERS.USERNAME</field>
			<label>Username<<label>key_username</label>
			<expression>VALUE</expression>
			<datatype>ftXString</datatype>
			<fieldlen>100</fieldlen>
			<searchcriteria>1</searchcriteria>
			<visible>1</visible>
			<executable>1</executable>
			<casesensitive>false</casesensitive>
			<indexorder>2</indexorder>
		</fielditem>
	</fields>

	<wheregroups>
		<wheregroup>
			<wheremembers>
				<wheremember>
					<lparenth>0</lparenth>
					<lfield>USERS.USERDELETED</lfield>
					<expression>=</expression>
					<rfield>0</rfield>
					<rparenth>0</rparenth>
				</wheremember>
 
				<wheremember>
					<lparenth>0</lparenth>
					<lfield>USERS.ISSUPERUSER</lfield>
					<expression>=</expression>
					<rfield>1</rfield>
					<rparenth>0</rparenth>
				</wheremember>
			</wheremembers>
		</wheregroup>
	</wheregroups>

	<groupby/>

	<orderby/>

</dataset>
Code Block
themeEclipse
languagexml
titleData Entry Page Call
...
 
	<selectbox>
		<id>slbSystemUser</id>
		<label>key_user</label>
		<lookuptype>dataset</lookuptype>
		<lookupname>users.loadsystemusers</lookupname>
		<datapath>myUsers</datapath>
		<datapathid>id</datapathid>
		<classname>com.company.dataobject.COMPANYCRMDOUser</classname>
		<datatype>load</datatype>
	</selectbox>
 
...
Code Block
themeEclipse
languagexml
titleSummary Page Call
...
 
	<field>
		<fieldname>SystemUsers</fieldname>
		<fieldfunction>SYSTEMUSERS.USERID</fieldfunction>
		<caption>Authorisation received <caption>key_authorisation_received_by</caption>
		<filter>true</filter>
		<filteronexpand>true</filteronexpand>
		<fieldtype>string</fieldtype>
		<filterlookupname>dataset;users.loadsystemusers;userid;username</filterlookupname>
	</field>
 
...

 

For a full list of search page attributes, go to Search Pages Documentation.