...
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 |
---|
|
<!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 |
---|
|
<ui:composition template=""></ui:composition> |
...
...
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 |
---|
|
@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 |
---|
title | public void addCustomFields() |
---|
|
This method add custom fields on the page |
...
Expand |
---|
title | public 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 |
---|
title | public void createArchivedFile(String id) |
---|
|
This method ... |
...
Expand |
---|
title | public String formatAmount(CRMDOCurrency currency, BigDecimal amount) |
---|
|
This method |
Expand |
---|
title | public String getRequiredMessage(String labelKey) |
---|
| This method | public String formatAmount(CRMDOCurrency currency, BigDecimal amount, Boolean showCurrency, Integer scale) |
---|
|
...
Expand |
---|
title | public Object formatDate(Object date) |
---|
|
...
Expand |
---|
title | public Object formatDateTime(Object date) |
---|
|
...
Expand |
---|
title | public Object formatDateTime(Object date, String format) |
---|
|
...
Expand |
---|
title | public String formatSearchFilter(String searchFilter |
---|
|
...
Expand |
---|
title | public TreeNode generateTree(ArrayList<CRMDO> categories) |
---|
|
This method |
Expand |
---|
title | public TreeNode generateTree(ArrayList<CRMDO> categories) |
---|
|
...
Expand |
---|
title | public List<Object> getActiveInactiveOptions() |
---|
|
...
|
This method loads the active/inactive options. |
Expand |
---|
title | public String getAllowedFileTypes() |
---|
|
...
Expand |
---|
title | public List<SelectItem> getApplicationServerScopeOptions() |
---|
|
...
|
This method loads the allowed application server scope options. |
Expand |
---|
title | public List<SelectItem> getApplicationServersOptions() |
---|
|
...
|
This method loads the application server options |
Expand |
---|
title | public List<SelectItem> getBillingTermSchemeCodeOptions() |
---|
|
...
|
This method loads the billing term scheme code options. |
Expand |
---|
title | public List<SelectItem> getBillingTermSchemeCodeOptions(BillType billType) |
---|
|
This method |
Expand |
---|
title | public ArrayList<CRMDO> getBillingTermSchemeOptions() |
---|
|
...
|
This method loads the billing term scheme code options. |
Expand |
---|
title | public List<SelectItem> getCountryOptions() |
---|
|
...
|
This method loads the country options |
Expand |
---|
title | public List<SelectItem> getCurrencyOptions() |
---|
|
...
|
This method loads the currency options |
Expand |
---|
title | public Date getCurrentDate() |
---|
|
...
|
This method returns the current date without milliseconds; |
Expand |
---|
title | public String getCurrentYear() |
---|
|
...
|
This method returns the current year. |
Expand |
---|
title | public String getDateFormat() |
---|
|
...
Expand |
---|
title | public String getDateTimeFormat() |
---|
|
...
Expand |
---|
title | public String getDayOfWeekLabel(Integer dayOfWeek) |
---|
|
...
Expand |
---|
title | public List<SelectItem> getDaysOfMonthOptions() |
---|
|
...
Expand |
---|
title | public String getDecimalSeperatorSymbol() |
---|
|
...
Expand |
---|
title | public String getDefaultHomePageName(String defaultHomePageId) |
---|
|
...
Expand |
---|
title | public List<SelectItem> getHomePageOptions() |
---|
|
...
|
This method loads the home page options. |
Expand |
---|
title | public List<SelectItem> getHourOptions() |
---|
|
...
|
This method loads the hour options. |
Expand |
---|
title | public List<SelectItem> getJobTypeOptions() |
---|
|
...
|
This method loads the job type options |
Expand |
---|
title | public List<SelectItem> getLanguageOptions() |
---|
|
...
|
This method loads the language options. |
Expand |
---|
title | public String getMaxFileSize() |
---|
|
...
Expand |
---|
title | public String getMenuoption(List<Menuoption> menuoptions, String menuoptionid) |
---|
|
...
Expand |
---|
title | public List<SelectItem> getMinuteOptions() |
---|
|
...
|
This method loads the minute options. |
Expand |
---|
title | public List<SelectItem> getMinuteOptions(Integer number) |
---|
|
...
|
This method loads the minute options. |
Expand |
---|
title | public String getMonthLabel(Integer month) |
---|
|
...
Expand |
---|
title | public List<SelectItem> getMonthNumberOptions() |
---|
|
...
Expand |
---|
title | public List<SelectItem> getMonthOptions() |
---|
|
...
Expand |
---|
title | public List<SelectItem> getNormalBillingTermSchemeCodeOptions() |
---|
|
...
|
This method loads the normal billing term scheme code options. |
Expand |
---|
title | public String getNumberOfDecimalDigits() |
---|
|
...
Expand |
---|
title | public String getPath(CRMSession ejbSession) |
---|
|
...
Expand |
---|
title | public String getPaymentGatewayCardBrandIcon(String brand) |
---|
|
...
Expand |
---|
title | public String getPeriodOrdinalIndicator(String period) |
---|
|
...
Expand |
---|
title | public ArrayList<SelectItem> getProductCriterionTypeOptions() |
---|
|
...
|
This method returns the product criterion type options. |
Expand |
---|
title | public List<SelectItem> getRecurrenceScopeOptions() |
---|
|
...
Expand |
---|
title | public ArrayList<CRMDO> getSubscriptionTypeOptions() |
---|
|
...
|
This method loads the subscription type options |
Expand |
---|
title | public String getThousandSeperatorSymbol() |
---|
|
...
Expand |
---|
title | public String getTimeLabel(Integer hour, Integer minutes) |
---|
|
...
Expand |
---|
title | public String getTimeLabel(Integer hour, Integer minutes, Integer seconds) |
---|
|
...
Expand |
---|
title | public String getTimestamp() |
---|
|
...
Expand |
---|
title | public List<SelectItem> getTimezoneOptions() |
---|
|
...
|
This method loads the available timezone options. |
Expand |
---|
title | public String getTranslation(String label) |
---|
|
...
Expand |
---|
title | public List<SelectItem> getUnitOfTimeOptions() |
---|
|
...
Expand |
---|
title | public String getValueTranslation(String value) |
---|
|
...
Expand |
---|
title | public List<SelectItem> getWeekdayOptions() |
---|
|
...
Expand |
---|
title | public List<SelectItem> getYearOptions() |
---|
|
...
Expand |
---|
title | public List<Object> getYesNoOptions() |
---|
|
...
|
This method loads the yes/no options. |
Expand |
---|
title | public List<SelectItem> loadMonthNumberOptions() |
---|
|
...
|
This method loads the month (number) options. |
Expand |
---|
title | public List<SelectItem> loadPrintoutExportTypeOptions() |
---|
|
...
|
This method list of printout export type options. |
Expand |
---|
title | public ArrayList<SelectItem> loadYearOptions() |
---|
|
...
|
This method loads the year options. |
Expand |
---|
title | public void navigateToHomePage() |
---|
|
...
Expand |
---|
title | public void refresh() |
---|
|
...
Expand |
---|
title | public List<CRMDOCommunity> searchCommunities(String searchValue) |
---|
|
...
Expand |
---|
title | public List<CRMDO> searchGroups(String searchValue) |
---|
|
...
Expand |
---|
title | public List<CRMDO> searchUnits(String searchValue) |
---|
|
...
Expand |
---|
title | public List<CRMDO> searchUsers(String query) |
---|
|
...
Expand |
---|
title | public String setContactOrderBy() |
---|
|
...
Template Pages
Child pages (Children Display) |
---|
|
...