Hi hope that this can help you, but I don't have idea why the form disappear. I send you 4 files (sorry but the label are in italian) one is the definition form, one is the template form one is the binding with the xmldata and one is the xmldata.
Cheers ROb ----- Original Message ----- From: "Lincoln Mitchell" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, December 14, 2004 10:06 AM Subject: Cocoon Foms help needed!!! > I have been struggling with Cforms for over a week now. I have had some > success in modifying the xml binding sample to append data to an xml > document however: > > When to implement the form into my website I need to move all the related > files and that's when it breaks. > > The examples of CFORMS like > http://cocoon.apache.org/2.1/userdocs/forms/sample.html and in the blocks > provided a start but don't explain thoroughly what all the related files are > doing. > > There are soooo many files related to this sample which confuses the hell > out of me and I long for a barebones version that is not tied into all the > other cform examples. > > Any how my current problem is that moving the files (and I think I got them > all) causes the form to disappear - I just get an blank white page - however > the source is there. > > I will struggle on but if anyone has a barebones example of xml binding (1 > field will do) or an explanation as to why the form vanishes or even a more > detail explanation of what all the files do. > > This will be VERY much appreciated. > > > > > TIA > > Linc > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED]
<?xml version="1.0" encoding="ISO-8859-1"?> <fd:form xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"> <fd:widgets> <fd:field id="tab-state"> <fd:datatype base="string"/> </fd:field> <!-- Tab Generale __________________________________________________________________________ --> <!-- ID --> <fd:field id="idAnagrafica"> <fd:label>ID:</fd:label> <fd:datatype base="long"/> </fd:field> <!-- Prefisso --> <fd:field id="prefGenerale"> <fd:label>Prefisso:</fd:label> <fd:datatype base="string"/> <fd:selection-list src="xmldata/comuni/prefisso.xml"/> </fd:field> <!-- Ragione Sociale --> <fd:field id="ragSoc"> <fd:label>Ragione Sociale:</fd:label> <fd:datatype base="string"/> </fd:field> <!-- Indirizzo --> <fd:field id="indirizzo1"> <fd:label>Indirizzo:</fd:label> <fd:datatype base="string"/> </fd:field> <!-- Cap --> <fd:field id="cap"> <fd:label>CAP:</fd:label> <fd:datatype base="string"/> <fd:selection-list src="xmldata/comuni/cap.xml"/> </fd:field> <!-- Nazione --> <fd:field id="nazione"> <fd:label>Nazione:</fd:label> <fd:datatype base="string"/> <fd:selection-list src="xmldata/comuni/nazioni.xml"/> </fd:field> <!-- Lingua --> <fd:field id="lingua"> <fd:label>Lingua:</fd:label> <fd:datatype base="string"/> <fd:selection-list src="xmldata/comuni/lingue.xml"/> </fd:field> <!-- telefono --> <fd:field id="telefono"> <fd:label>Telefono:</fd:label> <fd:datatype base="string"/> </fd:field> <!-- Telefax --> <fd:field id="telefax"> <fd:label>Telefax:</fd:label> <fd:datatype base="string"/> </fd:field> <!-- email --> <fd:field id="email"> <fd:label>e-mail:</fd:label> <fd:datatype base="string"/> </fd:field> <!-- Pagina web --> <fd:field id="www"> <fd:label>webpage:</fd:label> <fd:datatype base="string"/> </fd:field> <!-- Fornitore --> <fd:booleanfield id="fornitore"> <fd:label>Fornitore:</fd:label> </fd:booleanfield> <!-- Creditore --> <fd:booleanfield id="creditore"> <fd:label>Creditore:</fd:label> </fd:booleanfield> <!-- Cliente --> <fd:booleanfield id="cliente"> <fd:label>Cliente:</fd:label> </fd:booleanfield> <!-- Debitore --> <fd:booleanfield id="debitore"> <fd:label>Debitore:</fd:label> </fd:booleanfield> <!-- Agente --> <fd:booleanfield id="agente"> <fd:label>Agente:</fd:label> </fd:booleanfield> <!-- FINE Tab Generale _____________________________________________________________________ --> <!-- Tab Contatti __________________________________________________________________________ --> <fd:repeater id="contatti"> <fd:widgets> <fd:output id="id"> <fd:datatype base="long"/> </fd:output> <!-- Prefisso Contatti --> <fd:field id="prefContatti"> <fd:label>Prefisso</fd:label> <fd:datatype base="string"/> <fd:selection-list src="xmldata/comuni/prefisso.xml"/> </fd:field> <!-- Nome Contatti --> <fd:field id="nomeContatti"> <fd:label>Nome</fd:label> <fd:datatype base="string"/> </fd:field> <!-- Funzione Contatti --> <fd:field id="funzioneContatti"> <fd:label>Funzione</fd:label> <fd:datatype base="string"/> <fd:selection-list src="xmldata/comuni/funzioni.xml"/> </fd:field> <!-- telefono Contatti --> <fd:field id="telefonoContatti"> <fd:label>Telefono</fd:label> <fd:datatype base="string"/> </fd:field> <!-- email Contatti --> <fd:field id="emailContatti"> <fd:label>e-mail</fd:label> <fd:datatype base="string"/> </fd:field> <fd:booleanfield id="select"> <fd:label>Seleziona</fd:label> </fd:booleanfield> </fd:widgets> </fd:repeater> <fd:repeater-action id="addcontactContatti" action-command="add-row" repeater="contatti"> <fd:label>Aggiungi</fd:label> </fd:repeater-action> <fd:repeater-action id="removeContatti" action-command="delete-rows" repeater="contatti" select="select"> <fd:label>Cancella</fd:label> </fd:repeater-action> <!-- FINE Tab Contatti __________________________________________________________________________ --> <!-- Tab Amministrazione __________________________________________________________________________ --> <!-- Valuta --> <fd:field id="valuta" required="true"> <fd:label>Valuta:</fd:label> <fd:datatype base="string"/> <fd:selection-list src="xmldata/comuni/valute.xml"/> </fd:field> <!-- Nr. IVA --> <fd:field id="nrIVA"> <fd:label>Nr IVA:</fd:label> <fd:datatype base="string"/> </fd:field> <!-- Mezzo usato per il pagamento --> <fd:field id="pagMezzo"> <fd:label>Pag. Mezzo:</fd:label> <fd:datatype base="string"/> <fd:selection-list src="xmldata/comuni/mezziPagamento.xml"/> </fd:field> <!-- Condizioni di pagamento --> <fd:field id="condizioniPag"> <fd:label>Condizioni Pagamento:</fd:label> <fd:datatype base="string"/> <fd:selection-list src="xmldata/comuni/condizioni.xml"/> </fd:field> <!-- Conto IVA Acquisti --> <fd:field id="ctoIvaAcquisti"> <fd:label>IVA Acquisti:</fd:label> <fd:datatype base="string"/> <fd:selection-list src="xmldata/comuni/pianoConti.xml"/> </fd:field> <!-- Conto IVA Vendite --> <fd:field id="ctoIvaVendite"> <fd:label>IVA Vendite:</fd:label> <fd:datatype base="string"/> <fd:selection-list src="xmldata/comuni/pianoConti.xml"/> </fd:field> <!-- Conto IVA Acquisti --> <fd:field id="ctoAcquisti"> <fd:label>Conto Acquisti:</fd:label> <fd:datatype base="string"/> <fd:selection-list src="xmldata/comuni/pianoConti.xml"/> </fd:field> <!-- Conto IVA Vendite --> <fd:field id="ctoVendite"> <fd:label>Conto Vendite:</fd:label> <fd:datatype base="string"/> <fd:selection-list src="xmldata/comuni/pianoConti.xml"/> </fd:field> <!-- FINE Tab Amministrazione __________________________________________________________________________ --> <fd:submit id="submit" action-command="switch" validate="false"/> </fd:widgets> </fd:form>
<?xml version="1.0" encoding="ISO-8859-1"?> <page xmlns:ft="http://apache.org/cocoon/forms/1.0#template" xmlns:fi="http://apache.org/cocoon/forms/1.0#instance"> <title/> <content> <h1>Anagrafica</h1> <ft:form-template action="#{$continuation/id}.continue" method="POST"> <fi:group> <fi:styling type="tabs"/> <fi:state> <ft:widget id="tab-state"/> </fi:state> <fi:items> <fi:group> <!--INIZIO primo Tab --> <fi:label>Generale</fi:label> <fi:styling layout="rows"/> <fi:items> <fi:group> <fi:styling layout="columns"/> <fi:items> <ft:widget id="idAnagrafica"> <fi:styling class="txtID"/> </ft:widget> <ft:widget id="prefGenerale"> <fi:styling class="cmb"/> </ft:widget> <ft:widget id="ragSoc"> <fi:styling class="txtTestoArea" type="textarea" rows="3"/> </ft:widget> <ft:widget id="indirizzo1"> <fi:styling class="txtTestoArea" type="textarea" rows="3"/> </ft:widget> <ft:widget id="cap"> <fi:styling class="cmb"/> </ft:widget> <ft:widget id="nazione"> <fi:styling class="cmb"/> </ft:widget> <ft:widget id="lingua"> <fi:styling class="cmb"/> </ft:widget> </fi:items> </fi:group> <fi:group> <fi:styling layout="columns"/> <fi:items> <ft:widget id="telefono"> <fi:styling class="txtTestoArea" type="textarea" rows="3"/> </ft:widget> <ft:widget id="telefax"> <fi:styling class="txtTestoArea" type="textarea" rows="3"/> </ft:widget> <ft:widget id="email"> <fi:styling class="txtTestoArea" type="textarea" rows="3"/> </ft:widget> <ft:widget id="www"> <fi:styling class="txtTestoArea" type="textarea" rows="3"/> </ft:widget> </fi:items> </fi:group> <fi:group> <fi:styling layout="row"/> <fi:items> <ft:widget id="fornitore"/> <ft:widget id="creditore"/> <ft:widget id="cliente"/> <ft:widget id="debitore"/> <ft:widget id="agente"/> </fi:items> </fi:group> </fi:items> </fi:group> <!--FINE primo Tab --> <fi:group> <!--INIZIO secondo Tab --> <fi:label>Contatti</fi:label> <fi:styling layout="columns"/> <fi:items> <ft:widget-label id="contatti"/> <ft:repeater-widget id="contatti"/> <table width="100%" border="0"> <tr> <th> <p class="label"> <ft:repeater-widget-label id="contatti" widget-id="prefContatti"/> </p> </th> <th> <p class="label"> <ft:repeater-widget-label id="contatti" widget-id="nomeContatti"/> </p> </th> <th> <p class="label"> <ft:repeater-widget-label id="contatti" widget-id="funzioneContatti"/> </p> </th> <th> <p class="label"> <ft:repeater-widget-label id="contatti" widget-id="telefonoContatti"/> </p> </th> <th> <p class="label"> <ft:repeater-widget-label id="contatti" widget-id="emailContatti"/> </p> </th> <th> <p class="label"> <ft:repeater-widget-label id="contatti" widget-id="select"/> </p> </th> </tr> <ft:repeater-widget id="contatti"> <tr> <td> <ft:widget id="prefContatti"> <fi:styling class="cmb"/> </ft:widget> </td> <td> <ft:widget id="nomeContatti"> <fi:styling class="txtTesto"/> </ft:widget> </td> <td> <ft:widget id="funzioneContatti"> <fi:styling class="cmb"/> </ft:widget> </td> <td> <ft:widget id="telefonoContatti"> <fi:styling class="txtTesto"/> </ft:widget> </td> <td> <ft:widget id="emailContatti"> <fi:styling class="txtTesto"/> </ft:widget> </td> <td> <ft:widget id="select"/> </td> </tr> </ft:repeater-widget> <tr> <table width="100%" border="0"> <tr> <td> <ft:widget id="addcontactContatti"/> <ft:widget id="removeContatti"/> </td> </tr> </table> </tr> </table> </fi:items> </fi:group> <!--FINE secondo Tab --> <fi:group> <!--INIZIO terzo Tab --> <fi:label>Amministrazione</fi:label> <fi:styling layout="rows"/> <fi:items> <fi:group> <fi:styling layout="columns"/> <fi:items> <ft:widget id="valuta"> <fi:styling class="cmb"/> </ft:widget> <ft:widget id="nrIVA"> <fi:styling class="txtTesto"/> </ft:widget> <ft:widget id="pagMezzo"> <fi:styling class="cmb"/> </ft:widget> <ft:widget id="condizioniPag"> <fi:styling class="cmb_1"/> </ft:widget> </fi:items> </fi:group> <fi:group> <fi:styling layout="columns"/> <fi:items> <ft:widget id="ctoIvaAcquisti"> <fi:styling class="cmb_1"/> </ft:widget> <ft:widget id="ctoIvaVendite"> <fi:styling class="cmb_1"/> </ft:widget> <ft:widget id="ctoAcquisti"> <fi:styling class="cmb_1"/> </ft:widget> <ft:widget id="ctoVendite"> <fi:styling class="cmb_1"/> </ft:widget> </fi:items> </fi:group> </fi:items> </fi:group> <!--FINE terzo Tab --> </fi:items> </fi:group> <br/> <input type="image" src="img/anagrafica/salva.jpg" value="Submit"/> </ft:form-template> </content> </page>
<?xml version="1.0" encoding="ISO-8859-1"?> <fb:context xmlns:fb="http://apache.org/cocoon/forms/1.0#binding" xmlns:fd="http://apache.org/cocoon/forms/1.0#definition" path="data/wrapper/context"> <fb:value id="idAnagrafica" path="idanagrafica"> <fd:convertor datatype="long"/> </fb:value> <fb:value id="prefGenerale" path="prefGenerale"/> <fb:value id="ragSoc" path="ragSoc"/> <fb:value id="indirizzo1" path="indirizzo1"/> <fb:value id="cap" path="cap"/> <fb:value id="nazione" path="nazione"/> <fb:value id="lingua" path="lingua"/> <fb:value id="telefono" path="telefono"/> <fb:value id="telefax" path="telefax"/> <fb:value id="email" path="e-mail"/> <fb:value id="www" path="www"/> <fb:value id="fornitore" path="fornitore"> <fd:convertor datatype="boolean"/> </fb:value> <fb:value id="creditore" path="creditore"> <fd:convertor datatype="boolean"/> </fb:value> <fb:value id="cliente" path="cliente"> <fd:convertor datatype="boolean"/> </fb:value> <fb:value id="debitore" path="debitore"> <fd:convertor datatype="boolean"/> </fb:value> <fb:value id="agente" path="agente"> <fd:convertor datatype="boolean"/> </fb:value> <fb:repeater id="contatti" parent-path="contatti" row-path="contact"> <fb:identity> <fb:value id="id" path="@id"> <fd:convertor datatype="long"/> </fb:value> </fb:identity> <fb:on-bind> <fb:value id="prefContatti" path="prefContatti"/> <fb:value id="nomeContatti" path="nomeContatti"/> <fb:value id="funzioneContatti" path="funzioneContatti"/> <fb:value id="telefonoContatti" path="telefonoContatti"/> <fb:value id="emailContatti" path="emailContatti"/> </fb:on-bind> <fb:on-insert-row> <fb:insert-node> <contact id="" row-state="new"> <prefContatti/> <nomeContatti/> <funzioneContatti/> <telefonoContatti/> <emailContatti/> </contact> </fb:insert-node> </fb:on-insert-row> <fb:on-delete-row> <!-- <fb:set-attribute name="row-state" value="deleted" /> --> <fb:delete-node/> </fb:on-delete-row> </fb:repeater> <fb:value id="valuta" path="valuta"/> <fb:value id="nrIVA" path="nrIVA"/> <fb:value id="pagMezzo" path="pagMezzo"/> <fb:value id="condizioniPag" path="pagCondizioni"/> <fb:value id="ctoIvaAcquisti" path="ctoIvaAcquisti"/> <fb:value id="ctoIvaVendite" path="ctoIvaVendite"/> <fb:value id="ctoAcquisti" path="ctoAcquisti"/> <fb:value id="ctoVendite" path="ctoVendite"/> </fb:context>
<?xml version="1.0" encoding="UTF-8"?> <data> <wrapper> <context> <idanagrafica>1</idanagrafica> <prefGenerale>7</prefGenerale> <ragSoc>PROVA SA</ragSoc> <indirizzo1>Via </indirizzo1> <cap>2</cap> <nazione>2</nazione> <lingua>2</lingua> <telefono>+41912466</telefono> <telefax>+41912456</telefax> <e-mail/> <www/> <fornitore>false</fornitore> <creditore>false</creditore> <cliente>true</cliente> <debitore>true</debitore> <agente>true</agente> <contatti> <contact id="" row-state="new"> <prefContatti>5</prefContatti> <nomeContatti>Pinco Pallo</nomeContatti> <funzioneContatti>1</funzioneContatti> <telefonoContatti>+7179/65654</telefonoContatti> </contact> <contact id="" row-state="new"> <prefContatti>5</prefContatti> <nomeContatti>Roberto</nomeContatti> <funzioneContatti>5</funzioneContatti> <telefonoContatti>6546546</telefonoContatti> </contact> </contatti> <valuta>2</valuta> <nrIVA>12.456</nrIVA> <pagMezzo>3</pagMezzo> <condizioniPag/> <ctoIvaAcquisti>8</ctoIvaAcquisti> <ctoIvaVendite>9</ctoIvaVendite> <ctoAcquisti>10</ctoAcquisti> <ctoVendite>8</ctoVendite> <pagCondizioni>4</pagCondizioni> </context> </wrapper> </data>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
