<html><body>
<p>Hello Mathias, hello Nacho,<br>
<br>
thank you for your contributions to finding a solution to my problem with the "Frontend User-Forms".<br>
Finally it works, when I integrate your advices.<br>
<br>
Thank you again,<br>
<br>
best regards<br>
<br>
<br>
Frank Pertack<br>
<br>
<br>
Vater Solution GmbH<br>
Liebigstraße 26<br>
24145 Kiel<br>
<br>
Telefon: +49 431 20084-210<br>
Telefax: +49 431 20084-222<br>
Mobil: +49 151 16353519<br>
mailto: fpertack@vater-gruppe.de<br>
<a href="http://www.vater-gruppe.de">http://www.vater-gruppe.de</a><br>
<br>
Amtsgericht Kiel, HRB 6403 <br>
Geschäftsführer:<br>
Klaus-Hinrich Vater<br>
Michael Wiese<br>
-----<br>
Diese Email enthält ggfs. vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese Email irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Email. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Email sind nicht gestattet.<br>
<br>
<br>
<img width="16" height="16" src="cid:1__=4EBBFF44DFE951328f9e8a93@vater-gruppe.de" border="0" alt="Inactive hide details for Nacho Fernández Orellana ---15.06.2009 13:53:25---Hi Frank and list, Your frontend-form built using c"><font color="#424282">Nacho Fernández Orellana ---15.06.2009 13:53:25---Hi Frank and list, Your frontend-form built using contentload and contentshow should build a</font><br>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=4EBBFF44DFE951328f9e8a93@vater-gruppe.de" border="0" alt=""><br>
<font size="2" color="#5F5F5F">Von:</font></td><td width="100%"><img width="1" height="1" src="cid:2__=4EBBFF44DFE951328f9e8a93@vater-gruppe.de" border="0" alt=""><br>
<font size="2">Nacho Fernández Orellana <nacho.fernandez.orellana@gmail.com></font></td></tr>
<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=4EBBFF44DFE951328f9e8a93@vater-gruppe.de" border="0" alt=""><br>
<font size="2" color="#5F5F5F">An:</font></td><td width="100%"><img width="1" height="1" src="cid:2__=4EBBFF44DFE951328f9e8a93@vater-gruppe.de" border="0" alt=""><br>
<font size="2">The OpenCms mailing list <opencms-dev@opencms.org></font></td></tr>
<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=4EBBFF44DFE951328f9e8a93@vater-gruppe.de" border="0" alt=""><br>
<font size="2" color="#5F5F5F">Datum:</font></td><td width="100%"><img width="1" height="1" src="cid:2__=4EBBFF44DFE951328f9e8a93@vater-gruppe.de" border="0" alt=""><br>
<font size="2">15.06.2009 13:53</font></td></tr>
<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=4EBBFF44DFE951328f9e8a93@vater-gruppe.de" border="0" alt=""><br>
<font size="2" color="#5F5F5F">Betreff:</font></td><td width="100%"><img width="1" height="1" src="cid:2__=4EBBFF44DFE951328f9e8a93@vater-gruppe.de" border="0" alt=""><br>
<font size="2">Re: [opencms-dev] How to write into Frontend User-Forms?</font></td></tr>
<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=4EBBFF44DFE951328f9e8a93@vater-gruppe.de" border="0" alt=""><br>
<font size="2" color="#5F5F5F">Gesendet von:</font></td><td width="100%"><img width="1" height="1" src="cid:2__=4EBBFF44DFE951328f9e8a93@vater-gruppe.de" border="0" alt=""><br>
<font size="2">opencms-dev-bounces@opencms.org</font></td></tr>
</table>
<hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br>
<br>
<br>
<font size="4">Hi Frank and list,<br>
<br>
Your frontend-form built using contentload and contentshow should build a html form whose data will be sent to a certain target page (of course this page can be the same jsp page that built the form). In any case, the destination jsp should get the sent parameters and then use them to build the xml of the phonebook entry.<br>
<br>
I recommend programming a simple java bean that has all the elements your phonebook entry has as fields and that provides a simple "toXml" method that builds the right xml of a phonebook entry according to your xsd. That way you could create a java method called something like "writePhonebookEntry" that does something like:<br>
<br>
PhonebookEntryBean bean = getBeanFromRequestParameters( request ); <-- method to write<br>
CmsFile file = cms.readFile( PATH_OF_XML_YOU_ARE_EDITING );<br>
file.setContents( YOUR_BEAN.toXml().getBytes() );<br>
cms.writeFile( file );<br>
<br>
Where "cms" is a CmsObject and you have to be in the offline project and lock the xml file accordingly.<br>
I've always found this to be the simpler way, other method is editing the xml contents for the modified fields in your form instead of rewriting the complete well-formed xml. If you need code snippets for that alternative approach, ask again. Hope this helps. Greetings,<br>
<br>
Nacho Fernandez.</font><tt><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>
</tt><tt><a href="http://lists.opencms.org/mailman/listinfo/opencms-dev">http://lists.opencms.org/mailman/listinfo/opencms-dev</a></tt><br>
</body></html>