At the beginning the function createBean() reads the XML document data.xml. The value of the bean element beannumber is 5. The bean is transfered to the widget by form.load(bean). At the HTML page, the widgets starts with the value of 5. So, I think the binding at the beginning is ok.
When I submit the HTML form without any change of the widget as a user, I think after a form.save(bean) the value of the bean element must still be 5. I am wondering how the value changes to null. Using JXPath is a good idea, but what kind of classes or methods do I have to use. Another point is, that the binding framework should provide the correct datatype. When I get the value of an XML node, for example 5, I don't know if 5 is a string, an integer, or a long. By using JavaBeans or JavaScript Beans, I get the right datatype, a conversion is not necessary. Can this achived for a XML bean, too? In my XML books I was told that besides an XML binding file a schema or a dtd is necessary to get the right datatype. But I don't know how a schema can be integrated into the cocoon binding framework. Kind regards Saskia -------- Original-Nachricht -------- Datum: Tue, 8 Aug 2006 11:19:09 -0700 Von: Mark Lundquist <[EMAIL PROTECTED]> An: [email protected] Betreff: Re: Access to XML bean elements in flowscript/javaflow > > On Aug 8, 2006, at 2:44 AM, Saskia Heesen wrote: > > > tmp.getNodeName() I get "beannumber". (that's correct) > > > > When I say > > > > tmp.getNodeValue I get "null". How can I receive the value of my bean? > > 2 thoughts: > > 1) I think JXPath is the easiest way to query a DOM tree; > > 2) Maybe the value really is null? > > I think I would fire up HTTPLiveHeaders in Mozilla to sniff the POST > request and just make sure the request parameter is really coming back, > if there was any chance of anything screwy happening on the client > side. Then I would turn on debugging in CForms and look for log > messages from the binding framework. > > —ml— > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
