Joget Workflow v6 Beta 4 Released

Check out the latest Joget Workflow v6 Beta for many new features and improvements in user experience (UX), app maintainability and performance.

Skip to end of metadata
Go to start of metadata

Usages

Abstract Class

org.joget.apps.userview.model.UserviewV5Theme

Method Detail

Overridable Methods
handleContentError
public java.lang.String handleContentError(java.lang.Exception e, java.util.Map<java.lang.String, java.lang.Object> data)

HTML template to handle error when retrieving userview content.

handlePageNotFound
public java.lang.String handlePageNotFound(java.util.Map<java.lang.String, java.lang.Object> data)

HTML template to handle page not found. Default using /templates/userview/pageNotFound.ftl as template.

getLayout
public java.lang.String getLayout(java.util.Map<java.lang.String, java.lang.Object> data)

HTML template to handle theme layout. Default using /templates/userview/layout.ftl as template.

getHeader
public java.lang.String getHeader(java.util.Map<java.lang.String, java.lang.Object> data)

HTML template to handle page header. Default using /templates/userview/header.ftl as template.

getFooter
public java.lang.String getFooter(java.util.Map<java.lang.String, java.lang.Object> data)

HTML template to handle page footer. Default using /templates/userview/footer.ftl as template.

getContentContainer
public java.lang.String getContentContainer(java.util.Map<java.lang.String, java.lang.Object> data)

HTML template to handle userview menu content. Default using /templates/userview/contentContainer.ftl as template.

getMenus
public java.lang.String getMenus(java.util.Map<java.lang.String, java.lang.Object> data)

HTML template to handle menus. Default using /templates/userview/menus.ftl as template.

getJsCssLib
public java.lang.String getJsCssLib(java.util.Map<java.lang.String, java.lang.Object> data)

HTML template for putting javascript and css link for getHead() template.

getCss
public java.lang.String getCss(java.util.Map<java.lang.String, java.lang.Object> data)

Gets dynamic generated CSS for getHead() template

getJs
public java.lang.String getJs(java.util.Map<java.lang.String, java.lang.Object> data)

Gets dynamic generated javascript for getHead() template 

getMetas
public java.lang.String getMetas(java.util.Map<java.lang.String, java.lang.Object> data)

Gets dynamic generated meta data for getHead() template 

getHead
public java.lang.String getHead(java.util.Map<java.lang.String, java.lang.Object> data)

HTML template to handle for <head> tag. Default using /templates/userview/head.ftl as template.

public java.lang.String getFavIconLink(java.util.Map<java.lang.String, java.lang.Object> data)

Gets the fav icon relative path for getHead() template.

getLoginForm
public java.lang.String getLoginForm(java.util.Map<java.lang.String, java.lang.Object> data)

HTML template for login form. Default using /templates/userview/login.ftl as template.

decorateCategoryLabel
public java.lang.String decorateCategoryLabel(org.joget.apps.userview.model.UserviewCategory category)

HTML template for menu category label.

Utility Methods
getUserview
public org.joget.apps.userview.model.Userview getUserview()

Gets userview which using this theme

setUserview
public void setUserview(org.joget.apps.userview.model.Userview userview)

Sets userview which using this theme

getRequestParameters
public java.util.Map getRequestParameters()

Gets request parameters

setRequestParameters
public void setRequestParameters(java.util.Map requestParameters)

Sets request parameters

getRequestParameter
public java.lang.Object getRequestParameter(java.lang.String requestParameter)

Convenience method to get a parameter value

getRequestParameterString
public java.lang.String getRequestParameterString(java.lang.String requestParameter)

Convenience method to get a parameter String value.

Return Empty string instead of NULL.

Deprecated Methods
getCss
public java.lang.String getCss()

Deprecated not use for UserviewV5Theme

getJavascript
public java.lang.String getJavascript()

Deprecated not use for UserviewV5Theme

getHeader
public java.lang.String getHeader()

Deprecated not use for UserviewV5Theme

getFooter
public java.lang.String getFooter()

Deprecated not use for UserviewV5Theme

getPageTop
public java.lang.String getPageTop()

Deprecated not use for UserviewV5Theme

getPageBottom
public java.lang.String getPageBottom()

Deprecated not use for UserviewV5Theme

getBeforeContent
public java.lang.String getBeforeContent()

Deprecated not use for UserviewV5Theme

org.joget.apps.userview.model.UserviewTheme

Method Detail

Abstract Methods
getCss
public abstract java.lang.String getCss()

Return css to inject in <head> tag

getJavascript
public abstract java.lang.String getJavascript()

Return javascript to inject in <head> tag

getHeader
public abstract java.lang.String getHeader()

Return HTML template to replace default header

getFooter
public abstract java.lang.String getFooter()

Return HTML template to replace default footer

getPageTop
public abstract java.lang.String getPageTop()

Return HTML template to inject before the page container

getPageBottom
public abstract java.lang.String getPageBottom()

Return HTML template to inject after the page container

getBeforeContent
public abstract java.lang.String getBeforeContent()

Return HTML template to inject before content

Utility Methods
getUserview
public org.joget.apps.userview.model.Userview getUserview()

Gets userview which using this theme

setUserview
public void setUserview(org.joget.apps.userview.model.Userview userview)

Sets userview which using this theme

getRequestParameters
public java.util.Map getRequestParameters()

Gets request parameters

setRequestParameters
public void setRequestParameters(java.util.Map requestParameters)

Sets request parameters

getRequestParameter
public java.lang.Object getRequestParameter(java.lang.String requestParameter)

Convenience method to get a parameter value

getRequestParameterString
public java.lang.String getRequestParameterString(java.lang.String requestParameter)

Convenience method to get a parameter String value.

Return Empty string instead of NULL.

V5 Predefined Theme Template

Predefined Variables 

  • Predefined variable with value for template usage template.
NameTemplateData TypeDefault ValueDescription
base_link-java.lang.String Base URL of current Userview
body_classeslayout.ftljava.lang.String 

Used by system to add the following CSS classes and current locale code as CSS class to <body> tag.

embeded - When userview is in embed mode.

rtl - When System setting set display from right to left or language set to Arabic.

body_idlayout.ftljava.lang.String Use current userview menu page Id or Custom Id as <body> tag id
build_number-java.lang.String Joget build number
categories_container_idmenus.ftljava.lang.Stringcategory-containerId of the container which contains all menu categories
categories_container_classesmenus.ftljava.lang.Stringnav nav-tabs nav-stacked main-menuCSS classes of the container which contains all menu categories
category_classesmenus.ftljava.lang.StringcategoryCSS classes of menu category
combine_single_menu_categorymenus.ftlbooleanfalseFlag to display the only menu in a category to replace the category as 1st level menu.
contentcontentContainer.ftljava.lang.String Main content of the current page. Content from the Userview Menu or login form.
content_containerlayout.ftljava.lang.String Value from theme getContentContainer method
content_idcontentContainer.ftljava.lang.StringcontentId of content container
context_pathlogin.ftljava.lang.String Context Path of the Joget Server URL
csshead.ftljava.lang.String Value from theme getCss method
current_category_classesmenus.ftljava.lang.Stringcurrent-category activeExtra CSS classes for current menu category
current_menu_classesmenus.ftljava.lang.Stringcurrent activeExtra CSS classes for current menu
embedcontentContainer.ftlboolean Flag to decide whether userview is needed to display in embed mode
fav_icon_linkhead.ftljava.lang.String Value from theme getFavIconLink  method
first_category_classesmenus.ftljava.lang.StringfirstExtra CSS classes for first menu category
first_menu_classesmenus.ftljava.lang.StringfirstExtra CSS classes for first menu in the menu category
footerlayout.ftljava.lang.String Value from theme getFooter method
headlayout.ftljava.lang.String Value from theme getHead method
headerlayout.ftljava.lang.String Value from theme getHeader method
hide_navcontentContainer.ftlbooleanfalseFlag to hide navigator
home_page_link

pageNotFound.ftl,

header.ftl

java.lang.String URL to the userview home page menu
is_logged_inheader.ftlboolean Flag to decide whether there is a logged in user
is_login_page-boolean Whether or not the current page is a login form page
joget_headerhead.ftljava.lang.String Additional HTML template injected by system to the header
joget_footerlayout.ftljava.lang.String Additional HTML template injected by system to the footer
jshead.ftljava.lang.String Value from theme getJs method
js_css_libhead.ftljava.lang.String Value from theme getJsCssLib method
last_category_classesmenus.ftljava.lang.StringlastExtra CSS classes for last menu category
last_menu_classesmenus.ftljava.lang.StringlastExtra CSS classes for last menu in the menu category
localelayout.ftljava.lang.String Current language code of the system
login_error_classeslogin.ftljava.lang.Stringform-errors alert alert-warningCSS classes for login error message container
login_exceptionlogin.ftljava.lang.String To keep exception message when a login attempt failure.
login_form_afterlogin.ftljava.lang.String Value from "Custom HTML (After Login Form)" under Userview Builder - Settings
login_form_beforelogin.ftljava.lang.String Value from "Custom HTML (Before Login Form)" under Userview Builder - Settings  
login_form_footerlogin.ftljava.lang.String HTML template retrieved from DirectoryUtil.getLoginFormFooter(). Used by User Security Implementation.
login_linkheader.ftljava.lang.String URL to the login form
logout_linkheader.ftljava.lang.String URL to log out from userview
main_container_idcontentContainer.ftljava.lang.StringmainCSS classes for the main container
menuscontentContainer.ftl  Value from theme getMenus method
menu_classesmenus.ftljava.lang.StringmenuCSS classes for the menu
menus_container_classesmenus.ftljava.lang.Stringmenu-containerCSS classes for the container which contains menus
metashead.ftljava.lang.String Value from theme getMetas method
nav_idmenus.ftljava.lang.StringnavigationId of the navigator container
nav_classesmenus.ftljava.lang.Stringnav-collapse sidebar-navCSS classes of the navigator container
params-java.util.Map<java.lang.String, java.lang.Object> Received Request Parameters
titlehead.ftljava.lang.String Userview name and the current menu label
right_to_left-boolean Flag to decide whether or not userview need to display from right to left
sidebar_idcontentContainer.ftljava.lang.StringsidebarId of the sidebar container
user-org.joget.directory.model.User Current logged in User object
username-java.lang.String Current logged in username
userview

header.ftl, footer.ftl,

menus.ftl, login.ftl

org.joget.apps.userview.model.Userview Userview object which using this theme

Templates

/templates/userview/pageNotFound.ftl

/templates/userview/layout.ftl

/templates/userview/header.ftl

/templates/userview/footer.ftl

/templates/userview/contentContainer.ftl

/templates/userview/menus.ftl

/templates/userview/head.ftl

/templates/userview/login.ftl

How to use and override V5 template

Reuse the predefined template

  • To reuse the predefined template, just override the theme method and set your custom HTML to the available variable of the template.
  • Example: To reuse the header.ftl template in getHeader method.

Override or replace the predefined template

  • To override or replace the predefined template, you just need to create your own template using FreeMaker syntax.
  • Example: Using a custom template file in getHeader method.

Plugin Properties Options

Tutorials

Related Community Plugins

  • Corporati Theme
    org.joget.plugin.enterprise.CorporatiTheme (wflow-core)
  • V3 Default Theme
    org.joget.apps.userview.lib.DefaultTheme (wflow-core)

  • No labels