Hello List, I've got now a strange behaviour, which I can't explain myself, but which look like it is related to this thread.
I'm using xmlform and generated some dom data to feed the form with database values. Tthe dom is created correctly, but I'm having problems referencing it or at least a strange behaviour. I'll tried this one here to output the dom: ----- code ------------------------- <items> <xf:repeat nodeset="/transaction/item"> <item type="entry"> <no><xf:output ref="@number" /></no> <desc><xf:output ref="descr" /></desc> <unit_price><xf:output ref="price" /></unit_price> <qty><xf:output ref="qty" /></qty> <extamt><xf:output ref="extamt" /></extamt> </item> </xf:repeat> </items> ----- /code ------------------------ but only get this: <xf:repeat nodeset="/transaction/item"> <xf:group ref="/transaction/item[1]"/> <xf:group ref="/transaction/item[2]"/> <xf:group ref="/transaction/item[3]"/> <xf:group ref="/transaction/item[4]"/> <xf:group ref="/transaction/item[5]"/> <xf:group ref="/transaction/item[6]"/> <xf:group ref="/transaction/item[7]"/> <xf:group ref="/transaction/item[8]"/> </xf:repeat> BUT, if I'm using this: ----- code ------------------------- <xf:selectOne ref="/users" selectUIType="radioTable"> </xf:selectOne> <items> <xf:repeat nodeset="/transaction/item"> <item type="entry"> <no><xf:output ref="@number" /></no> <desc><xf:output ref="descr" /></desc> <unit_price><xf:output ref="price" /></unit_price> <qty><xf:output ref="qty" /></qty> <extamt><xf:output ref="extamt" /></extamt> </item> </xf:repeat> </items> ----- /code ------------------------ the output is filled completely... I didn't noticed it before because I was using the selectOne statement for debugging reasons, but now I don't want it anymore. (users and transaction are different dom nodes) Has anyone an idea why this is behaving like this? ciao Lars > -----Ursprüngliche Nachricht----- > Von: Kirchhoff, Lars > Gesendet: Montag, 9. Dezember 2002 10:41 > An: '[EMAIL PROTECTED]' > Betreff: AW: XMLForm and DOM node initialization > > > Hello Sylvian, > > ---- I'm sorry for the last mail, was send to early... > outlook is driving > me crazy.. ---- > > try the following: > > <xf:selectOne ref="/workstationType"> > <xf:caption>Workstation Type</xf:caption> > <xf:itemset nodeset="/select/typeOfWorkstation/item"> > <xf:caption ref="description"/> > <xf:value ref="@id"/> > </xf:itemset> > <xf:violations class="error"/> > </xf:selectOne> > > if your dom is still loaded into selected and is looking like this: > > <document> > <typeOfWorkstation> > <item id="desktop"> > <description>Desktop</description> > </item> > <item id="laptop"> > <description>Laptop</description> > </item> > <item id="other"> > <description>Other configuration</description> > </item> > </typeOfWorkstation> > </document> > > ciao Lars > > > -----Ursprüngliche Nachricht----- > > Von: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]] > > Gesendet: Samstag, 7. Dezember 2002 00:53 > > An: [EMAIL PROTECTED] > > Betreff: XMLForm and DOM node initialization > > > > > > Hello everybody, > > > > I'm using XMLForm and its possibility to access to DOM nodes. > > > > Here is the code in the view (form.xml): > > > > <xf:selectOne ref="/workstationType"> > > <xf:caption>Workstation Type</xf:caption> > > <xf:itemset nodeset="listValues/document/typeOfWorkstation/item"> > > <xf:caption ref="description"/> > > <xf:value ref="@id"/> > > </xf:itemset> > > <xf:violations class="error"/> > > </xf:selectOne> > > > > The problem is when I load the web app page (containing the > > node field) for the first time (after a Tomcat or Browser > > restart), the "value" and "caption" fields are empty although > > the number of <option> are right. > > > > Here is the HTML source when the fields are empty (first load): > > <td align="left"><select name="/workstationType"><option > > value=""></option><option value=""></option><option > > value=""></option></select></td> > > > > Here is the HTML source when the fields are OK (not first load): > > <td align="left"><select name="/workstationType"><option > > value="desktop">Desktop</option><option > > value="laptop">Laptop</option><option value="other">Other > > configuration</option></select></td> > > > > The node is initialized in the Bean (model) conctructor. > > > > > > Is anybody could help me to understand what's happen?!? > > I'm really desparate because I really don't know what could > > be the problem! > > > > When a web page is loaded, which methods or actions are called? > > > > > > Any suggestions will be greatly appreciated. > > Thank you > > Sylvain > > > > > --------------------------------------------------------------------- > > Please check that your question has not already been > answered in the > > FAQ before posting. > <http://xml.apache.org/cocoon/faq/index.html> > > > > To unsubscribe, e-mail: > <[EMAIL PROTECTED]> > > For additional commands, e-mail: > <[EMAIL PROTECTED]> > > > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>