<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">We will face this issue in a current project as well.<div>We haven't start working on it, but my first approach will possibly look like this:</div><div><br></div><div>a) When there is no item in the list, render a custom "add new item" button. </div><div><br></div><div>Clicking the button triggers the following code:</div><div><br></div><div>b) Determine name of the new resource.</div><div>You can ask any Collector for a name that follows a certain pattern and does not exist in a specific folder</div><div>String createLink = OpenCms.getResourceManager().getContentCollector("allInFolder").getCreateLink(cmso, "allInFolder", "/.content/articles/n_%(number).html|v8article");</div><div><br></div><div>c) Create the resource programmatically</div><div> A good instruction how to do this can be found here:</div><div><a href="http://lists.opencms.org/pipermail/opencms-dev/2011q2/035914.html">http://lists.opencms.org/pipermail/opencms-dev/2011q2/035914.html</a></div><div><br></div><div>d) reload the list. The new item appears</div><div><br></div><div>e) After the list was reloaded, the User uses the ADE-edit-Button to edit the new item</div><div><br></div><div>It is not perfect, since it would be more convenient for the user to see the edit form instantly after clicking on "Add new Item".</div><div>But it may serve as a workaround.</div><div><br></div><div>Regards</div><div>Christoph</div><div><br></div><div><br><div><div>Am 20.09.2011 um 11:22 schrieb tobias karrer:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div lang="DE" link="blue" vlink="purple"><div class="WordSection1" style="page: WordSection1; "><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Any clues from Alkacon?<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><b><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">Von:</span></b><span style="font-size: 10pt; font-family: Tahoma, sans-serif; "><span class="Apple-converted-space"> </span><a href="mailto:opencms-dev-bounces@opencms.org" style="color: blue; text-decoration: underline; ">opencms-dev-bounces@opencms.org</a><span class="Apple-converted-space"> </span>[mailto:opencms-dev-bounces@opencms.org]<span class="Apple-converted-space"> </span><b>Im Auftrag von<span class="Apple-converted-space"> </span></b>yangguang<br><b>Gesendet:</b><span class="Apple-converted-space"> </span>Samstag, 17. September 2011 12:26<br><b>An:</b><span class="Apple-converted-space"> </span>opencms-dev<br><b>Betreff:</b><span class="Apple-converted-space"> </span>Re: [opencms-dev] adding items to a list<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p> </o:p></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">I need this answer, too.<o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; "><o:p> </o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; "><o:p> </o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">tobias karrer <tobias.karrer <at><span class="Apple-converted-space"> </span><a href="http://virtual-identity.com/" style="color: blue; text-decoration: underline; ">virtual-identity.com</a>> writes:<o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; "><o:p> </o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">> <o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">> <o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">> Hello everybody,<o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">>  <o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">> another question:<o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">>  <o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">> Adding new elements to a list by clicking „+“ works fine when there are items <o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">in the list.<o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">>  <o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">> But how to add new items when the list ist empty?<o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">>  <o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">> Best,<o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">> Tobias<o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">>  <o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">>  <o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">> <o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">> _____________________________________________________________________Vorstand: <o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">Ralf Heller, Udo Mobes <o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">>         Vorsitzende des Aufsichtsrates: Kirsten Heller <o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">>         Sitz der Gesellschaft: Gruenwaelderstrasse 10-14, D-79098 Freiburg <o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">>         Amtsgericht Freiburg HRB 6218<o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">>         Versand am 13.09.2011 17:27 von karrer tobias<o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">>         Validation-Code: 1717334457157<o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">> <o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">> <o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">> <o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">> <o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">> <o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">> _______________________________________________<o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">> This mail is sent to you from the opencms-dev mailing list<o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">> To change your list options, or to unsubscribe from the list, please visit<o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; ">><span class="Apple-converted-space"> </span><a href="http://lists.opencms.org/mailman/listinfo/opencms-dev" style="color: blue; text-decoration: underline; ">http://lists.opencms.org/mailman/listinfo/opencms-dev</a><o:p></o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; "><o:p> </o:p></span></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Arial, sans-serif; color: black; "><o:p> </o:p></span></div></div></div><p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 12pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p> </o:p></p></div><br>_______________________________________________<br>This mail is sent to you from the opencms-dev mailing list<br>To change your list options, or to unsubscribe from the list, please visit<br><a href="http://lists.opencms.org/mailman/listinfo/opencms-dev" style="color: blue; text-decoration: underline; ">http://lists.opencms.org/mailman/listinfo/opencms-dev</a></div></blockquote></div><br></div></body></html>