Sunday, 13 September 2015

Liferay Tips regarding Basic

LlFERAY BASIC AWARENESS
  • Non-instanceable portlets (eg. Wiki Portlet) can be placed only once in the whole community or organization of Portal instance.
  • Some non-instanceable portlets (eg. Wiki Portlet) can placed into multiple pages of same community by changing there scope to a specific page. This however was not a possibility with Liferay 5.2 (versions < 6).
  • Non instantiable portlet can be placed on different page within a community, however they will share the same dataset. eg. wiki portlet in liferay
  • However if still it’s need to have different data set’s of non-instantiable portlets, in can be done by limiting the scope of such portlets to page scope. eg. wiki portlet’s configuration has the option of scope and there it can be limited to current page only, so in can be placed on another page with different data set.
  • “companyId” refers to the whole portal instance in Liferay.
  • When ever to specify the portlet name, it should be taken from the database table
  • ‘portlet’ under the column ‘portletId’This is specially useful in case of custom created portlet with plugin SDK as Liferay
  • modifies it to the form’abc_WAR_xyz’ where abc is the portlet name and ‘xyz’ is the portlet project name.
  • <code>com.liferay.portal.kernel.util.StringPool</code> The class that contains constant (html equivalents) for special characters used in Liferay
  • “groupId” refers to organization or community.
  • Remove the message that action was successfully carried out “Your request processed successfully.” by using the init param in portlet.xml:-       <init-param> <name>add-process-action-success-action</name> <value>false</value></init-param>
  • Get the current GroupId using:        themeDisplay.getScopeGroupId()
  • Get user agent in velocity:        $request.get('attributes').get('User-Agent')
  • Pages are implemented as layouts which have hierarchy.
  • ‘Manage pages’ only lets managing pages of the current logged in group
  • To remove ;jsessionid=48CFD42598E4 use property session.enable.url.with.session.id= in portal-ext.properties
  • To disable look and feel configuration use : look.and.feel.modifiable=false
  • For integration with Google Apps, the domain used by google apps will be the configured mail domain of the portal
  • Google apps integration wont’ work untill the value of mail.hook.impl is ste to com.liferay.mail.util.GoogleHook
  • To allow user to add comment use the tag <liferay-ui: discussion>, similar one is for flags <liferay-ui:flags>
  • Permission is an action on a resource
  • Liferay makes available all custom attribute  (which can be added using <aui:input name=”ExpandoAttributeName–abcd–” type=”hidden”  value=”abcd” /> )values through ServiceContext
  • Portlet URL’s are different from normal web application URL’s . The reason being: portlets are a part of page and there has to be a unique way of identifying a specific portlet request. Therefore these URL’s are to be modified (adding parameters etc) programatically

No comments:

Post a Comment