Recently I was comparing servlet specifications after 2.4 version, Here is a short matrix for reference
Lately I was trying to get data back from response once the Ajax Call is complete. There were few examples and i couldnt find them conclusive enough. Here is the snippet of MVC Portlet in Liferay 6. In this example i am sending a AJAX request with parameters and then getting few parameter back from response using Alloy UI Ajax Call.
Tags in Liferay
In Liferay you can create Tag Sets, Create Tags within each Tag Set and assign properties to Tags.Once Creation is done, you can assign same tag to multiple assets.
This article describes how the tags data stored internally in Liferay. The Version i used is Liferay 52EE SP5
Here is small snippet of code to check community level role in Themes. You can write the following code in init_custom.vm
#* Check for Community role for logged in user. *# #set ($blogEditorCummunityRole = 'Blog Editor') #set ($userHasBlogEditorRole = 'false') #* Get Role Local Service *# #set ($roleLocalService = $serviceLocator.findService("com.liferay.portal.service.RoleLocalService")) #* Get All community Level Role for current community and Current Logged In User *# #set ($communityRolesforUser = $roleLocalService.getUserGroupRoles($user_id,$group_id)) #* Iterate through the list of roles and Compare the Blog Editor Role *# #foreach ($communityRoleforUser in $communityRolesforUser) #if ($communityRoleforUser.getName() == $blogEditorCummunityRole) #set ($userHasBlogEditorRole= 'true') #end #end
Liferay 6 offers feature of Site Templates , where in you can design a site template . Using the newly designed template you can create multiple communities and organization on the fly. Just apply the template while creating those communities .
Site templates is nothing but a community which will act as a template for new communities. It will have Pages , Portlets , Content just as a regular community can.
Here are the steps to create a site template and create a community using the newly created site template.
Liferay 6 comes with new functionality , Page Templates. User can define a page with certain portlets/Layouts and Save the Page as templates. Later on while creating the new page , user can select the Page Template.
Here are the Steps :