Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 6.1.0 CE GA1
-
Fix Version/s: 6.2.X, --Sprint 5/12
-
Component/s: Dynamic Data Lists
-
Labels:None
-
Environment:liferay-portal-6.1.0-ce-ga1,Mysql
-
Similar Issues:
Description
You can't choose list template, when you configure dynamic data list display.
steps:
1- create dataDefinition
2- create list template for this list template.
3- create dynamic data list and choose the data definition that I just created.
4- Add dynamic data list displayer portlet and choose the dynamic data list I created.
The problem:
5- In configuration of the portlet, It is supposed to choose a list template and detail template from a combo box, I can choose the detail template, but I can't choosea list template because is not exist.
Attachments
Issue Links
| This issue duplicates: | ||||
| LPS-25059 | List templates are not being displayed for selection in Dynamic Data List Display portlet |
|
|
|

The main problem is in :
\liferay-portal-6.1.0-ce-ga1\tomcat-7.0.23\webapps\ROOT\html\portlet\dynamic_data_list_display\configuration.jsp
The code that get list templates is:
List<DDMTemplate> templates = DDMTemplateLocalServiceUtil.getTemplates(ddmStructureId, DDMTemplateConstants.TEMPLATE_TYPE_LIST, DDMTemplateConstants.TEMPLATE_MODE_CREATE);
the code got list templates by:
1- structureId.
2- template type(list template or detail template).
3- template mode.
Here is the problem, list template has no mode, so when this code try to get a list that contain list templates it returns a list with size zero(no thing).
we should remove this part, in other words use this code:
List<DDMTemplate> templates = DDMTemplateLocalServiceUtil.getTemplates(ddmStructureId, DDMTemplateConstants.TEMPLATE_TYPE_LIST);
and this solved every thing.