Versions Compared

Key

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

Table of Contents

...

How to create a page

First of all, create a page in XHTML file format, a file with a .xhtml extension and declared the necessary Namespaces.

Code Block
languagexml
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
	  xmlns:f="http://java.sun.com/jsf/core"
	  xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
	  xmlns:h="http://java.sun.com/jsf/html"
	  xmlns:fn="http://java.sun.com/jsp/jstl/functions"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
	  xmlns:crm="http://java.sun.com/jsf/composite/crm">

</html>

Define the template of the page in a ui:composition tag.

Code Block
languagexml
<ui:composition template=""></ui:composition>

...

Tag Library

URI

Prefix

Contents

XHTML namespacehttp://www.w3.org/1999/xhtml
Tags for xhtml
JavaServer Faces Facelets Tag Libraryhttp://xmlns.jcp.org/jsf/facelets

ui:

Tags for templating
PrimeFaces componentshttp://primefaces.org/ui

p:

Tags for PrimeFaces components
JavaServer Faces Core Tag Libraryhttp://java.sun.com/jsf/core

f:

Tags for JavaServer Faces custom actions that are independent of any particular render kit
Pass-through Attributes Tag Libraryhttp://xmlns.jcp.org/jsf/passthrough

p:

Tags to support HTML5-friendly markup
JavaServer Faces HTML Tag Libraryhttp://java.sun.com/jsf/html

h:

JavaServer Faces component tags for all UIComponent objects
JSTL Functions Tag Libraryhttp://java.sun.com/jsp/jstl/functions

fn:

JSTL 1.2 Functions Tags
JSTL Core Tag Libraryhttp://java.sun.com/jsp/jstl/core

c:

JSTL 1.2 Core Tags
CRM Composite Components Tag Libraryhttp://java.sun.com/jsf/composite/crm

crm:

Tags for CRM Components

...

A typical JavaServer Faces application includes one or more managed beans, each of which can be associated with the components used in a particular page. 

A managed bean for summary pages must extend SummaryView class and for data entry pages must extend DataEntryView class.

Code Block
languagejava
@ManagedBean(name = "summaryManagedBeanView", eager = true)
@ViewScoped
public class SummaryManagedBeanView extends SummaryView {

}

@ManagedBean(name = "dataEntryManagedBeanView", eager = true)
@ViewScoped
public class DataEntryManagedBeanView extends DataEntryView{

}

Class SummaryView 

SummaryView class implements commonly used functions for summary pages.

Class DataEntryView

DataEntryView class implements commonly used functions for data entry pages.

The below list shows functions that can be used from data entry pages:

Expand
titlepublic void addCustomFields()

This method add adds custom fields on the page.


Expand
titlepublic List<SelectItem> getDefinedLanguageOptions()

This method loads the language optionsreturns a list of languages.


Expand
titlepublic String getEditorSuggestions(String entityID,String entityTags)

This method 

Expand
titlepublic String getEditorSuggestions(String entityID,String entityTags)

This method 

method returns a list of editor suggestions based on the specified entity and entity tags.


Expand
titlepublic List<SelectItem> getOptionsFromString(String options)

This method method returns a list of options from the specified semicolon-seperated String.


Expand
titlepublic List<SelectItem> getOptionsFromStringBoolean isGooglePlacesAutocompleteEnable(String options)

This method 

Expand
titlepublic List<SelectItem> getOptionsFromString(String options)

This method 

method returns if the google places autocomplete for address registry is enabled, otherwise false.


Expand
titlepublic Boolean isGooglePlacesAutocompleteEnable()

This method 

Expand
titlepublic Boolean isInternationalAddressFormatEnabled()

This method method returns true if the international address format is enabled, otherwise false.


Expand
titlepublic Boolean isModuleRestricted(String moduleid)

This method 

Expand

method returns true if the module with the specified id is restricted, otherwise false.


Expand
titlepublic void onload()

This method method initialize page parameters and is executed on GET request of a page.


Expand
titlepublic List<CRMDO> searchCountry(String searchValue)

This method method returns a list of countries where country name starts with the specified search value. 


Expand
titlepublic void setGoogleAddress(CRMDOContactInfoAddress contactInfoAddress)

This method 

Expand

method sets the google address of a contact info address.


Expand
titlepublic CRMDO setMandatoryField(CRMDO dto, String xPath, String value)

This method method sets as mandatory the field of the specified data object based on the specified xPath and value.


Expand
titlepublic void setTranslations()

This method method sets the translations of the page's data object.


Expand
titlepublic void setTranslations(CRMDO dto)

This method method sets the translations of the specified data object

Commonly used functions

The below list shows functions that can be used both from summary and data entry pages:

Expand
titlepublic void createArchivedFile(String id)

This method ...creates an archive file with the specified id.


Expand
titlepublic Boolean exists(ArrayList<CRMDO> dtoList, CRMDO dto)

This method indicates returns true if the specified data object exists in the specified list, otherwise false.


Expand
titlepublic ArrayList<CRMDO> filterDeleted(ArrayList<CRMDO> records)

This method method returns a list of non delete items of the specified list.


Expand
titlepublic Set filterDeletedSet(Set records)

This method method returns a list of non deleted items of the specified set.


This method 
Expand
titlepublic void findNode(TreeNode node,CRMDO crmdo)

This method 

Expand
titlepublic String formatAmount(CRMDOCurrency currency, BigDecimal amount)
String formatAmount(CRMDOCurrency currency, BigDecimal amount)

This method formats the specified amount to a . The format of the resulting String is [currency prefix] [amount].

If no currency is specified then the system default currency is used.

The default scale of the amount is 2.


Expand
titlepublic String formatAmount(CRMDOCurrency currency, BigDecimal amount, Boolean showCurrency)

This method formats the specified amount to a String. The format of the resulting String is:

  • [currency prefix] [amount] If showCurrency parameter is true, otherwise
  • [amount]

If no currency is specified then the system default currency is used.

The default scale of the amount is 2.


This method 
Expand
titlepublic String formatAmount(CRMDOCurrency currency, BigDecimal amount, Boolean showCurrency, Integer scale)
scale)

This method formats the specified amount to a String. The format of the resulting String is:

  • [currency prefix] [amount] If showCurrency parameter is true, otherwise
  • [amount]

If no currency is specified then the system default currency is used.

If no scale is specified then the default scale of the amount is 2.


Expand
titlepublic Object formatDate(Object date)

This method method formats the specified date to a String based on the configured system date format.


Expand
titlepublic Object formatDateTime(Object date)

This method method formats the specified date time to a String based on the configured system date time format.


Expand
titlepublic Object formatDateTime(Object date, String format)

This method method formats the specified date time to a String based on the specified format.


Expand
titlepublic String formatSearchFilter(String searchFilter)

This method method formats the specified String, removing special characters such as % and _.


Expand
titlepublic TreeNode generateTree(ArrayList<CRMDO> categories)

This method 

Expand
titlepublic TreeNode generateTree(ArrayList<CRMDO> categories)

This method method generates a tree based on the specified list.


Expand
titlepublic List<Object> getActiveInactiveOptions()

This method loads the active/inactive optionsmethod returns a list of two options: Active and Inactive.


This method 
Expand
titlepublic String getAllowedFileTypes()
String getAllowedFileTypes()

This method returns a String of allowed file types. The format of the resulting String is: /(\\.|\\/)([comma-seperated file extensions])$/


Expand
titlepublic List<SelectItem> getApplicationServerScopeOptions()

This method loads the returns a list of allowed application server scope optionsscopes.


Expand
titlepublic List<SelectItem> getApplicationServersOptions()

This method loads the application server optionsmethod returns a list of allowed application servers.


Expand
titlepublic List<SelectItem> getBillingTermSchemeCodeOptions()

This method loads the method returns a list of billing term scheme code optionscodes.


Expand
titlepublic List<SelectItem> getBillingTermSchemeCodeOptions(BillType billType)

This method method returns a list of billing term scheme codes based on the specified bill type.


Expand
titlepublic ArrayList<CRMDO> getBillingTermSchemeOptions()

This method loads the method returns a list of billing term scheme code optionsschemes.


Expand
titlepublic List<SelectItem> getCountryOptions()

This method loads the country optionsmethod returns a list of countries.


Expand
titlepublic List<SelectItem> getCurrencyOptions()

This method loads the currency optionsmethod returns a list of currencies.


Expand
titlepublic Date getCurrentDate()

This method returns the current date without milliseconds;.


Expand
titlepublic String getCurrentYear()

This method returns the current year.

...

Expand
titlepublic String getDateFormat()

This method method returns a String for the configured system date format.


This method 
Expand
titlepublic String getDateTimeFormat()
)

This method returns a String for the configured system date time format.


Expand
titlepublic String getDayOfWeekLabel(Integer dayOfWeek)

This method method returns the day-of-week label of the specified Int value.


Expand
titlepublic List<SelectItem> getDaysOfMonthOptions()

This method method returns a list of days of months.


Expand
titlepublic String getDecimalSeperatorSymbol()

This method method returns the configued system decimal seperator symbol.


Expand
titlepublic String getDefaultHomePageName(String defaultHomePageId)

This method 

String defaultHomePageId)

This method returns the default home page name based on the specified page id.


Expand
titlepublic List<SelectItem> getHomePageOptions()

This method loads the home page optionsreturns a list of home pages.


Expand
titlepublic List<SelectItem> getHourOptions()

This method loads the returns a list of hour options.


Expand
titlepublic List<SelectItem> getJobTypeOptions()

This method  loads the method returns a list of job type options.


Expand
titlepublic List<SelectItem> getLanguageOptions()

This method  loads the language optionsmethod returns a list of languages.


Expand
titlepublic String getMaxFileSize()

This method method return a String of the configured system maximum file size.


Expand
titlepublic String getMenuoption(List<Menuoption> menuoptions, String menuoptionid)

This method method returns the menu option with the specified id that exists in the specified list.


Expand
titlepublic List<SelectItem> getMinuteOptions()

This method loads the minute optionsreturns a list of minutes.


Expand
titlepublic List<SelectItem> getMinuteOptions(Integer number)

This method loads the returns a list of minutes with the specified interval number between minute options. 


Expand
titlepublic String getMonthLabel(Integer month)

This method returns  the month label of the specified Int value.


Expand
titlepublic List<SelectItem> getMonthNumberOptions()

This methodThis method returns a list of month numbers.


Expand
titlepublic List<SelectItem> getMonthOptions()

This method returns a list of months.


Expand
titlepublic List<SelectItem> getNormalBillingTermSchemeCodeOptions()

This method loads the returns  a list of normal billing term scheme code optionscodes.


Expand
titlepublic String getNumberOfDecimalDigits()

This method 

Expand
titlepublic String getPath(CRMSession ejbSession)

This method 

Expand
titlepublic String getPaymentGatewayCardBrandIcon(String brand)

This method method returns a String of the configured system number of decimal digits.


Expand
titlepublic String getPeriodOrdinalIndicatorgetPaymentGatewayCardBrandIcon(String periodbrand)

This method method return an icon class of the specified payment gateway card brand.


Expand
titlepublic ArrayList<SelectItem> getProductCriterionTypeOptions()

This method returns the a list of product criterion type optionstypes.


Expand
titlepublic List<SelectItem> getRecurrenceScopeOptions()

This method method returns a list of recurrence scopes.


Expand
titlepublic ArrayList<CRMDO> getSubscriptionTypeOptions()

This method loads the subscription type options

Expand
titlepublic String getThousandSeperatorSymbol()

This method returns a list of subscription types.


Expand
titlepublic String getTimeLabelgetThousandSeperatorSymbol(Integer hour, Integer minutes)

This method method returns a String for the configured system thousand seperator symbol.


Expand
titlepublic String getTimeLabel(Integer hour, Integer minutes, Integer seconds)

This method 

Expand
titlepublic String getTimestamp()

This method 

method returns the time label of the specified hour and minutes. The format of the resulting String is [hour]:[minutes].


Expand
titlepublic List<SelectItem> getTimezoneOptions(String getTimeLabel(Integer hour, Integer minutes, Integer seconds)

This method loads the available timezone optionsreturns the time label of the specified hour, minutes and seconds. The format of the resulting String is [hour]:[minutes]:[seconds].


Expand
titlepublic String getTranslationgetTimestamp(String label)

This method returns the current timestamp.


Expand
titlepublic List<SelectItem> getUnitOfTimeOptionsgetTimezoneOptions()

This method returns a list of available time zones.


Expand
titlepublic String getValueTranslationgetTranslation(String valuelabel)

This method returns the translation of the specified key label.


Expand
titlepublic List<SelectItem> getWeekdayOptionsgetUnitOfTimeOptions()

This method returns a list of unit times.


Expand
titlepublic List<SelectItem> getYearOptionsString getValueTranslation(String value)

This method returns the translation of the specified value.


Expand
titlepublic List<Object> getYesNoOptionsList<SelectItem> getWeekdayOptions()

This method loads the yes/no optionsreturns a list of week days.


Expand
titlepublic List<SelectItem> loadMonthNumberOptionsgetYearOptions()

This method loads the month (number) optionsreturns a list of years, starting from 1900 until the current year.


Expand
titlepublic List<SelectItem> loadPrintoutExportTypeOptionsList<Object> getYesNoOptions()

This method list of printout export type optionsreturns a list with two options: Yes and No.


Expand
titlepublic ArrayList<SelectItem> loadYearOptionsList<SelectItem> loadPrintoutExportTypeOptions()

This method loads the year optionsreturns a list of printout export types.


Expand
titlepublic void navigateToHomePage()

This method method navigates the user to home page.


Expand
titlepublic void refresh()

This method method refresh the page.


Expand
titlepublic List<CRMDOCommunity> searchCommunities(String searchValue)

This method method returns a list of communities where community name starts with the specified search value. 


This method 
Expand
titlepublic List<CRMDO> searchGroups(String searchValue)

This method returns a list of unit groups where unit group name starts with the specified search value. 


Expand
titlepublic List<CRMDO> searchUnits(String searchValue)

This method method returns a list of units where unit name starts with the specified search value. 


Expand
titlepublic List<CRMDO> searchUsers(String query)

This method method returns a list of users where user username starts with the specified search value. 


Expand
titlepublic String setContactOrderBy()

This method method return a String for contact order by clause based on the active name display rule.


Template Pages


Child pages (Children Display)
sortcreation

...