How to set portlet preference in theme?

You can supply preferences for your embedded portlet as well.  Liferay provides a built-in VM variable called$velocityPortletPreferences for this purpose.

$velocityPortletPreferences is a Map<String, String>.  For each preference, pass its key string plus the value you desire.  The key may be one of Liferay’s built-in portlet preference keys, or (for plugin portlets) one of your own that your portlet knows how to interpret.

#set ($VOID = $velocityPortletPreferences.setValue(‘display-style’, ‘1’))
#set ($VOID = $velocityPortletPreferences.setValue(‘portlet-setup-show-borders’, ‘false’))}}}

Recommendation for stripping your every response

Answer : Using Servlet Filter through Hook

  • Filter through EXT
  • Using Servlet Filter through Hook
  • Hook for post requester process
  • Hook for post action

If table exist in your DB, then in service.xml is it compulsory to have your entity name same as table name ?

Answer: False

How to embed a portlet in theme?

    Answer:  Using theme.runtime()

How to process a column in layout template

Answer:     Processor.processColumn()

What is the recommended way to add a new method in the service?

    Answer:  Using hooks service wrapper

How you can change the existing implementation of indexing of user service

Answer:        Using EXT

Where are the setting of your development environment stored.  Below were the options?

  •  Portal-ext.properties
  •  Portal-developer.properties
  • developer.properties
  • None

Answer: Portal-ext.properties

How you can generate remote services using liferay service builder?

Answer: Specfying remote-service=”true” in tag of service.xml

Which of the below is in liferay-portlet.xml?

  • Events
  • CSS class Wrapper
  • Resource Bundle
  • Portlet class

Answer: CSS Class Wrapper

How can you have more than 1 instance of the portlet on the page


Answer:   Having true in liferay-portlet.xml

If you want to change the user service using hooks which class will you extend?

–          UserServiceWrapper