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 custom fields on the page

...

Expand
titlepublic void setTranslations(CRMDO dto)

This method 

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 ...

...

Expand
titlepublic String formatAmount(CRMDOCurrency currency, BigDecimal amount)

This method 


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

...

This method 


Expand
titlepublic Object formatDate(Object date)

...

This method 


Expand
titlepublic Object formatDateTime(Object date)

...

This method 


Expand
titlepublic Object formatDateTime(Object date, String format)

...

This method 


Expand
titlepublic String formatSearchFilter(String searchFilter

...

)

This method 


Expand
titlepublic TreeNode generateTree(ArrayList<CRMDO> categories)

This method 


Expand
titlepublic TreeNode generateTree(ArrayList<CRMDO> categories)

...

This method 


Expand
titlepublic List<Object> getActiveInactiveOptions()

...

This method loads the active/inactive options.


Expand
titlepublic String getAllowedFileTypes()

...

This method 


Expand
titlepublic List<SelectItem> getApplicationServerScopeOptions()

...

This method loads the allowed application server scope options.


Expand
titlepublic List<SelectItem> getApplicationServersOptions()

...

This method loads the application server options


Expand
titlepublic List<SelectItem> getBillingTermSchemeCodeOptions()

...

This method loads the billing term scheme code options.


Expand
titlepublic List<SelectItem> getBillingTermSchemeCodeOptions(BillType billType)

This method 


Expand
titlepublic ArrayList<CRMDO> getBillingTermSchemeOptions()

...

This method loads the billing term scheme code options.


Expand
titlepublic List<SelectItem> getCountryOptions()

...

This method loads the country options


Expand
titlepublic List<SelectItem> getCurrencyOptions()

...

This method loads the currency options


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 


Expand
titlepublic String getDateTimeFormat()

...

This method 


Expand
titlepublic String getDayOfWeekLabel(Integer dayOfWeek)

...

This method 


Expand
titlepublic List<SelectItem> getDaysOfMonthOptions()

...

This method 


Expand
titlepublic String getDecimalSeperatorSymbol()

...

This method 


Expand
titlepublic String getDefaultHomePageName(String defaultHomePageId)

...

This method 


Expand
titlepublic List<SelectItem> getHomePageOptions()

...

This method loads the home page options.


Expand
titlepublic List<SelectItem> getHourOptions()

...

This method loads the hour options.


Expand
titlepublic List<SelectItem> getJobTypeOptions()

...

This method  loads the job type options


Expand
titlepublic List<SelectItem> getLanguageOptions()

...

This method  loads the language options.


Expand
titlepublic String getMaxFileSize()

...

This method 


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

...

This method 


Expand
titlepublic List<SelectItem> getMinuteOptions()

...

This method loads the minute options.


Expand
titlepublic List<SelectItem> getMinuteOptions(Integer number)

...

This method loads the minute options.


Expand
titlepublic String getMonthLabel(Integer month)

...

This method


Expand
titlepublic List<SelectItem> getMonthNumberOptions()

...

This method


Expand
titlepublic List<SelectItem> getMonthOptions()

...

This method


Expand
titlepublic List<SelectItem> getNormalBillingTermSchemeCodeOptions()

...

This method loads the normal billing term scheme code options.


Expand
titlepublic String getNumberOfDecimalDigits()

...

This method 


Expand
titlepublic String getPath(CRMSession ejbSession)

...

This method 


Expand
titlepublic String getPaymentGatewayCardBrandIcon(String brand)

...

This method 


Expand
titlepublic String getPeriodOrdinalIndicator(String period)

...

This method 


Expand
titlepublic ArrayList<SelectItem> getProductCriterionTypeOptions()

...

This method returns the product criterion type options.


Expand
titlepublic List<SelectItem> getRecurrenceScopeOptions()

...

This method 


Expand
titlepublic ArrayList<CRMDO> getSubscriptionTypeOptions()

...

This method loads the subscription type options


Expand
titlepublic String getThousandSeperatorSymbol()

...

This method 


Expand
titlepublic String getTimeLabel(Integer hour, Integer minutes)

...

This method 


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

...

This method 


Expand
titlepublic String getTimestamp()

...

This method 


Expand
titlepublic List<SelectItem> getTimezoneOptions()

...

This method loads the available timezone options.


Expand
titlepublic String getTranslation(String label)

...

This method


Expand
titlepublic List<SelectItem> getUnitOfTimeOptions()

...

This method


Expand
titlepublic String getValueTranslation(String value)

...

This method


Expand
titlepublic List<SelectItem> getWeekdayOptions()

...

This method


Expand
titlepublic List<SelectItem> getYearOptions()

...

This method


Expand
titlepublic List<Object> getYesNoOptions()

...

This method loads the yes/no options.


Expand
titlepublic List<SelectItem> loadMonthNumberOptions()

...

This method loads the month (number) options.


Expand
titlepublic List<SelectItem> loadPrintoutExportTypeOptions()

...

This method list of printout export type options.


Expand
titlepublic ArrayList<SelectItem> loadYearOptions()

...

This method loads the year options.


Expand
titlepublic void navigateToHomePage()

...

This method 


Expand
titlepublic void refresh()

...

This method 


Expand
titlepublic List<CRMDOCommunity> searchCommunities(String searchValue)

...

This method 


Expand
titlepublic List<CRMDO> searchGroups(String searchValue)

...

This method 


Expand
titlepublic List<CRMDO> searchUnits(String searchValue)

...

This method 


Expand
titlepublic List<CRMDO> searchUsers(String query)

...

This method 


Expand
titlepublic String setContactOrderBy()

...

This method 


Template Pages

Child pages (Children Display)
sortcreation

...