Bradley Wood 12 Years Ago Can you do a blog post how you can expose a Dynamic DataList from webcontent velocity template? Please sign in to reply. Reply as... Cancel
Navin Agarwal 12 Years Ago wow its working in Liferay 6.1 GA very fine .. Marcellus give some information with velocity template ... Please sign in to reply. Reply as... Cancel Harish Kumar Navin Agarwal 12 Years Ago Navin,I created a new dynamic data list and one detail template and list template also.When I go to configration section in the portlet to select newly created detail template and list template, I found that list template is not listed there to choose from whereas detail template is there and upon selection its also working fine.any suggestions would be helpful.. Please sign in to reply. Reply as... Cancel Marcellus Tavares Harish Kumar 12 Years Ago Hi Harish, this issue will be fixed in LPS-25059. Thanks. Please sign in to reply. Reply as... Cancel Harish Kumar Marcellus Tavares 12 Years Ago thanks Marcellus Please sign in to reply. Reply as... Cancel Nicola Grippaldi Harish Kumar 12 Years Ago I built ddm, ddl and template as Marcellus suggested and I called template1 the list template.I added a Dynamic Data List Display portlet in My public pages and all works fine.I created from DDL display portlet a new template just like template1 but without the raw<img height="100" src='/documents/ddm/${className}/${classPK}/${fileName}' width="100" />to show the list without images, and I saved it as template2.I selected template2 but the behaviour of portlet doesn't change.I can select default template with no problem but if I select template1 or template2 I get the same data visualization with images.HORRIBLE WORKAROUND1. In DDL portlet I selected template2 which didn't work2. shutdown tomcat3. startup tomcatDDL portlet now show correct data list without imagesIf I select template1 or template2 I got the same data visualization without imagesThe same behaviour if, rather than use another template, remove the images code row from template1.What have I to do? Please sign in to reply. Reply as... Cancel Marcellus Tavares Nicola Grippaldi 12 Years Ago Hey Nicola, what version are you running? Please sign in to reply. Reply as... Cancel Damien Pruvost Marcellus Tavares 12 Years Ago Hi,does anynone know how populate a list of records from an SQL database.Is it possible to reference methods defined in a Java class thanks to Velocity template ?Thanks for ur help. Please sign in to reply. Reply as... Cancel Marcellus Tavares Damien Pruvost 12 Years Ago Hey Damien, you can populate your records through the DDL API. DDLRecordSetService allows you to create lists and the DDLRecordService is to be used to create the list records.Yes. It is. You should only set the classes you want to be visible within the velocity context. Take a look VelocityVariablesImpl.java Please sign in to reply. Reply as... Cancel Nicola Grippaldi Marcellus Tavares 12 Years Ago Hi Marcellussorry for late replyI've just updated trunk and the problem persistNicola Please sign in to reply. Reply as... Cancel Vipin Bardia Nicola Grippaldi 12 Years Ago Hi Marcellus,It's a nice blog, learned a lot.But when i tried to create list template.<b>It gives this error -</b>An error occurred while processing the template.Invocation of method 'createJSONObject' in class com.liferay.portal.json.JSONFactoryImpl threw exception com.liferay.portal.kernel.json.JSONException: java.lang.NullPointerException at 20null[line 25, column 48]1## Get the reference of DDL Record Service via serviceLocator, which is automatically set in the context 2 3#set ($ddlRecordService = $serviceLocator.findService('com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService')) 4 5## $reserved_record_set_id is also an object set in the context and it has the value of the list id configured for the portlet instance 6 7#set ($recordSetId = $getterUtil.getInteger($reserved_record_set_id.data, 0)) 8 9## call to the retrieve all records of the list 10 11#set ($records = $ddlRecordService.getRecords($recordSetId)) 12 13#foreach($record in $records) 14 ## each record has a collection of fields (name and avatar in our case) 15 16 #set ($fields = $record.getFields()) 17 18 #set ($nameField = $fields.get("name")) 19 20 #set ($avatarField = $fields.get("avatar")) 21 22 ## the avatar is a file upload field and its value holds a JSON object 23 ## jsonFactoryUtil help us to convert string value into a JSON object 24 25 #set ($avatarJSONObject = $jsonFactoryUtil.createJSONObject($avatarField.value)) 26 27 #set ($fileName = $avatarField.getName()) 28 #set ($className = $avatarJSONObject.getString("className")) 29 #set ($classPK = $avatarJSONObject.getString("classPK")) 30 31 <div style="padding-top: 10px;"> 32 <img height="100" src='/documents/ddm/${className}/${classPK}/${fileName}' width="100" /> 33 34 <span style="padding-left: 5px;"> 35 $nameField.getValue() 36 <span> 37 </div> 38#end Please let me know, if there is any work around.Thanks,Vipin Bardia Please sign in to reply. Reply as... Cancel Dmitry Far Vipin Bardia 12 Years Ago #set ($portalBeanLocator = $portal.getClass().forName('com.liferay.portal.kernel.bean.PortalBeanLocatorUtil'))#set ($jsonFactoryUtil = $portalBeanLocator.locate('com.liferay.portal.kernel.json.JSONFactoryUtil')) Please sign in to reply. Reply as... Cancel Pius Onobhayedo Dmitry Far 12 Years Ago Thanks Marcellus. Great work!I was trying to find out how to combine the use of List template as you explained above with drill down to detail view/edit. In other words, I would like to display content in a custom manner and at the same time be able to perform actions on the displayed records. Secondly, is there a way to make some fields non-editable?Kindly advice? Thank you in advance. Please sign in to reply. Reply as... Cancel
Harish Kumar Navin Agarwal 12 Years Ago Navin,I created a new dynamic data list and one detail template and list template also.When I go to configration section in the portlet to select newly created detail template and list template, I found that list template is not listed there to choose from whereas detail template is there and upon selection its also working fine.any suggestions would be helpful.. Please sign in to reply. Reply as... Cancel Marcellus Tavares Harish Kumar 12 Years Ago Hi Harish, this issue will be fixed in LPS-25059. Thanks. Please sign in to reply. Reply as... Cancel Harish Kumar Marcellus Tavares 12 Years Ago thanks Marcellus Please sign in to reply. Reply as... Cancel Nicola Grippaldi Harish Kumar 12 Years Ago I built ddm, ddl and template as Marcellus suggested and I called template1 the list template.I added a Dynamic Data List Display portlet in My public pages and all works fine.I created from DDL display portlet a new template just like template1 but without the raw<img height="100" src='/documents/ddm/${className}/${classPK}/${fileName}' width="100" />to show the list without images, and I saved it as template2.I selected template2 but the behaviour of portlet doesn't change.I can select default template with no problem but if I select template1 or template2 I get the same data visualization with images.HORRIBLE WORKAROUND1. In DDL portlet I selected template2 which didn't work2. shutdown tomcat3. startup tomcatDDL portlet now show correct data list without imagesIf I select template1 or template2 I got the same data visualization without imagesThe same behaviour if, rather than use another template, remove the images code row from template1.What have I to do? Please sign in to reply. Reply as... Cancel Marcellus Tavares Nicola Grippaldi 12 Years Ago Hey Nicola, what version are you running? Please sign in to reply. Reply as... Cancel Damien Pruvost Marcellus Tavares 12 Years Ago Hi,does anynone know how populate a list of records from an SQL database.Is it possible to reference methods defined in a Java class thanks to Velocity template ?Thanks for ur help. Please sign in to reply. Reply as... Cancel Marcellus Tavares Damien Pruvost 12 Years Ago Hey Damien, you can populate your records through the DDL API. DDLRecordSetService allows you to create lists and the DDLRecordService is to be used to create the list records.Yes. It is. You should only set the classes you want to be visible within the velocity context. Take a look VelocityVariablesImpl.java Please sign in to reply. Reply as... Cancel Nicola Grippaldi Marcellus Tavares 12 Years Ago Hi Marcellussorry for late replyI've just updated trunk and the problem persistNicola Please sign in to reply. Reply as... Cancel Vipin Bardia Nicola Grippaldi 12 Years Ago Hi Marcellus,It's a nice blog, learned a lot.But when i tried to create list template.<b>It gives this error -</b>An error occurred while processing the template.Invocation of method 'createJSONObject' in class com.liferay.portal.json.JSONFactoryImpl threw exception com.liferay.portal.kernel.json.JSONException: java.lang.NullPointerException at 20null[line 25, column 48]1## Get the reference of DDL Record Service via serviceLocator, which is automatically set in the context 2 3#set ($ddlRecordService = $serviceLocator.findService('com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService')) 4 5## $reserved_record_set_id is also an object set in the context and it has the value of the list id configured for the portlet instance 6 7#set ($recordSetId = $getterUtil.getInteger($reserved_record_set_id.data, 0)) 8 9## call to the retrieve all records of the list 10 11#set ($records = $ddlRecordService.getRecords($recordSetId)) 12 13#foreach($record in $records) 14 ## each record has a collection of fields (name and avatar in our case) 15 16 #set ($fields = $record.getFields()) 17 18 #set ($nameField = $fields.get("name")) 19 20 #set ($avatarField = $fields.get("avatar")) 21 22 ## the avatar is a file upload field and its value holds a JSON object 23 ## jsonFactoryUtil help us to convert string value into a JSON object 24 25 #set ($avatarJSONObject = $jsonFactoryUtil.createJSONObject($avatarField.value)) 26 27 #set ($fileName = $avatarField.getName()) 28 #set ($className = $avatarJSONObject.getString("className")) 29 #set ($classPK = $avatarJSONObject.getString("classPK")) 30 31 <div style="padding-top: 10px;"> 32 <img height="100" src='/documents/ddm/${className}/${classPK}/${fileName}' width="100" /> 33 34 <span style="padding-left: 5px;"> 35 $nameField.getValue() 36 <span> 37 </div> 38#end Please let me know, if there is any work around.Thanks,Vipin Bardia Please sign in to reply. Reply as... Cancel Dmitry Far Vipin Bardia 12 Years Ago #set ($portalBeanLocator = $portal.getClass().forName('com.liferay.portal.kernel.bean.PortalBeanLocatorUtil'))#set ($jsonFactoryUtil = $portalBeanLocator.locate('com.liferay.portal.kernel.json.JSONFactoryUtil')) Please sign in to reply. Reply as... Cancel Pius Onobhayedo Dmitry Far 12 Years Ago Thanks Marcellus. Great work!I was trying to find out how to combine the use of List template as you explained above with drill down to detail view/edit. In other words, I would like to display content in a custom manner and at the same time be able to perform actions on the displayed records. Secondly, is there a way to make some fields non-editable?Kindly advice? Thank you in advance. Please sign in to reply. Reply as... Cancel
Marcellus Tavares Harish Kumar 12 Years Ago Hi Harish, this issue will be fixed in LPS-25059. Thanks. Please sign in to reply. Reply as... Cancel Harish Kumar Marcellus Tavares 12 Years Ago thanks Marcellus Please sign in to reply. Reply as... Cancel Nicola Grippaldi Harish Kumar 12 Years Ago I built ddm, ddl and template as Marcellus suggested and I called template1 the list template.I added a Dynamic Data List Display portlet in My public pages and all works fine.I created from DDL display portlet a new template just like template1 but without the raw<img height="100" src='/documents/ddm/${className}/${classPK}/${fileName}' width="100" />to show the list without images, and I saved it as template2.I selected template2 but the behaviour of portlet doesn't change.I can select default template with no problem but if I select template1 or template2 I get the same data visualization with images.HORRIBLE WORKAROUND1. In DDL portlet I selected template2 which didn't work2. shutdown tomcat3. startup tomcatDDL portlet now show correct data list without imagesIf I select template1 or template2 I got the same data visualization without imagesThe same behaviour if, rather than use another template, remove the images code row from template1.What have I to do? Please sign in to reply. Reply as... Cancel Marcellus Tavares Nicola Grippaldi 12 Years Ago Hey Nicola, what version are you running? Please sign in to reply. Reply as... Cancel Damien Pruvost Marcellus Tavares 12 Years Ago Hi,does anynone know how populate a list of records from an SQL database.Is it possible to reference methods defined in a Java class thanks to Velocity template ?Thanks for ur help. Please sign in to reply. Reply as... Cancel Marcellus Tavares Damien Pruvost 12 Years Ago Hey Damien, you can populate your records through the DDL API. DDLRecordSetService allows you to create lists and the DDLRecordService is to be used to create the list records.Yes. It is. You should only set the classes you want to be visible within the velocity context. Take a look VelocityVariablesImpl.java Please sign in to reply. Reply as... Cancel Nicola Grippaldi Marcellus Tavares 12 Years Ago Hi Marcellussorry for late replyI've just updated trunk and the problem persistNicola Please sign in to reply. Reply as... Cancel Vipin Bardia Nicola Grippaldi 12 Years Ago Hi Marcellus,It's a nice blog, learned a lot.But when i tried to create list template.<b>It gives this error -</b>An error occurred while processing the template.Invocation of method 'createJSONObject' in class com.liferay.portal.json.JSONFactoryImpl threw exception com.liferay.portal.kernel.json.JSONException: java.lang.NullPointerException at 20null[line 25, column 48]1## Get the reference of DDL Record Service via serviceLocator, which is automatically set in the context 2 3#set ($ddlRecordService = $serviceLocator.findService('com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService')) 4 5## $reserved_record_set_id is also an object set in the context and it has the value of the list id configured for the portlet instance 6 7#set ($recordSetId = $getterUtil.getInteger($reserved_record_set_id.data, 0)) 8 9## call to the retrieve all records of the list 10 11#set ($records = $ddlRecordService.getRecords($recordSetId)) 12 13#foreach($record in $records) 14 ## each record has a collection of fields (name and avatar in our case) 15 16 #set ($fields = $record.getFields()) 17 18 #set ($nameField = $fields.get("name")) 19 20 #set ($avatarField = $fields.get("avatar")) 21 22 ## the avatar is a file upload field and its value holds a JSON object 23 ## jsonFactoryUtil help us to convert string value into a JSON object 24 25 #set ($avatarJSONObject = $jsonFactoryUtil.createJSONObject($avatarField.value)) 26 27 #set ($fileName = $avatarField.getName()) 28 #set ($className = $avatarJSONObject.getString("className")) 29 #set ($classPK = $avatarJSONObject.getString("classPK")) 30 31 <div style="padding-top: 10px;"> 32 <img height="100" src='/documents/ddm/${className}/${classPK}/${fileName}' width="100" /> 33 34 <span style="padding-left: 5px;"> 35 $nameField.getValue() 36 <span> 37 </div> 38#end Please let me know, if there is any work around.Thanks,Vipin Bardia Please sign in to reply. Reply as... Cancel Dmitry Far Vipin Bardia 12 Years Ago #set ($portalBeanLocator = $portal.getClass().forName('com.liferay.portal.kernel.bean.PortalBeanLocatorUtil'))#set ($jsonFactoryUtil = $portalBeanLocator.locate('com.liferay.portal.kernel.json.JSONFactoryUtil')) Please sign in to reply. Reply as... Cancel Pius Onobhayedo Dmitry Far 12 Years Ago Thanks Marcellus. Great work!I was trying to find out how to combine the use of List template as you explained above with drill down to detail view/edit. In other words, I would like to display content in a custom manner and at the same time be able to perform actions on the displayed records. Secondly, is there a way to make some fields non-editable?Kindly advice? Thank you in advance. Please sign in to reply. Reply as... Cancel
Harish Kumar Marcellus Tavares 12 Years Ago thanks Marcellus Please sign in to reply. Reply as... Cancel Nicola Grippaldi Harish Kumar 12 Years Ago I built ddm, ddl and template as Marcellus suggested and I called template1 the list template.I added a Dynamic Data List Display portlet in My public pages and all works fine.I created from DDL display portlet a new template just like template1 but without the raw<img height="100" src='/documents/ddm/${className}/${classPK}/${fileName}' width="100" />to show the list without images, and I saved it as template2.I selected template2 but the behaviour of portlet doesn't change.I can select default template with no problem but if I select template1 or template2 I get the same data visualization with images.HORRIBLE WORKAROUND1. In DDL portlet I selected template2 which didn't work2. shutdown tomcat3. startup tomcatDDL portlet now show correct data list without imagesIf I select template1 or template2 I got the same data visualization without imagesThe same behaviour if, rather than use another template, remove the images code row from template1.What have I to do? Please sign in to reply. Reply as... Cancel Marcellus Tavares Nicola Grippaldi 12 Years Ago Hey Nicola, what version are you running? Please sign in to reply. Reply as... Cancel Damien Pruvost Marcellus Tavares 12 Years Ago Hi,does anynone know how populate a list of records from an SQL database.Is it possible to reference methods defined in a Java class thanks to Velocity template ?Thanks for ur help. Please sign in to reply. Reply as... Cancel Marcellus Tavares Damien Pruvost 12 Years Ago Hey Damien, you can populate your records through the DDL API. DDLRecordSetService allows you to create lists and the DDLRecordService is to be used to create the list records.Yes. It is. You should only set the classes you want to be visible within the velocity context. Take a look VelocityVariablesImpl.java Please sign in to reply. Reply as... Cancel Nicola Grippaldi Marcellus Tavares 12 Years Ago Hi Marcellussorry for late replyI've just updated trunk and the problem persistNicola Please sign in to reply. Reply as... Cancel Vipin Bardia Nicola Grippaldi 12 Years Ago Hi Marcellus,It's a nice blog, learned a lot.But when i tried to create list template.<b>It gives this error -</b>An error occurred while processing the template.Invocation of method 'createJSONObject' in class com.liferay.portal.json.JSONFactoryImpl threw exception com.liferay.portal.kernel.json.JSONException: java.lang.NullPointerException at 20null[line 25, column 48]1## Get the reference of DDL Record Service via serviceLocator, which is automatically set in the context 2 3#set ($ddlRecordService = $serviceLocator.findService('com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService')) 4 5## $reserved_record_set_id is also an object set in the context and it has the value of the list id configured for the portlet instance 6 7#set ($recordSetId = $getterUtil.getInteger($reserved_record_set_id.data, 0)) 8 9## call to the retrieve all records of the list 10 11#set ($records = $ddlRecordService.getRecords($recordSetId)) 12 13#foreach($record in $records) 14 ## each record has a collection of fields (name and avatar in our case) 15 16 #set ($fields = $record.getFields()) 17 18 #set ($nameField = $fields.get("name")) 19 20 #set ($avatarField = $fields.get("avatar")) 21 22 ## the avatar is a file upload field and its value holds a JSON object 23 ## jsonFactoryUtil help us to convert string value into a JSON object 24 25 #set ($avatarJSONObject = $jsonFactoryUtil.createJSONObject($avatarField.value)) 26 27 #set ($fileName = $avatarField.getName()) 28 #set ($className = $avatarJSONObject.getString("className")) 29 #set ($classPK = $avatarJSONObject.getString("classPK")) 30 31 <div style="padding-top: 10px;"> 32 <img height="100" src='/documents/ddm/${className}/${classPK}/${fileName}' width="100" /> 33 34 <span style="padding-left: 5px;"> 35 $nameField.getValue() 36 <span> 37 </div> 38#end Please let me know, if there is any work around.Thanks,Vipin Bardia Please sign in to reply. Reply as... Cancel Dmitry Far Vipin Bardia 12 Years Ago #set ($portalBeanLocator = $portal.getClass().forName('com.liferay.portal.kernel.bean.PortalBeanLocatorUtil'))#set ($jsonFactoryUtil = $portalBeanLocator.locate('com.liferay.portal.kernel.json.JSONFactoryUtil')) Please sign in to reply. Reply as... Cancel Pius Onobhayedo Dmitry Far 12 Years Ago Thanks Marcellus. Great work!I was trying to find out how to combine the use of List template as you explained above with drill down to detail view/edit. In other words, I would like to display content in a custom manner and at the same time be able to perform actions on the displayed records. Secondly, is there a way to make some fields non-editable?Kindly advice? Thank you in advance. Please sign in to reply. Reply as... Cancel
Nicola Grippaldi Harish Kumar 12 Years Ago I built ddm, ddl and template as Marcellus suggested and I called template1 the list template.I added a Dynamic Data List Display portlet in My public pages and all works fine.I created from DDL display portlet a new template just like template1 but without the raw<img height="100" src='/documents/ddm/${className}/${classPK}/${fileName}' width="100" />to show the list without images, and I saved it as template2.I selected template2 but the behaviour of portlet doesn't change.I can select default template with no problem but if I select template1 or template2 I get the same data visualization with images.HORRIBLE WORKAROUND1. In DDL portlet I selected template2 which didn't work2. shutdown tomcat3. startup tomcatDDL portlet now show correct data list without imagesIf I select template1 or template2 I got the same data visualization without imagesThe same behaviour if, rather than use another template, remove the images code row from template1.What have I to do? Please sign in to reply. Reply as... Cancel Marcellus Tavares Nicola Grippaldi 12 Years Ago Hey Nicola, what version are you running? Please sign in to reply. Reply as... Cancel Damien Pruvost Marcellus Tavares 12 Years Ago Hi,does anynone know how populate a list of records from an SQL database.Is it possible to reference methods defined in a Java class thanks to Velocity template ?Thanks for ur help. Please sign in to reply. Reply as... Cancel Marcellus Tavares Damien Pruvost 12 Years Ago Hey Damien, you can populate your records through the DDL API. DDLRecordSetService allows you to create lists and the DDLRecordService is to be used to create the list records.Yes. It is. You should only set the classes you want to be visible within the velocity context. Take a look VelocityVariablesImpl.java Please sign in to reply. Reply as... Cancel Nicola Grippaldi Marcellus Tavares 12 Years Ago Hi Marcellussorry for late replyI've just updated trunk and the problem persistNicola Please sign in to reply. Reply as... Cancel Vipin Bardia Nicola Grippaldi 12 Years Ago Hi Marcellus,It's a nice blog, learned a lot.But when i tried to create list template.<b>It gives this error -</b>An error occurred while processing the template.Invocation of method 'createJSONObject' in class com.liferay.portal.json.JSONFactoryImpl threw exception com.liferay.portal.kernel.json.JSONException: java.lang.NullPointerException at 20null[line 25, column 48]1## Get the reference of DDL Record Service via serviceLocator, which is automatically set in the context 2 3#set ($ddlRecordService = $serviceLocator.findService('com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService')) 4 5## $reserved_record_set_id is also an object set in the context and it has the value of the list id configured for the portlet instance 6 7#set ($recordSetId = $getterUtil.getInteger($reserved_record_set_id.data, 0)) 8 9## call to the retrieve all records of the list 10 11#set ($records = $ddlRecordService.getRecords($recordSetId)) 12 13#foreach($record in $records) 14 ## each record has a collection of fields (name and avatar in our case) 15 16 #set ($fields = $record.getFields()) 17 18 #set ($nameField = $fields.get("name")) 19 20 #set ($avatarField = $fields.get("avatar")) 21 22 ## the avatar is a file upload field and its value holds a JSON object 23 ## jsonFactoryUtil help us to convert string value into a JSON object 24 25 #set ($avatarJSONObject = $jsonFactoryUtil.createJSONObject($avatarField.value)) 26 27 #set ($fileName = $avatarField.getName()) 28 #set ($className = $avatarJSONObject.getString("className")) 29 #set ($classPK = $avatarJSONObject.getString("classPK")) 30 31 <div style="padding-top: 10px;"> 32 <img height="100" src='/documents/ddm/${className}/${classPK}/${fileName}' width="100" /> 33 34 <span style="padding-left: 5px;"> 35 $nameField.getValue() 36 <span> 37 </div> 38#end Please let me know, if there is any work around.Thanks,Vipin Bardia Please sign in to reply. Reply as... Cancel Dmitry Far Vipin Bardia 12 Years Ago #set ($portalBeanLocator = $portal.getClass().forName('com.liferay.portal.kernel.bean.PortalBeanLocatorUtil'))#set ($jsonFactoryUtil = $portalBeanLocator.locate('com.liferay.portal.kernel.json.JSONFactoryUtil')) Please sign in to reply. Reply as... Cancel Pius Onobhayedo Dmitry Far 12 Years Ago Thanks Marcellus. Great work!I was trying to find out how to combine the use of List template as you explained above with drill down to detail view/edit. In other words, I would like to display content in a custom manner and at the same time be able to perform actions on the displayed records. Secondly, is there a way to make some fields non-editable?Kindly advice? Thank you in advance. Please sign in to reply. Reply as... Cancel
Marcellus Tavares Nicola Grippaldi 12 Years Ago Hey Nicola, what version are you running? Please sign in to reply. Reply as... Cancel Damien Pruvost Marcellus Tavares 12 Years Ago Hi,does anynone know how populate a list of records from an SQL database.Is it possible to reference methods defined in a Java class thanks to Velocity template ?Thanks for ur help. Please sign in to reply. Reply as... Cancel Marcellus Tavares Damien Pruvost 12 Years Ago Hey Damien, you can populate your records through the DDL API. DDLRecordSetService allows you to create lists and the DDLRecordService is to be used to create the list records.Yes. It is. You should only set the classes you want to be visible within the velocity context. Take a look VelocityVariablesImpl.java Please sign in to reply. Reply as... Cancel Nicola Grippaldi Marcellus Tavares 12 Years Ago Hi Marcellussorry for late replyI've just updated trunk and the problem persistNicola Please sign in to reply. Reply as... Cancel Vipin Bardia Nicola Grippaldi 12 Years Ago Hi Marcellus,It's a nice blog, learned a lot.But when i tried to create list template.<b>It gives this error -</b>An error occurred while processing the template.Invocation of method 'createJSONObject' in class com.liferay.portal.json.JSONFactoryImpl threw exception com.liferay.portal.kernel.json.JSONException: java.lang.NullPointerException at 20null[line 25, column 48]1## Get the reference of DDL Record Service via serviceLocator, which is automatically set in the context 2 3#set ($ddlRecordService = $serviceLocator.findService('com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService')) 4 5## $reserved_record_set_id is also an object set in the context and it has the value of the list id configured for the portlet instance 6 7#set ($recordSetId = $getterUtil.getInteger($reserved_record_set_id.data, 0)) 8 9## call to the retrieve all records of the list 10 11#set ($records = $ddlRecordService.getRecords($recordSetId)) 12 13#foreach($record in $records) 14 ## each record has a collection of fields (name and avatar in our case) 15 16 #set ($fields = $record.getFields()) 17 18 #set ($nameField = $fields.get("name")) 19 20 #set ($avatarField = $fields.get("avatar")) 21 22 ## the avatar is a file upload field and its value holds a JSON object 23 ## jsonFactoryUtil help us to convert string value into a JSON object 24 25 #set ($avatarJSONObject = $jsonFactoryUtil.createJSONObject($avatarField.value)) 26 27 #set ($fileName = $avatarField.getName()) 28 #set ($className = $avatarJSONObject.getString("className")) 29 #set ($classPK = $avatarJSONObject.getString("classPK")) 30 31 <div style="padding-top: 10px;"> 32 <img height="100" src='/documents/ddm/${className}/${classPK}/${fileName}' width="100" /> 33 34 <span style="padding-left: 5px;"> 35 $nameField.getValue() 36 <span> 37 </div> 38#end Please let me know, if there is any work around.Thanks,Vipin Bardia Please sign in to reply. Reply as... Cancel Dmitry Far Vipin Bardia 12 Years Ago #set ($portalBeanLocator = $portal.getClass().forName('com.liferay.portal.kernel.bean.PortalBeanLocatorUtil'))#set ($jsonFactoryUtil = $portalBeanLocator.locate('com.liferay.portal.kernel.json.JSONFactoryUtil')) Please sign in to reply. Reply as... Cancel Pius Onobhayedo Dmitry Far 12 Years Ago Thanks Marcellus. Great work!I was trying to find out how to combine the use of List template as you explained above with drill down to detail view/edit. In other words, I would like to display content in a custom manner and at the same time be able to perform actions on the displayed records. Secondly, is there a way to make some fields non-editable?Kindly advice? Thank you in advance. Please sign in to reply. Reply as... Cancel
Damien Pruvost Marcellus Tavares 12 Years Ago Hi,does anynone know how populate a list of records from an SQL database.Is it possible to reference methods defined in a Java class thanks to Velocity template ?Thanks for ur help. Please sign in to reply. Reply as... Cancel Marcellus Tavares Damien Pruvost 12 Years Ago Hey Damien, you can populate your records through the DDL API. DDLRecordSetService allows you to create lists and the DDLRecordService is to be used to create the list records.Yes. It is. You should only set the classes you want to be visible within the velocity context. Take a look VelocityVariablesImpl.java Please sign in to reply. Reply as... Cancel Nicola Grippaldi Marcellus Tavares 12 Years Ago Hi Marcellussorry for late replyI've just updated trunk and the problem persistNicola Please sign in to reply. Reply as... Cancel Vipin Bardia Nicola Grippaldi 12 Years Ago Hi Marcellus,It's a nice blog, learned a lot.But when i tried to create list template.<b>It gives this error -</b>An error occurred while processing the template.Invocation of method 'createJSONObject' in class com.liferay.portal.json.JSONFactoryImpl threw exception com.liferay.portal.kernel.json.JSONException: java.lang.NullPointerException at 20null[line 25, column 48]1## Get the reference of DDL Record Service via serviceLocator, which is automatically set in the context 2 3#set ($ddlRecordService = $serviceLocator.findService('com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService')) 4 5## $reserved_record_set_id is also an object set in the context and it has the value of the list id configured for the portlet instance 6 7#set ($recordSetId = $getterUtil.getInteger($reserved_record_set_id.data, 0)) 8 9## call to the retrieve all records of the list 10 11#set ($records = $ddlRecordService.getRecords($recordSetId)) 12 13#foreach($record in $records) 14 ## each record has a collection of fields (name and avatar in our case) 15 16 #set ($fields = $record.getFields()) 17 18 #set ($nameField = $fields.get("name")) 19 20 #set ($avatarField = $fields.get("avatar")) 21 22 ## the avatar is a file upload field and its value holds a JSON object 23 ## jsonFactoryUtil help us to convert string value into a JSON object 24 25 #set ($avatarJSONObject = $jsonFactoryUtil.createJSONObject($avatarField.value)) 26 27 #set ($fileName = $avatarField.getName()) 28 #set ($className = $avatarJSONObject.getString("className")) 29 #set ($classPK = $avatarJSONObject.getString("classPK")) 30 31 <div style="padding-top: 10px;"> 32 <img height="100" src='/documents/ddm/${className}/${classPK}/${fileName}' width="100" /> 33 34 <span style="padding-left: 5px;"> 35 $nameField.getValue() 36 <span> 37 </div> 38#end Please let me know, if there is any work around.Thanks,Vipin Bardia Please sign in to reply. Reply as... Cancel Dmitry Far Vipin Bardia 12 Years Ago #set ($portalBeanLocator = $portal.getClass().forName('com.liferay.portal.kernel.bean.PortalBeanLocatorUtil'))#set ($jsonFactoryUtil = $portalBeanLocator.locate('com.liferay.portal.kernel.json.JSONFactoryUtil')) Please sign in to reply. Reply as... Cancel Pius Onobhayedo Dmitry Far 12 Years Ago Thanks Marcellus. Great work!I was trying to find out how to combine the use of List template as you explained above with drill down to detail view/edit. In other words, I would like to display content in a custom manner and at the same time be able to perform actions on the displayed records. Secondly, is there a way to make some fields non-editable?Kindly advice? Thank you in advance. Please sign in to reply. Reply as... Cancel
Marcellus Tavares Damien Pruvost 12 Years Ago Hey Damien, you can populate your records through the DDL API. DDLRecordSetService allows you to create lists and the DDLRecordService is to be used to create the list records.Yes. It is. You should only set the classes you want to be visible within the velocity context. Take a look VelocityVariablesImpl.java Please sign in to reply. Reply as... Cancel Nicola Grippaldi Marcellus Tavares 12 Years Ago Hi Marcellussorry for late replyI've just updated trunk and the problem persistNicola Please sign in to reply. Reply as... Cancel Vipin Bardia Nicola Grippaldi 12 Years Ago Hi Marcellus,It's a nice blog, learned a lot.But when i tried to create list template.<b>It gives this error -</b>An error occurred while processing the template.Invocation of method 'createJSONObject' in class com.liferay.portal.json.JSONFactoryImpl threw exception com.liferay.portal.kernel.json.JSONException: java.lang.NullPointerException at 20null[line 25, column 48]1## Get the reference of DDL Record Service via serviceLocator, which is automatically set in the context 2 3#set ($ddlRecordService = $serviceLocator.findService('com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService')) 4 5## $reserved_record_set_id is also an object set in the context and it has the value of the list id configured for the portlet instance 6 7#set ($recordSetId = $getterUtil.getInteger($reserved_record_set_id.data, 0)) 8 9## call to the retrieve all records of the list 10 11#set ($records = $ddlRecordService.getRecords($recordSetId)) 12 13#foreach($record in $records) 14 ## each record has a collection of fields (name and avatar in our case) 15 16 #set ($fields = $record.getFields()) 17 18 #set ($nameField = $fields.get("name")) 19 20 #set ($avatarField = $fields.get("avatar")) 21 22 ## the avatar is a file upload field and its value holds a JSON object 23 ## jsonFactoryUtil help us to convert string value into a JSON object 24 25 #set ($avatarJSONObject = $jsonFactoryUtil.createJSONObject($avatarField.value)) 26 27 #set ($fileName = $avatarField.getName()) 28 #set ($className = $avatarJSONObject.getString("className")) 29 #set ($classPK = $avatarJSONObject.getString("classPK")) 30 31 <div style="padding-top: 10px;"> 32 <img height="100" src='/documents/ddm/${className}/${classPK}/${fileName}' width="100" /> 33 34 <span style="padding-left: 5px;"> 35 $nameField.getValue() 36 <span> 37 </div> 38#end Please let me know, if there is any work around.Thanks,Vipin Bardia Please sign in to reply. Reply as... Cancel Dmitry Far Vipin Bardia 12 Years Ago #set ($portalBeanLocator = $portal.getClass().forName('com.liferay.portal.kernel.bean.PortalBeanLocatorUtil'))#set ($jsonFactoryUtil = $portalBeanLocator.locate('com.liferay.portal.kernel.json.JSONFactoryUtil')) Please sign in to reply. Reply as... Cancel Pius Onobhayedo Dmitry Far 12 Years Ago Thanks Marcellus. Great work!I was trying to find out how to combine the use of List template as you explained above with drill down to detail view/edit. In other words, I would like to display content in a custom manner and at the same time be able to perform actions on the displayed records. Secondly, is there a way to make some fields non-editable?Kindly advice? Thank you in advance. Please sign in to reply. Reply as... Cancel
Nicola Grippaldi Marcellus Tavares 12 Years Ago Hi Marcellussorry for late replyI've just updated trunk and the problem persistNicola Please sign in to reply. Reply as... Cancel Vipin Bardia Nicola Grippaldi 12 Years Ago Hi Marcellus,It's a nice blog, learned a lot.But when i tried to create list template.<b>It gives this error -</b>An error occurred while processing the template.Invocation of method 'createJSONObject' in class com.liferay.portal.json.JSONFactoryImpl threw exception com.liferay.portal.kernel.json.JSONException: java.lang.NullPointerException at 20null[line 25, column 48]1## Get the reference of DDL Record Service via serviceLocator, which is automatically set in the context 2 3#set ($ddlRecordService = $serviceLocator.findService('com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService')) 4 5## $reserved_record_set_id is also an object set in the context and it has the value of the list id configured for the portlet instance 6 7#set ($recordSetId = $getterUtil.getInteger($reserved_record_set_id.data, 0)) 8 9## call to the retrieve all records of the list 10 11#set ($records = $ddlRecordService.getRecords($recordSetId)) 12 13#foreach($record in $records) 14 ## each record has a collection of fields (name and avatar in our case) 15 16 #set ($fields = $record.getFields()) 17 18 #set ($nameField = $fields.get("name")) 19 20 #set ($avatarField = $fields.get("avatar")) 21 22 ## the avatar is a file upload field and its value holds a JSON object 23 ## jsonFactoryUtil help us to convert string value into a JSON object 24 25 #set ($avatarJSONObject = $jsonFactoryUtil.createJSONObject($avatarField.value)) 26 27 #set ($fileName = $avatarField.getName()) 28 #set ($className = $avatarJSONObject.getString("className")) 29 #set ($classPK = $avatarJSONObject.getString("classPK")) 30 31 <div style="padding-top: 10px;"> 32 <img height="100" src='/documents/ddm/${className}/${classPK}/${fileName}' width="100" /> 33 34 <span style="padding-left: 5px;"> 35 $nameField.getValue() 36 <span> 37 </div> 38#end Please let me know, if there is any work around.Thanks,Vipin Bardia Please sign in to reply. Reply as... Cancel Dmitry Far Vipin Bardia 12 Years Ago #set ($portalBeanLocator = $portal.getClass().forName('com.liferay.portal.kernel.bean.PortalBeanLocatorUtil'))#set ($jsonFactoryUtil = $portalBeanLocator.locate('com.liferay.portal.kernel.json.JSONFactoryUtil')) Please sign in to reply. Reply as... Cancel Pius Onobhayedo Dmitry Far 12 Years Ago Thanks Marcellus. Great work!I was trying to find out how to combine the use of List template as you explained above with drill down to detail view/edit. In other words, I would like to display content in a custom manner and at the same time be able to perform actions on the displayed records. Secondly, is there a way to make some fields non-editable?Kindly advice? Thank you in advance. Please sign in to reply. Reply as... Cancel
Vipin Bardia Nicola Grippaldi 12 Years Ago Hi Marcellus,It's a nice blog, learned a lot.But when i tried to create list template.<b>It gives this error -</b>An error occurred while processing the template.Invocation of method 'createJSONObject' in class com.liferay.portal.json.JSONFactoryImpl threw exception com.liferay.portal.kernel.json.JSONException: java.lang.NullPointerException at 20null[line 25, column 48]1## Get the reference of DDL Record Service via serviceLocator, which is automatically set in the context 2 3#set ($ddlRecordService = $serviceLocator.findService('com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService')) 4 5## $reserved_record_set_id is also an object set in the context and it has the value of the list id configured for the portlet instance 6 7#set ($recordSetId = $getterUtil.getInteger($reserved_record_set_id.data, 0)) 8 9## call to the retrieve all records of the list 10 11#set ($records = $ddlRecordService.getRecords($recordSetId)) 12 13#foreach($record in $records) 14 ## each record has a collection of fields (name and avatar in our case) 15 16 #set ($fields = $record.getFields()) 17 18 #set ($nameField = $fields.get("name")) 19 20 #set ($avatarField = $fields.get("avatar")) 21 22 ## the avatar is a file upload field and its value holds a JSON object 23 ## jsonFactoryUtil help us to convert string value into a JSON object 24 25 #set ($avatarJSONObject = $jsonFactoryUtil.createJSONObject($avatarField.value)) 26 27 #set ($fileName = $avatarField.getName()) 28 #set ($className = $avatarJSONObject.getString("className")) 29 #set ($classPK = $avatarJSONObject.getString("classPK")) 30 31 <div style="padding-top: 10px;"> 32 <img height="100" src='/documents/ddm/${className}/${classPK}/${fileName}' width="100" /> 33 34 <span style="padding-left: 5px;"> 35 $nameField.getValue() 36 <span> 37 </div> 38#end Please let me know, if there is any work around.Thanks,Vipin Bardia Please sign in to reply. Reply as... Cancel Dmitry Far Vipin Bardia 12 Years Ago #set ($portalBeanLocator = $portal.getClass().forName('com.liferay.portal.kernel.bean.PortalBeanLocatorUtil'))#set ($jsonFactoryUtil = $portalBeanLocator.locate('com.liferay.portal.kernel.json.JSONFactoryUtil')) Please sign in to reply. Reply as... Cancel Pius Onobhayedo Dmitry Far 12 Years Ago Thanks Marcellus. Great work!I was trying to find out how to combine the use of List template as you explained above with drill down to detail view/edit. In other words, I would like to display content in a custom manner and at the same time be able to perform actions on the displayed records. Secondly, is there a way to make some fields non-editable?Kindly advice? Thank you in advance. Please sign in to reply. Reply as... Cancel
Dmitry Far Vipin Bardia 12 Years Ago #set ($portalBeanLocator = $portal.getClass().forName('com.liferay.portal.kernel.bean.PortalBeanLocatorUtil'))#set ($jsonFactoryUtil = $portalBeanLocator.locate('com.liferay.portal.kernel.json.JSONFactoryUtil')) Please sign in to reply. Reply as... Cancel Pius Onobhayedo Dmitry Far 12 Years Ago Thanks Marcellus. Great work!I was trying to find out how to combine the use of List template as you explained above with drill down to detail view/edit. In other words, I would like to display content in a custom manner and at the same time be able to perform actions on the displayed records. Secondly, is there a way to make some fields non-editable?Kindly advice? Thank you in advance. Please sign in to reply. Reply as... Cancel
Pius Onobhayedo Dmitry Far 12 Years Ago Thanks Marcellus. Great work!I was trying to find out how to combine the use of List template as you explained above with drill down to detail view/edit. In other words, I would like to display content in a custom manner and at the same time be able to perform actions on the displayed records. Secondly, is there a way to make some fields non-editable?Kindly advice? Thank you in advance. Please sign in to reply. Reply as... Cancel
Danny Jiang 11 Years Ago Hi Marcellus,Could you show me how to link to record details view in your list template?ThanksDanny Please sign in to reply. Reply as... Cancel
iqbal ahmed 11 Years Ago hi guys, i created dynamic data list exactly as shown image is not displaying other data is displaying how to resolve it plz help i am new to liferay Please sign in to reply. Reply as... Cancel RH HannMTV iqbal ahmed 11 Years Ago I've managed it to get it to work with the following code. It seems that with at least 6.1 the JSON names are changed. I've printed out the value of the imagefield and the fields are recordId, name, path.#set ($titleImageField = $record.getField("titleimage")) #set ($titleImageValue = $titleImageField.getValue()) #set ($imageJSONObject = $jsonFactoryUtil.createJSONObject($titleImageField.value)) #set ($imageFieldName = $titleImageField.getName()) #set ($imageRecordId = $imageJSONObject.getString("recordId"))<img src='/documents/ddl/${imageRecordId}/${imageFieldName}' width="100" />Very annoying is a bug, which requires a restart after changing the template, else you will see the result of the previous template definition. So make sure to have a working template before deploying it into a production environment, to minimize downtime of your production server. Please sign in to reply. Reply as... Cancel long zhao RH HannMTV 11 Years Ago If is use the same velocity code, how could I show a same list on another page?I need to show the same information but in different page.And how to add the default row of "Actions"Thanks Please sign in to reply. Reply as... Cancel Randy Parsons long zhao 11 Years Ago I know it was asked above (Danny Jiang) - but no-one answered. How do you link (create the link in the VM of the List Template) a record on a List Template to open the record using a specific Detail Template - very similar to Asset Publisher does with Table option?Thanks. Please sign in to reply. Reply as... Cancel Dmitry Sergeev Randy Parsons 11 Years Ago Thanks for interesting post, it's very useful.Could someone please tell me where is the DDL data located? I'm talking about uploaded files and "documents and media" objects.Is it in DB or somewhere in filesystem?And yes, how can I render standard "actions" button in my custom list? Please sign in to reply. Reply as... Cancel
RH HannMTV iqbal ahmed 11 Years Ago I've managed it to get it to work with the following code. It seems that with at least 6.1 the JSON names are changed. I've printed out the value of the imagefield and the fields are recordId, name, path.#set ($titleImageField = $record.getField("titleimage")) #set ($titleImageValue = $titleImageField.getValue()) #set ($imageJSONObject = $jsonFactoryUtil.createJSONObject($titleImageField.value)) #set ($imageFieldName = $titleImageField.getName()) #set ($imageRecordId = $imageJSONObject.getString("recordId"))<img src='/documents/ddl/${imageRecordId}/${imageFieldName}' width="100" />Very annoying is a bug, which requires a restart after changing the template, else you will see the result of the previous template definition. So make sure to have a working template before deploying it into a production environment, to minimize downtime of your production server. Please sign in to reply. Reply as... Cancel long zhao RH HannMTV 11 Years Ago If is use the same velocity code, how could I show a same list on another page?I need to show the same information but in different page.And how to add the default row of "Actions"Thanks Please sign in to reply. Reply as... Cancel Randy Parsons long zhao 11 Years Ago I know it was asked above (Danny Jiang) - but no-one answered. How do you link (create the link in the VM of the List Template) a record on a List Template to open the record using a specific Detail Template - very similar to Asset Publisher does with Table option?Thanks. Please sign in to reply. Reply as... Cancel Dmitry Sergeev Randy Parsons 11 Years Ago Thanks for interesting post, it's very useful.Could someone please tell me where is the DDL data located? I'm talking about uploaded files and "documents and media" objects.Is it in DB or somewhere in filesystem?And yes, how can I render standard "actions" button in my custom list? Please sign in to reply. Reply as... Cancel
long zhao RH HannMTV 11 Years Ago If is use the same velocity code, how could I show a same list on another page?I need to show the same information but in different page.And how to add the default row of "Actions"Thanks Please sign in to reply. Reply as... Cancel Randy Parsons long zhao 11 Years Ago I know it was asked above (Danny Jiang) - but no-one answered. How do you link (create the link in the VM of the List Template) a record on a List Template to open the record using a specific Detail Template - very similar to Asset Publisher does with Table option?Thanks. Please sign in to reply. Reply as... Cancel Dmitry Sergeev Randy Parsons 11 Years Ago Thanks for interesting post, it's very useful.Could someone please tell me where is the DDL data located? I'm talking about uploaded files and "documents and media" objects.Is it in DB or somewhere in filesystem?And yes, how can I render standard "actions" button in my custom list? Please sign in to reply. Reply as... Cancel
Randy Parsons long zhao 11 Years Ago I know it was asked above (Danny Jiang) - but no-one answered. How do you link (create the link in the VM of the List Template) a record on a List Template to open the record using a specific Detail Template - very similar to Asset Publisher does with Table option?Thanks. Please sign in to reply. Reply as... Cancel Dmitry Sergeev Randy Parsons 11 Years Ago Thanks for interesting post, it's very useful.Could someone please tell me where is the DDL data located? I'm talking about uploaded files and "documents and media" objects.Is it in DB or somewhere in filesystem?And yes, how can I render standard "actions" button in my custom list? Please sign in to reply. Reply as... Cancel
Dmitry Sergeev Randy Parsons 11 Years Ago Thanks for interesting post, it's very useful.Could someone please tell me where is the DDL data located? I'm talking about uploaded files and "documents and media" objects.Is it in DB or somewhere in filesystem?And yes, how can I render standard "actions" button in my custom list? Please sign in to reply. Reply as... Cancel
João Cartaxo 11 Years Ago Can anyone please explain me what is the advantage of this List Templates?I ask this because on one hand we can customize the presentation, but on the other hand, the capability of performing actions over the records is lost...It must be....otherwise there would be an answer not only to me in the forum (http://www.liferay.com/community/forums/-/message_boards/message/15599617) but also to the other three people that have asked this same question in this very same comment list. Please sign in to reply. Reply as... Cancel Stijn Haus João Cartaxo 11 Years Ago Hi,Try this solution: http://webapplicationdeveloper.blogspot.be/2012/10/liferay-dynamic-data-lists-record.html for displaying the record actions. Please sign in to reply. Reply as... Cancel Ben Chapman Stijn Haus 11 Years Ago Stijn,Thanks for posting this. It was very useful - but it looks like the URL to your post may have changed: http://webapplicationdeveloper.blogspot.be/2012/10/liferay-dynamic-data-list-detail.html was where I found it. Thanks! Please sign in to reply. Reply as... Cancel Stijn Haus Ben Chapman 11 Years Ago Hi Ben,I actually made 2 posts:http://webapplicationdeveloper.blogspot.be/2012/10/liferay-dynamic-data-list-detail.html for going to a detail pageand http://webapplicationdeveloper.blogspot.be/2012/10/liferay-dynamic-data-lists-record.html to dosplay the actions on a record. Please sign in to reply. Reply as... Cancel
Stijn Haus João Cartaxo 11 Years Ago Hi,Try this solution: http://webapplicationdeveloper.blogspot.be/2012/10/liferay-dynamic-data-lists-record.html for displaying the record actions. Please sign in to reply. Reply as... Cancel Ben Chapman Stijn Haus 11 Years Ago Stijn,Thanks for posting this. It was very useful - but it looks like the URL to your post may have changed: http://webapplicationdeveloper.blogspot.be/2012/10/liferay-dynamic-data-list-detail.html was where I found it. Thanks! Please sign in to reply. Reply as... Cancel Stijn Haus Ben Chapman 11 Years Ago Hi Ben,I actually made 2 posts:http://webapplicationdeveloper.blogspot.be/2012/10/liferay-dynamic-data-list-detail.html for going to a detail pageand http://webapplicationdeveloper.blogspot.be/2012/10/liferay-dynamic-data-lists-record.html to dosplay the actions on a record. Please sign in to reply. Reply as... Cancel
Ben Chapman Stijn Haus 11 Years Ago Stijn,Thanks for posting this. It was very useful - but it looks like the URL to your post may have changed: http://webapplicationdeveloper.blogspot.be/2012/10/liferay-dynamic-data-list-detail.html was where I found it. Thanks! Please sign in to reply. Reply as... Cancel Stijn Haus Ben Chapman 11 Years Ago Hi Ben,I actually made 2 posts:http://webapplicationdeveloper.blogspot.be/2012/10/liferay-dynamic-data-list-detail.html for going to a detail pageand http://webapplicationdeveloper.blogspot.be/2012/10/liferay-dynamic-data-lists-record.html to dosplay the actions on a record. Please sign in to reply. Reply as... Cancel
Stijn Haus Ben Chapman 11 Years Ago Hi Ben,I actually made 2 posts:http://webapplicationdeveloper.blogspot.be/2012/10/liferay-dynamic-data-list-detail.html for going to a detail pageand http://webapplicationdeveloper.blogspot.be/2012/10/liferay-dynamic-data-lists-record.html to dosplay the actions on a record. Please sign in to reply. Reply as... Cancel
Paulo Fernandes 10 Years Ago Hi MarcellusIn the following line:#set ($recordSetId = $getterUtil.getInteger($reserved_record_set_id.data, 0))I removed the ".data" to work in Liferay 6.2.10 EENice article! Please sign in to reply. Reply as... Cancel
n h 10 Years Ago is it possible to filter records (using DDLRecordLocalService.getRecords or something) ? Please sign in to reply. Reply as... Cancel
Ivan Josa 10 Years Ago Hi Marcelus!Nice explanation It is possible to get the portlet id where the dynamic list is shown with velocity?Many thanks for your work and explanations! Please sign in to reply. Reply as... Cancel
Tuan vu manh 9 Years Ago why ? using code in vesion 6.2 CE not working.help me Please sign in to reply. Reply as... Cancel Cyber Katze Tuan vu manh 8 Years Ago On LR6.2GA4#set ($DDLRecordLocalService = $serviceLocator.findService("com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService"))#set ($recordSetId = $getterUtil.getLong($reserved_record_set_id)) #set ($records = ${DDLRecordLocalService.getRecords($recordSetId)}) #if (!$records.isEmpty()) #foreach ($cur_record in $records) $cur_record.getFieldValue("myFieldValue", $locale) #end#end Please sign in to reply. Reply as... Cancel
Cyber Katze Tuan vu manh 8 Years Ago On LR6.2GA4#set ($DDLRecordLocalService = $serviceLocator.findService("com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService"))#set ($recordSetId = $getterUtil.getLong($reserved_record_set_id)) #set ($records = ${DDLRecordLocalService.getRecords($recordSetId)}) #if (!$records.isEmpty()) #foreach ($cur_record in $records) $cur_record.getFieldValue("myFieldValue", $locale) #end#end Please sign in to reply. Reply as... Cancel