Giter Club home page Giter Club logo

library-backup-liferay-thymeleaf-dialect's Introduction

Thymeleaf dialect for Liferay

Tags:

liferay:src

This tag modifies src-attribute.

liferay:href

This tag modifies href-attribute.

liferay:action

This tag modifies action-attribute.

liferay:withUrl

This tag defines local variables to use in multiple places.

Expression objects:

#portletPreferences

Access portlet preferences - PortletPreferences.

Tag Reference

Following names are reserved for internal use:

portletId - Id of the portlet where request will be sent. Default is current portlet.

portletIdPref - Id of the portlet from PortletPreferences.

plid - Portlet Layout ID. Default is current portlet plid.

portletUrl - Gets plid from portlet relative url.

portletUrlPref - Portlet relative url from PortletPreferences.

lifecycle - Defines portlet lifecycle to be used. Allowed values are javax.portlet.PortletRequest constants: (ACTION_PHASE, RESOURCE_PHASE, RENDER_PHASE, EVENT_PHASE). Default is RENDER_PHASE.

windowState - Which window state will the URL point to. Allowed values are javax.portlet.WindowState and com.liferay.portal.kernel.portlet.LiferayWindowState constants: (NORMAL, MAXIMIZED, MINIMIZED, EXCLUSIVE, POP_UP). Default is NORMAL.

portletMode - Mode of the portlet. Allowed values are javax.portlet.PortletMode and com.liferay.portal.kernel.portlet.LiferayPortletMode constants: (VIEW, EDIT, HELP, ABOUT, CONFIG, EDIT_DEFAULTS, EDIT_GUEST, PREVIEW, PRINT). Default is VIEW.

action - Shortcut for javax.portlet.action=YOUR_VALUE, lifecycle=ACTION_PHASE.

resource - Shortcut for p_p_id=YOUR_VALUE, lifecycle=RESOURCE_PHASE.

Every other parameter given will be sent to portlet as query parameter.

Usage

Example 1. link

<a href="#" liferay:href="var1='value', var2=${definedVariable}, lifecycle='ACTION_PHASE'">
    Link
</a>

var1 and var2 are parameters to be sent to action phase of current portlet. Lifecycle defines that the request will be action request.

Example 2. withUrl

<p liferay:withUrl="myurl=${ {windowState='maximized', portletMode='edit'} }, save=${ { action:'save' } }">
    <a href="${myurl}">Open edit in maximized window</a>
    <a href="${save}">Save current portlet state</a>
</p>

Example 3. action

<a href="#" liferay:href="action='find', var1=${definedVariable}">Link</a>

Above is only simplified form of:

<a href="#" liferay:href="javax.portlet.action='find', var1=${definedVariable}, lifecycle='ACTION_PHASE'">Link</a>

library-backup-liferay-thymeleaf-dialect's People

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.