Getting Started
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 List<SelectItem> getDefinedLanguageOptions() |
---|
|
This method loads the language options. |
Expand |
---|
title | public String getEditorSuggestions(String entityID,String entityTags) |
---|
|
This method |
Expand |
---|
title | public String getEditorSuggestions(String entityID,String entityTags) |
---|
|
This method |
Expand |
---|
title | public List<SelectItem> getOptionsFromString(String options) |
---|
|
This method |
Expand |
---|
title | public List<SelectItem> getOptionsFromString(String options) |
---|
|
This method |
Expand |
---|
title | public List<SelectItem> getOptionsFromString(String options) |
---|
|
This method |
Expand |
---|
title | public Boolean isGooglePlacesAutocompleteEnable() |
---|
|
This method |
Expand |
---|
title | public Boolean isInternationalAddressFormatEnabled() |
---|
|
This method |
Expand |
---|
title | public Boolean isModuleRestricted(String moduleid) |
---|
|
This method |
Expand |
---|
title | public void onload() |
---|
|
This method |
Expand |
---|
title | public List<CRMDO> searchCountry(String searchValue) |
---|
|
This method |
Expand |
---|
title | public void setGoogleAddress(CRMDOContactInfoAddress contactInfoAddress) |
---|
|
This method |
Expand |
---|
title | public CRMDO setMandatoryField(CRMDO dto, String xPath, String value) |
---|
|
This method |
Expand |
---|
title | public void setTranslations() |
---|
|
This method |
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 formatAmount(CRMDOCurrency currency, BigDecimal amount, Boolean showCurrency) |
---|
|
This method |
Expand |
---|
title | public String formatAmount(CRMDOCurrency currency, BigDecimal amount, Boolean showCurrencygetRequiredMessage(String labelKey) |
---|
|
This method |
- public String formatAmount(CRMDOCurrency currency, BigDecimal amount, Boolean showCurrency, Integer scale):
- public Object formatDate(Object date):
- public Object formatDateTime(Object date):
- public Object formatDateTime(Object date, String format):
- public String formatSearchFilter(String searchFilter):
- public TreeNode generateTree(ArrayList<CRMDO> categories):
- public List<Object> getActiveInactiveOptions(): Loads the active/inactive options.
- public String getAllowedFileTypes():
- public List<SelectItem> getApplicationServerScopeOptions(): Loads the allowed application server scope options.
- public List<SelectItem> getApplicationServersOptions(): Loads the application server options
- public List<SelectItem> getBillingTermSchemeCodeOptions(): Loads the billing term scheme code options.
- public List<SelectItem> getBillingTermSchemeCodeOptions(BillType billType)
- public ArrayList<CRMDO> getBillingTermSchemeOptions(): Loads the billing term scheme code options.
- public List<SelectItem> getCountryOptions(): Loads the country options
- public List<SelectItem> getCurrencyOptions(): Loads the currency options
- public Date getCurrentDate(): Returns Current Date without milliseconds
- public String getCurrentYear(): Returns current year
- public String getDateFormat():
- public String getDateTimeFormat():
- public String getDayOfWeekLabel(Integer dayOfWeek):
- public List<SelectItem> getDaysOfMonthOptions():
- public String getDecimalSeperatorSymbol():
- public String getDefaultHomePageName(String defaultHomePageId):
- public List<SelectItem> getDefinedLanguageOptions(): Loads the language options
- public String getEditorSuggestions(String entityID,String entityTags):
- public List<SelectItem> getHomePageOptions(): Loads the home page options.
- public List<SelectItem> getHourOptions(): Loads the hour options.
- public List<SelectItem> getJobTypeOptions(): Loads the job type options
- public List<SelectItem> getLanguageOptions(): Loads the language options
- public String getMaxFileSize():
- public String getMenuoption(List<Menuoption> menuoptions, String menuoptionid):
- public List<SelectItem> getMinuteOptions(): Loads the minute options.
- public List<SelectItem> getMinuteOptions(Integer number): Loads the minute options.
- public String getMonthLabel(Integer month):
- public List<SelectItem> getMonthNumberOptions():
- public List<SelectItem> getMonthOptions():
- public List<SelectItem> getNormalBillingTermSchemeCodeOptions(): Loads the normal billing term scheme code options.
- public String getNumberOfDecimalDigits():public
- List<SelectItem> getOptionsFromString(String options):
- public String getPath(CRMSession ejbSession):
- public String getPaymentGatewayCardBrandIcon(String brand):
- public String getPeriodOrdinalIndicator(String period):
- public ArrayList<SelectItem> getProductCriterionTypeOptions(): Returns the product criterion type options.
- public List<SelectItem> getRecurrenceScopeOptions():public
- String getRequiredMessage(String labelKey):
- public ArrayList<CRMDO> getSubscriptionTypeOptions(): Loads the subscription type options
- public String getThousandSeperatorSymbol():
- public String getTimeLabel(Integer hour, Integer minutes):
- public String getTimeLabel(Integer hour, Integer minutes, Integer seconds):
- public String getTimestamp():
- public List<SelectItem> getTimezoneOptions(): Loads the available timezone options.
- public String getTranslation(String label):
- public List<SelectItem> getUnitOfTimeOptions():
- public String getValueTranslation(String value):
- public List<SelectItem> getWeekdayOptions():
- public List<SelectItem> getYearOptions():
- public List<Object> getYesNoOptions(): Loads the yes/no options.
- public Boolean isGooglePlacesAutocompleteEnable()
- public Boolean isInternationalAddressFormatEnabled():
- public Boolean isModuleRestricted(String moduleid):public List<SelectItem> loadMonthNumberOptions(): Loads the month (number) options.
- public List<SelectItem> loadPrintoutExportTypeOptions(): List of printout export type options.
- public ArrayList<SelectItem> loadYearOptions(): Loads the year options.
- public void navigateToHomePage():public void onload():
- public void refresh():
- public List<CRMDOCommunity> searchCommunities(String searchValue):
- public List<CRMDO> searchCountry(String searchValue):public List<CRMDO> searchGroups(String searchValue):
- public List<CRMDO> searchUnits(String searchValue):
- public List<CRMDO> searchUsers(String query):
- public String setContactOrderBy():public void setGoogleAddress(CRMDOContactInfoAddress contactInfoAddress):
- public CRMDO setMandatoryField(CRMDO dto, String xPath, String value):
- public void setTranslations():
- public void setTranslations(CRMDO dto):
Template Pages
Child pages (Children Display) |
---|
|
...