Re: the widget datatype question
It work,tks very much Johnson - Original Message - From: "Bruno Dumon" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, June 18, 2004 2:46 PM Subject: Re: the widget datatype question > On Fri, 2004-06-18 at 08:33, Johnson wrote: > > Hi > > > > I try to caculate the widget value in repeter to another widget,the code is > > > > > >test: > > > > > > > > > > > > amt: > > > > > > > > > > > repeater="daily1List" select="select"> > > > key="removeDaily1">removeDaily1: > > > > > >var dList = event.source.parent.lookupWidget("daily1List"); > >var testv=0; > > > >for (var i = 0; i < dList.size; i++) { > > var row = dList.getRow(i); > > num1 = row.lookupWidget("amt").value; > > testv = testv + num1; > > } > > > > var test = event.source.parent.lookupWidget("test"); > > test.setValue(testv); > > > > > > > > > > > > If I had two row,one amt is 1,one amt is 2,the test will be "12",why. > > Probably because Javascript doesn't know about bigdecimals. Depending on > your needs, you could change the datatype of the widget to float, double > or long. > > If you need the precission of bigdecimal numbers, you need to use the > methods of the BigDecimal class to do your calculations. See the javadoc > of that class. > > It would be something like > > var testv = new Packages.java.math.BigDecimal("0"); > testv = testv.add(num1); > > -- > Bruno Dumon http://outerthought.org/ > Outerthought - Open Source, Java & XML Competence Support Center > [EMAIL PROTECTED] [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CForms+Hibernate+Flow
Nick Van den Bleeken wrote: On saturday I will start writing a sample using Ant, XDoclet, CForms and Hibernate. Any suggestions on a good 'sample' where I can use basic saves/loads and some searches. The sample should contain some one-to-many and many-to-one relations, and maybe inheritance. Nick, I am currently developing a version of the "petstore" block using Hibernate, XDoclet and Spring. I didn't want to announce it yet, since it's quite preliminary and I don't have the necessary infrastructure (CVS etc.). If you're interested, I could send it to you for evaluation. Ugo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Howto suppress cinclude namespace
Joerg Heinicke wrote: On 17.06.2004 11:36, [EMAIL PROTECTED] wrote: Removing the surplus namespace afterwards is what I am doing right now. My idea was to avoid it by configuring CincludeTransformer instead of having an extra step for just only stripping namespace after transformation. Though it should be possible to filter out this particular namespace declaration it can lead to invalid XML, when you have additional elements in the cinclude namespace that are not handled by cincludetransformer. Additionally the namespace handling is a very dangerous field for such optimizations as it is highly processor and processor version dependent, so Cocoon has to take care for the weakest one. Joerg Hi Joerg, I try to understand the part of »invalid XML« but it seems to be a quite complicated matter. Could you please give me an example what you mean by »additional elements in the cinclude namespace«? Is it additional elements in my 'cincluded' content or something else? From the API documentation about CincludeTransformer, I knew that I can wrap cincluded content in a new element and even define the namespace of this wrapping element. I clearly understand that CincludeTransformer needs cindlude namespace in the _input_ to recognize the elements to be processed. But as CincludeTransformer during transformation completely replaces those elements with the cincluded content, I don't see any reason why cinclude namespace should be copied to the _output_. Thanks for your help -- Volkmar W. Pogatzki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cocoon and WAP problems
I get the error "invalid wml code" when i tested it in the wap emulator available at tagtag.com.On the mobile phone i get the error "Unable to fetch response". I get no error with the opera web browser though. This is actual flow: 1. login page is displayed for mail/login.wml. 2. After logging in the inbox is displayed. url :mail/mail/mail.wml 3. I click on some mail for it to be displayed.and the error: invalid wml page. this is the url corresponding to the mail display page. mail/mail/mail.wml?cmd=cat-message-by-id&id=3 The sitemap corresponding to the error page is : The mail-message2document.xsl starts like this: http://www.w3.org/1999/XSL/Transform"; xmlns:page="http://apache.org/cocoon/paginate/1.0"; xmlns:mail="http://apache.org/cocoon/mail/1.0"; exclude-result-prefixes="xsl page" > I tried to omit the xml declaration,but it doesnt work. plz help. Smith. Quoting [EMAIL PROTECTED]: > On 17.06.2004 06:22, Oro smith wrote: > > > There seems to be some problem when using cocoon webmail with wap. > After i login and the inbox is displayed, i try to click on the mail > link. > > However i get the message "invalid wml code". > > > > Does this have something to do with the cocoon sitemap and wap. If > anyone has encountered the same problem plz let me know. > > You provide only very few information. Where do you see this error? On a > > mobile phone? It might be caused by the XML declaration, try to remove > > it by the correct serializer setting using > yes. > > Joerg > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - Still single? Click here to find the perfect match. http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?141 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
xsp and producing File Not Found
Hi, with you can catch error, if it happens.. say map:read won't find a file and 404 is returned.. But I don't seem to find, how to throw 404 error from XSP? Why I want to do that? When I use xsp and esql to find file from database, putting error throwing to would make it easy and centralized way to handler errors.. (every error catched in ). Thanks, Joose -- "Always remember that you are unique, just like everyone else!" * http://iki.fi/joose/ * [EMAIL PROTECTED] * +358 44 561 0270 * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: the widget datatype question
another familiar question If I want to do the same sumary in the amt field I wrote var dList = event.source.parent.lookupWidget("daily1List"); var testv=new Packages.java.math.BigDecimal("0"); for (var i = 0; i < dList.size; i++) { var row = dList.getRow(i); var num1 = new Packages.java.math.BigDecimal(row.lookupWidget("amt").getValue()); testv = testv.add(num1); } var test = event.source.parent.lookupWidget("test"); test.setValue(testv); But the system say can't convert Null to object,why Best Regards Johnson - Original Message - From: "Bruno Dumon" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, June 18, 2004 2:46 PM Subject: Re: the widget datatype question > On Fri, 2004-06-18 at 08:33, Johnson wrote: > > Hi > > > > I try to caculate the widget value in repeter to another widget,the code is > > > > > >test: > > > > > > > > > > > > amt: > > > > > > > > > > > repeater="daily1List" select="select"> > > > key="removeDaily1">removeDaily1: > > > > > >var dList = event.source.parent.lookupWidget("daily1List"); > >var testv=0; > > > >for (var i = 0; i < dList.size; i++) { > > var row = dList.getRow(i); > > num1 = row.lookupWidget("amt").value; > > testv = testv + num1; > > } > > > > var test = event.source.parent.lookupWidget("test"); > > test.setValue(testv); > > > > > > > > > > > > If I had two row,one amt is 1,one amt is 2,the test will be "12",why. > > Probably because Javascript doesn't know about bigdecimals. Depending on > your needs, you could change the datatype of the widget to float, double > or long. > > If you need the precission of bigdecimal numbers, you need to use the > methods of the BigDecimal class to do your calculations. See the javadoc > of that class. > > It would be something like > > var testv = new Packages.java.math.BigDecimal("0"); > testv = testv.add(num1); > > -- > Bruno Dumon http://outerthought.org/ > Outerthought - Open Source, Java & XML Competence Support Center > [EMAIL PROTECTED] [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: xsp and producing File Not Found
Hi Joose, Have you tried "response.setStatus(404);"? John Joose Vettenranta wrote: Hi, with you can catch error, if it happens.. say map:read won't find a file and 404 is returned.. But I don't seem to find, how to throw 404 error from XSP? -- - Jentro Technologies GmbH John L. Webber, Software Development - Rosenheimer Str. 145e 81671 München Tel. +49 89 189 169 80 mailto:[EMAIL PROTECTED] Fax +49 89 189 169 99 http://www.jentro.com - NOTICE: The information contained in this e-mail is confidential or may otherwise be legally privileged. It is intended for the named recipient only. If you have received it in error, please notify us immediately by reply or by calling the telephone number above and delete this message and all its attachments without any use or further distribution of its contents. Please note that any unauthorised review, copying, disclosing or otherwise making use of the information is strictly prohibited. Thank you. - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CForms+Hibernate+Flow
Le 18 juin 04, à 09:07, Ugo Cei a écrit : ...I am currently developing a version of the "petstore" block using Hibernate, XDoclet and Spring Yummy...do you think you will eventually be able to contribute it to the project? I assume there's a licence problem with Hibernate though. -Bertrand - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Making forms and redirecting them
Hi, with the help of cocoon it is very simple and comfortable to create a form-handling web-publishing. Use cocoon-forms (cform). A description and a how-to you can find at (1) http://cocoon.apache.org/2.1/userdocs/forms/index.html (2) http://wiki.cocoondev.org/Wiki.jsp?page=CocoonForms I hope that helps you! Dirk [EMAIL PROTECTED] wrote: Hi, This is a newbie question. What I want to do is create a simple front-end with a few text entry fields in it and an OK button. When the button is pressed I want to embed the info in a url and send it to cocoon for processing. Now do I have to use something like Apache + PHP for it or is there a simpler way to handle it all inside cocoon? And if I do have to use Apache for it, how do I go about making it work together with cocoon? Regards, Irfan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: The url cannot be null
Check your spelling It should be Regards Scott Warren Ocom Software ... Exceeding Quality. web | ocom.com.au -Original Message- From: Fabio Duo [mailto:[EMAIL PROTECTED] Sent: Friday, 18 June 2004 1:05 AM To: [EMAIL PROTECTED] Subject: The url cannot be null Hello, I know that it is a newby question. But i didn't found a solution on the Internet. I want to establish a connection to a MySQL DB. But i recive the following Error in the Brower Window: The url cannot be null. I modyfied the DB example from the samples "shipped" with cocoon. I tried a couple of possibilities without a solution or a idea what the problem is. I use jetty to run cocoon. Please excuse my poor english and i hope somebody has a hint for me. Thank you Fabio Entry in web.xml(Newest Driver from the Mysql Homepage): org.gij.mm.mysql.Driver Enrty in cocoon.xconf in the datasources: jdbc:mysql://localhost/DA root alta Sitemap: http://apache.org/cocoon/sitemap/1.0";> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CForms+Hibernate+Flow
Il giorno 18/giu/04, alle 10:19, Bertrand Delacretaz ha scritto: Le 18 juin 04, à 09:07, Ugo Cei a écrit : ...I am currently developing a version of the "petstore" block using Hibernate, XDoclet and Spring Yummy...do you think you will eventually be able to contribute it to the project? I assume there's a licence problem with Hibernate though. There's the license problem you mentioned, but actually, using Spring, it is effectively possible to decouple the persistence layer form the layers above it (business logic, presentation) to the point of having *NO* code that directly depends on Hibernate. That is, you don't need to implement Hibernate interfaces or import Hibernate packages. At the moment, what I've done is structured as a Cocoon block, but there's a problem with user authentication. I've opted to use container-based authentication with Jetty's JDBC user realm, using the Cocoon-provided HSQL database. Unfortunately, Jetty wants to access the database upon startup, but HSQL does not start until Cocoon is started, so we have a little chicken&egg problem. If we solve this problem, we can distribute the sample as a block. Or we could do a full web application that includes the necessary Cocoon infrastructure but otherwise stands alone. In any case, I was thinking about hosting it on cocoondev.org. This would give us the possibility to include Hibernate and not force users to download it separately. It would also avoid adding "Yet Another Petstore" to Cocoon, further bloating the download. I'd also like to avoid having yet another demo that we don't know how long it will be maintained and kept up to date. Ugo -- Ugo Cei - http://beblogging.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
using config file in flow
Simple question, but can't find the answer anywhere. I want to load an XML config file into memory, and then access its element and attribute values from flowscript using XPath. It will be a different file for each page request (these parameters will be used to help create the response). Essentially, I'd like to create something like this in the flowscript: function setParams(uri) { cocoon.context.setAttributes("params", -config file data here-); } Here's the config file (example): blue XL 5 I want to be able to access these parameters like this: setParams("params/default.xml"); color = cocoon.context.params.color; Is this possible and if so, how? Any help greatly appreciated. Chas. Munat Seattle - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: using config file in flow
Charles F. Munat wrote: Simple question, but can't find the answer anywhere. I want to load an XML config file into memory, and then access its element and attribute values from flowscript using XPath. It will be a different file for each page request (these parameters will be used to help create the response). Essentially, I'd like to create something like this in the flowscript: function setParams(uri) { cocoon.context.setAttributes("params", -config file data here-); } Here's the config file (example): blue XL 5 No time to give you a thorough answer, but what you can do is: (a) read your config file into a DOM document Can't tell you this off the top of my head (b) Create a JXPathContext, using your DOM document: var jx = Packages.org.apache.commons.jxpath.JXPathContext.newContext(myDomObject); jx.setLenient(true); (c) Use the JXPathContext to access your objects. var color = jx.getValue("/params/color"); It isn't that hard, but if you do a lot of it, you might like to wrap this in a small Java class so that you can: var jx = MyJXPathObject.getConfigFile("myconfigfile.xml"); var color = jx.getValue("/params/color"); Regards, Upayavira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: The url cannot be null
Thanks. I was too stupid, sorry about this question. Regards and Thanks -Original Message- From: Scott Warren [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Freitag, 18. Juni 2004 07:38 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: The url cannot be null Check your spelling It should be Regards Scott Warren Ocom Software ... Exceeding Quality. web | ocom.com.au -Original Message- From: Fabio Duo [mailto:[EMAIL PROTECTED] Sent: Friday, 18 June 2004 1:05 AM To: [EMAIL PROTECTED] Subject: The url cannot be null Hello, I know that it is a newby question. But i didn't found a solution on the Internet. I want to establish a connection to a MySQL DB. But i recive the following Error in the Brower Window: The url cannot be null. I modyfied the DB example from the samples "shipped" with cocoon. I tried a couple of possibilities without a solution or a idea what the problem is. I use jetty to run cocoon. Please excuse my poor english and i hope somebody has a hint for me. Thank you Fabio Entry in web.xml(Newest Driver from the Mysql Homepage): org.gij.mm.mysql.Driver Enrty in cocoon.xconf in the datasources: jdbc:mysql://localhost/DA root alta Sitemap: http://apache.org/cocoon/sitemap/1.0";> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: using config file in flow
Upayavira wrote: Charles F. Munat wrote: Simple question, but can't find the answer anywhere. I want to load an XML config file into memory, and then access its element and attribute values from flowscript using XPath. It will be a different file for each page request (these parameters will be used to help create the response). Essentially, I'd like to create something like this in the flowscript: function setParams(uri) { cocoon.context.setAttributes("params", -config file data here-); } Here's the config file (example): blue XL 5 No time to give you a thorough answer, but what you can do is: (a) read your config file into a DOM document Can't tell you this off the top of my head function loadDocument(uri) { var parser = null; var source = null; var resolver = null; try { parser = cocoon.getComponent(Packages.org.apache.excalibur.xml.dom.DOMParser.ROLE); resolver = cocoon.getComponent(Packages.org.apache.cocoon.environment.SourceResolver.ROLE); source = resolver.resolveURI(uri); var is = new Packages.org.xml.sax.InputSource(source.getInputStream()); is.setSystemId(source.getURI()); return parser.parseDocument(is); } finally { if (source != null) resolver.release(source); cocoon.releaseComponent(parser); cocoon.releaseComponent(resolver); } } (b) Create a JXPathContext, using your DOM document: var jx = Packages.org.apache.commons.jxpath.JXPathContext.newContext(myDomObject); jx.setLenient(true); (c) Use the JXPathContext to access your objects. var color = jx.getValue("/params/color"); It isn't that hard, but if you do a lot of it, you might like to wrap this in a small Java class so that you can: var jx = MyJXPathObject.getConfigFile("myconfigfile.xml"); var color = jx.getValue("/params/color"); Regards, Upayavira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [flowscript] importclass ?
Hi, FWIW: the .continue comes from the form you display (probably your login screen). If the code doesn't go beyond that, there might be an error in your form that prevents it from quitting. What you could try is bypass the form and set the user in the flowscript, then testing if you can display it in your confirm.jx. e.g. cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/Form.js"); function doLogin () { //var form = new Form("forms/login.xml"); //form.showForm("login-display-pipeline"); //var model = form.getModel(); var newUser = new Packages.com.myCompany.myProject.User(); newUser.setName("testname"); newUser.setPassword("testPassword"); var viewData = {user: newUser}; cocoon.sendPage("confirm.jx", viewData); // note, use 'user' in your JXtemplate } If this works, add the form and check again. HTH. Bye, Helma > -Original Message- > From: Stephane Delort [mailto:[EMAIL PROTECTED] > Sent: Friday, 18 June 2004 12:52 > To: [EMAIL PROTECTED] > Subject: [flowscript] importclass ? > > > > Hi, > > I don't think it is that simple ... > > I made tests whit and without "Packages" but it's NOT Ok. > If the .class is missing cocoon throws me an error requiring > it. And if the .class is in the correct place cocoon displays > me a http:myport//myadress/65465465465654654654654.continue > (I mean a high number .continue) > > At the bottom of this doc : > http://cocoon.apache.org/2.1/userdocs/flow/java.html it is > about the cocoon.xconf file. I guess that this is only for > automated compilation > > If anyone as a good practice with Rhino and java classes, I > would be glad to see a snippet. (with the java class path) > > > Thanks in advance > Stephane > > > >Hello Stephane, > >it is very simple! You only have to write: > >... > > importClass(Packages.com.xyz.MyClass); > >... > >In your code the string "Packages." is missing! > >see also at http://cocoon.apache.org/2.1/userdocs/flow/java.html > >I hope that helps! > >Dirk > > >Stephane Delort wrote: > >> Hi, > >> > >> I made a simple flowscript which would call a home made java class. > >> > >> Here is the flowsctipt : > >> > >> > cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/Form. > >> js"); > >> > >> > >> function main() > >> { > >> importClass(com.myCompany.myProject.User); > >> importPackage(java.util); > >> > >> var form = new Form("forms/login.xml"); > >> form.showForm("login-display-pipeline"); > >> var model = form.getModel(); > >> > >> var newUser = new com.myCompany.myProject User(); > >> var list = new ArrayList(); > >> //var insert = newUser.coucou(); //model.name, > model.password); > >> cocoon.sendPage("confirm.jx"); > >> } > >> > >> the .class is in the > >> [$cocoon]/build/webapp/WEB-INF/classes/com/mCompany/myProject > >> > >> Here is the JAVA code : > >> > >> import java.lang.*; > >> import java.util.*; > >> import java.sql.*; > >> > >> public class Userpublic class User > >> { > >> public int > >> toto = 5; > >> > >> User() > >> {,} > >> > >> public int addUser(String name, String surname ) > >> { > >>// should not be empty once the flowscript works > >> } > >> > >> } > >> > >> THe strange thing is that it is ok for the java.util > package and the > >> ArrayList class but the program STOPs (I mean it display a > >> http://anypath/[numbers]*.continue instead of the > JXtemplate page). I > >> also tried importClass(Packages.com.myCompany.myProject.User) and > >> importPackage(Packages.com.myCompany.myProject) unsuccessfully. > >> > >> Any help will be greatly apreciated as I don't find > anything on the > >> Mozilla-Rhino API. > >> > >> Thanks in advance, > >> Stephane > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[flowscript] importclass ?
Hi Helma, I tried to comment the form but it does not work. The only wayto make things working "correctly" is to comment the line var newUser = new Packages.com.myCompany.myProject.User(); and the ones which refer to the newUser objects. Does my class needs to extend, implement special classes or throw some exceptions... regards, Stephane --- FWIW: the .continue comes from the form you display (probably your login screen). If the code doesn't go beyond that, there might be an error in your form that prevents it from quitting. What you could try is bypass the form and set the user in the flowscript, then testing if you can display it in your confirm.jx. e.g. cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/Form.js"); function doLogin () { //var form = new Form("forms/login.xml"); //form.showForm("login-display-pipeline"); //var model = form.getModel(); var newUser = new Packages.com.myCompany.myProject.User(); newUser.setName("testname"); newUser.setPassword("testPassword"); var viewData = {user: newUser}; cocoon.sendPage("confirm.jx", viewData); // note, use 'user' in your JXtemplate } If this works, add the form and check again. HTH. Bye, Helma - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [flowscript] importclass ?
Not really. I use home-made classes myself and that works ok. What exactly does not work if you use my sample script? Bye, Helma > -Original Message- > From: Stephane Delort [mailto:[EMAIL PROTECTED] > Sent: Friday, 18 June 2004 13:21 > To: [EMAIL PROTECTED] > Subject: [flowscript] importclass ? > > > Hi Helma, > > > I tried to comment the form but it does not work. > > The only wayto make things working "correctly" is to comment the line > > var newUser = new Packages.com.myCompany.myProject.User(); > and the ones which refer to the newUser objects. > > > Does my class needs to extend, implement special classes or > throw some exceptions... > > > regards, > Stephane > > > > -- > - > FWIW: > > the .continue comes from the form you display > (probably your login screen). If the code doesn't go beyond > that, there might be an error in your form that prevents it > from quitting. > > What you could try is bypass the form and set the user in the > flowscript, then testing if you can display it in your confirm.jx. > > e.g. > > cocoon.load("resource://org/apache/cocoon/forms/flow/javascrip > t/Form.js"); > function doLogin () > { > //var form = new Form("forms/login.xml"); > //form.showForm("login-display-pipeline"); > //var model = form.getModel(); > > var newUser = new Packages.com.myCompany.myProject.User(); > newUser.setName("testname"); > newUser.setPassword("testPassword"); > > var viewData = {user: newUser}; > cocoon.sendPage("confirm.jx", viewData); // note, use > 'user' in your JXtemplate } > > If this works, add the form and check again. > > HTH. > > Bye, Helma > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[flowscript] importclass ?
Helma, If I use your sample script I only have a white page with no code. Also, I must say that I adapted your sample to my app : cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/Form.js"); importPackage(Packages.toto.titi); function main() { //var form = new Form("forms/login.xml"); //form.showForm("login-display-pipeline"); //var model = form.getModel(); //db_registration(model); var newUser = new User(); // also tried new Packages.toto.titi.User() and Packages.User() with the same results cocoon.sendPage("confirm.jx"); } Stephane - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error in offline site generation
Thanks a lot for your help. I was able to resolve that problem and it runs without any error messages. However, I now have another problem. I am trying to explicitly generate an html file from an xml one, but it's creating the file as a directory with nothing in it : -bash-2.05b$ ls -l ts/dest total 4 drwxr-xr-x2 femibyte femibyte 4096 Jun 18 04:39 languages.html/ -bash-2.05b$ ls -l ts/dest/languages.html/ total 0 Here's what my cli.xconf file looks like: . build/webapp/WEB-INF/cocoon.xconf ts/work ts/dest ... Here's the matcher in the sitemap : ... The weird thing is that the file is created properly when I use cocoon in a servlet container. Can anyone help me out here? Thanks, Femi From: Joerg Heinicke <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Error in offline site generation Date: Mon, 07 Jun 2004 09:37:38 +0200 On 07.06.2004 06:01, Riddim Dread wrote: I get the following error when I try to run cocoon to generate a file in offline mode : X [0] techsite/documents/tech/languages.xml BROKEN: Type 'file' is not defined for 'generate' at file:/home/femibyte/downloads/cocoon-2.1.2/techsite/sitemap.xmap:38:64 Total time: 0 minutes 4 seconds Can anyone provide me w/ an explanation as to what is going on? This means you have a in your sitemap, but nowhere defined what that generator is. If you don't use a subsitemap of the root sitemap delivered with Cocoon, you have to add a map:components section to your sitemap, where the file generator is defined: The same must be added for the other components you use. Just have a look into the map:components section of Cocoon's default root sitemap. Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Get fast, reliable Internet access with MSN 9 Dial-up now 3 months FREE! http://join.msn.click-url.com/go/onm00200361ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [flowscript] importclass ?
Note that you haven't added the user to the page (the viewdata construction) in your script, so there is nothing to be displayed from the newUser object. I suppose main() works, although I would avoid using 'main' as name to avoid conflicts with assumptions elsewhere. Bye, Helma > -Original Message- > From: Stephane Delort [mailto:[EMAIL PROTECTED] > Sent: Friday, 18 June 2004 14:09 > To: [EMAIL PROTECTED] > Subject: [flowscript] importclass ? > > > Helma, > > > If I use your sample script I only have a white page with no > code. Also, I must say that I adapted your sample to my app : > > > > cocoon.load("resource://org/apache/cocoon/forms/flow/javascrip > t/Form.js"); > > importPackage(Packages.toto.titi); > function main() > { > //var form = new Form("forms/login.xml"); > //form.showForm("login-display-pipeline"); > //var model = form.getModel(); > //db_registration(model); > > var newUser = new User(); > // also tried new Packages.toto.titi.User() and > Packages.User() with the same results > > cocoon.sendPage("confirm.jx"); > } > > Stephane > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
merging to webapps
Hello, I currently have to webapps running which are exactly the same. I've put them in to different folders in the webapp folder of Tomcat. Now I experienced some severe performance losses when running a third or fourth application which are again only copies of the first one. I did this because the sitemap is selecting the content (the xml-files) depending on the folder the application is put into. So if the folder is calles app1, the content is taken form "../webdav/app1/content". I receive the value for "app1" with the variable {request:contextPath}. No I'd like to merge the webapps - but it should still be possible to enter "http://localhost/app1"; and get the rendered content from the webdav/app1 folder. Also the authentication data is stored there and should be independent. Any suggestions? Thanks, Jasper Michalczik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: CForms+Hibernate+Flow
Bravo! Here are two cases that seems to come up frequently: 1. One-row-at-a-time CRUD. - A display page that lists the contents of a table, demonstrates paging logic (prev/next page + page counter), provides a link for each row to an update/delete page for that sepcific row, and includes a link to an insert page for one new row. - An update/delete page for one row. - An insert page for a new row. 2. Multiple-row CRUD. - Table-based page that allows in place insert/update/delete and includes paging logic. I'd be happy to collaborate or act as a tester if you could use some help. Regards, joel Joel McConaughy Managing Partner Displayware LLC 800 Fifth Ave., #101-316 Seattle, WA 98104-3191 206-300-4732 Direct 206-382-2188 Fax [EMAIL PROTECTED] -Original Message- From: Nick Van den Bleeken [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 1:02 PM To: [EMAIL PROTECTED] Subject: Re: CForms+Hibernate+Flow Derek and other intersested, On saturday I will start writing a sample using Ant, XDoclet, CForms and Hibernate. Any suggestions on a good 'sample' where I can use basic saves/loads and some searches. The sample should contain some one-to-many and many-to-one relations, and maybe inheritance. Nick. - Original Message - From: "Derek Hohls" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, June 17, 2004 8:40 AM Subject: Re: CForms+Hibernate+Flow > Nick > > Whoops - missed this one; please see my other post on "flowscript and > database actions". > > It would be great to add have a fully-fledged sample that uses Ant and > XDoclet as well! The only problem is that the existing sample on the > Wiki is too crude and simplistic to be of great use to those trying to > understand everything. Ideally we need something that demos the full > CRUD cycle; for both a simple, stand-alone table and also a more > complex many-to-many use case. > > As always, some careful commentary will add lots of value, but if this > is on the Wiki, it will be easy to do "on the fly". > > Thanks > Derek > > >>> [EMAIL PROTECTED] 2004/06/16 10:08:31 PM >>> > Derek, > > I'm currently developing a web application that needs persistence. I'm > using hibernate as my persistence framework. And use ant and xdoclet > to generate > my hibernate-mapping files and my hibernate configuration file. If you > and/or other cocoon users are interested, I can transform your sample > from > the wiki in a 'cocoon like block' with an ant build file that uses > xdoclet > to generate the hibernate files and has a target to deploy it in > running > cocoon. > > Please let me know if you (or others) are interested. > > Nick > > - Original Message - > From: "Derek Hohls" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, June 14, 2004 8:17 PM > Subject: Re: CForms+Hibernate+Flow > > > > Antonio > > > > I *assume* those comments were meant as a joke > > even though the traditional "smilie" was missing?! > > > > Derek > > > > PS If they weren't, then you need to read the message > > again - the point of the post was to try and get help > > on the use of Hibernate, not start any kind of heated debate on the > > pros and cons of various approaches! > > > > >>> [EMAIL PROTECTED] 06/14/04 7:48 PM >>> > > Derek Hohls dijo: > > > I know that there are other approaches to getting data from CForms > > > persisted into a database (e.g. OJB) but it seems to me that > > > getting Cocoon to "play nicely" with the really clean > > > implementation offered by Hibernate is a key aspect in securing > > > Cocooon's use as a valid technology for serious web-application > > > development. > > > > Are you talking that Hibernate is better than OJB? And telling that > OJB > > is > > insecure? And that OJB is not for serious web-app development? > > > > My God! I cannot believe that! > > > > Best Regards, > > > > Antonio Gallardo > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > > This message has been scanned for viruses and > > dangerous content by MailScanner, and is > > believed to be clean. > > MailScanner thanks transtec Computers for their support. > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > MailScanner thanks transtec Computers for their support. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additiona
Re: Error in offline site generation
On Fri, 18 Jun 2004 08:30:41 -0400 "Riddim Dread" <[EMAIL PROTECTED]> wrote: > Thanks a lot for your help. I was able to resolve that > problem and it runs without any error messages. However, I > now have another problem. I am trying to explicitly > generate an html file from an xml one, but it's creating > the file as a directory with nothing in it : > > > > -bash-2.05b$ ls -l ts/dest > total 4 > drwxr-xr-x2 femibyte femibyte 4096 Jun 18 04:39 > languages.html/ > > -bash-2.05b$ ls -l ts/dest/languages.html/ > total 0 > > > Here's what my cli.xconf file looks like: > > . >build/webapp/WEB-INF/cocoon.xconf-file>ts/work >ts/dest > > ... > > src="languages.xml" dest="ts/dest/languages.html"/> > > Here's the matcher in the sitemap : > > > > src="techsite/documents/{3}/{4}.xml"/> orm src="techsite/stylesheets/techarea.xsl"> > > > > > ... > > > > > The weird thing is that the file is created properly when > I use cocoon in a servlet container. Can anyone help me > out here? > > Thanks, > Femi Hi, maybe you should use build/webapp if this is the directory where your webapp is located. the This is the what you do with a browser ( "techsite/documents/tech/languages.html" = src-prefix + src = sitemap-url ) It looks like you have a inside the element in your sitemap, you should remove it (the at the end of the pipeline is correct) I hope that helps, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
HTML Generator
I've been using the HTML Generator at the top of a pipeline to dynamically reprocess some HTML. It turns out that an interaction between JTidy and the DOM Streamer used in HTMLGenerator cause some problems. JTidy treats the content of a element as CDATA (it doesn't further parse the content) and DOMStreamer then escapes characters like '<', '&', etc. The typical comments around javascript e.g.