Foros de discusión

RE: Dynamic Data List - entered data update

thumbnail
Cristiano Gusmeroli, modificado hace 9 años.

Dynamic Data List - entered data update

New Member Mensajes: 11 Fecha de incorporación: 19/01/15 Mensajes recientes
Hi,
I've created a Data Definition, then a Dynamic Data List based on that data definition.
I've put a "Dynamic Data List Form" in a page, and configured it in order to show the dynamic data list just defined.

I would like any site member to be able to input data, and modify them in the future.
I can input data once, or allow site members to input data more than once (configuring "Allow Multiple Submissions" in the portlet), but the form is always empty.
Is there a configuration that allows "Dynamic Data List Form" to show previously entered data?

I've seen that "Dynamic Data List"'s Permission have the Update column, but I don't understand what's its meaning.

I'm using Liferay Portal 6.2 CE GA3.


Thanks in advance for any help.

Regards,
Cristiano
Mark Fitzgerald, modificado hace 9 años.

RE: Dynamic Data List - entered data update

Regular Member Mensajes: 108 Fecha de incorporación: 15/10/10 Mensajes recientes
Are you looking to edit existing records, or just show a previously entered record when adding multiple records (kind of like getting a head start on the data entry)?
thumbnail
Cristiano Gusmeroli, modificado hace 9 años.

RE: Dynamic Data List - entered data update

New Member Mensajes: 11 Fecha de incorporación: 19/01/15 Mensajes recientes
Mark Fitzgerald:
Are you looking to edit existing records, or just show a previously entered record when adding multiple records (kind of like getting a head start on the data entry)?


Hi Mark, I'm looking to edit existing record.

Thanks,
Cristiano
Mark Fitzgerald, modificado hace 9 años.

RE: Dynamic Data List - entered data update

Regular Member Mensajes: 108 Fecha de incorporación: 15/10/10 Mensajes recientes
When using the default display template, do you see the 'Actions' button on the right side of the list, one for each record? If so, do you see an 'Edit' option when you click on it? When I follow those steps, I am able to edit existing records.
thumbnail
Cristiano Gusmeroli, modificado hace 9 años.

RE: Dynamic Data List - entered data update

New Member Mensajes: 11 Fecha de incorporación: 19/01/15 Mensajes recientes
Mark Fitzgerald:
When using the default display template, do you see the 'Actions' button on the right side of the list, one for each record? If so, do you see an 'Edit' option when you click on it? When I follow those steps, I am able to edit existing records.


Hi Mark, I'll try but the user experience won't be good.
I need to display a questionnaire and the user must be able to see previous answers and change them whenever he/she wants.

Thanks a lot for your support.

Regards,
Cristiano
Mark Fitzgerald, modificado hace 9 años.

RE: Dynamic Data List - entered data update

Regular Member Mensajes: 108 Fecha de incorporación: 15/10/10 Mensajes recientes
When I built the display template for the DDL that we are using, I built the hyperlink URL for each individual record so that clicking it would take the user to the edit screen for that record. I used the URL from the 'Edit' option in the 'Actions' button in the default listing view. Would this work for your case?
thumbnail
Cristiano Gusmeroli, modificado hace 9 años.

RE: Dynamic Data List - entered data update (Respuesta)

New Member Mensajes: 11 Fecha de incorporación: 19/01/15 Mensajes recientes
Mark Fitzgerald:
When I built the display template for the DDL that we are using, I built the hyperlink URL for each individual record so that clicking it would take the user to the edit screen for that record. I used the URL from the 'Edit' option in the 'Actions' button in the default listing view. Would this work for your case?


Hi Mark,
yes, this could be a valid option, thanks a lot for your support. emoticon

Meanwhile I've discovered that the real requirement for my client is to have a questionnaire associated to an organization, not to an individual. So each organization's member should be able to fill in and modify the same set of answers. We'll implement this feature from scratch, as far as I have understood DDLs can't be used in this case.

Thanks again for your help.

Best regards,
Cristiano
juan meza, modificado hace 8 años.

RE: Dynamic Data List - entered data update

Regular Member Mensajes: 228 Fecha de incorporación: 6/01/14 Mensajes recientes
Mark Fitzgerald:
When I built the display template for the DDL that we are using, I built the hyperlink URL for each individual record so that clicking it would take the user to the edit screen for that record. I used the URL from the 'Edit' option in the 'Actions' button in the default listing view. Would this work for your case?



Hi Mark...

Im trying to do exactly this... but im having issues... i want to create the "edit" option as the "actions" button does... but i dont know how to do this... i checked the dynamic list code, and it does a render URL... i dont think you did it this way... since it cant be done in velocity...

on the other hand, seeing the url the edit action creates, it has a lot of values that i dont know where to get them from... how did you do it? where did you get all of the parameters from?...

this is an example:
http://localhost:8080/group/secretary/tools?
p_p_id=169_INSTANCE_gG7q7sro24l6
&p_p_lifecycle=0
&p_p_state=maximized
&p_p_mode=view
&p_p_col_id=column-1
&p_p_col_count=1
&_169_INSTANCE_gG7q7sro24l6_recordId=38911
&_169_INSTANCE_gG7q7sro24l6_cmd=update
&_169_INSTANCE_gG7q7sro24l6_formDDMTemplateId=0
&_169_INSTANCE_gG7q7sro24l6_formDDMTemplateId=0
&_169_INSTANCE_gG7q7sro24l6_redirect=http%3A%2F%2Flocalhost%3A8080%2Fgroup%2Fsecretary%2Ftools%3Fp_p_id%3D169_INSTANCE_gG7q7sro24l6%26p_p_lifecycle%3D0%26p_p_state%3Dnormal%26p_p_mode%3Dview%26p_p_col_id%3Dcolumn-1%26p_p_col_count%3D1&_169_INSTANCE_gG7q7sro24l6_struts_action=%2Fdynamic_data_list_display%2Fedit_record&_169_INSTANCE_gG7q7sro24l6_spreadsheet=false&_169_INSTANCE_gG7q7sro24l6_displayDDMTemplateId=0&_169_INSTANCE_gG7q7sro24l6_editable=true


i know how to get most of them, but the redirect url for example, how do i create that? is there a way to get it in velocity? (its the current url in the render:url core)
the p_p_id, what is that?

i know this post is old, but maybe some one can help...

thank you!

EDIT

solved it... you just need to add all the parameters to the redirect page as well (not just take the current URL), here is an example:
<a href="tools?p_p_id=$themeDisplay.getPortletDisplay().getId()&amp;p_p_lifecycle=0&amp;p_p_state=maximized&amp;p_p_mode=view&amp;p_p_col_id=column-1&amp;p_p_col_count=1&amp;_$themeDisplay.getPortletDisplay().getId()_recordId=$cur_record.getRecordId()&amp;_$themeDisplay.getPortletDisplay().getId()_cmd=update&amp;_$themeDisplay.getPortletDisplay().getId()_formDDMTemplateId=0&amp;_$themeDisplay.getPortletDisplay().getId()_formDDMTemplateId=0&amp;_$themeDisplay.getPortletDisplay().getId()_redirect=$httpUtil.encodeURL($themeDisplay.getURLCurrent() )%3Fp_p_id%3D$themeDisplay.getPortletDisplay().getId()%26p_p_lifecycle%3D0%26p_p_state%3Dnormal%26p_p_mode%3Dview%26p_p_col_id%3Dcolumn-1%26p_p_col_count%3D1&amp;_$themeDisplay.getPortletDisplay().getId()_struts_action=%2Fdynamic_data_list_display%2Fedit_record&amp;_$themeDisplay.getPortletDisplay().getId()_spreadsheet=false&amp;_$themeDisplay.getPortletDisplay().getId()_displayDDMTemplateId=0&amp;_$themeDisplay.getPortletDisplay().getId()_editable=true">Edit Record </a>