forms and database
Hi, trying to figure out, how things should be done with Cocoon. I like Cforms. I like modular database actions. Some old thread said, don't try to use them together. One even said, don't use mod-db action at all, it is deprecated. I have dynamic forms, forms with dynamic templates. They work fine. Then I have tables in my database. You get it? I want to use forms with possibility to validate the fields. CForms seems nice. But I also want to insert/update the form field values into database table. I want it to be possible also insert/update multiple values at a time into multible rows in a database table. I can do both, but not at a same time. How should I accomplish that with Cocoon (2.11)? - mika - - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
Forms and Database storage [was Re: woody and "big" radiobutton list]
Joose You are starting to venture in deeper waters here! Part 1: Forms fields This is not so hard, but quite fiddly Your form model will look like: Movie Theme And the form template (layout) will have (as Helma has said, you can also have "horizontal" orientation for shorter lists) In your sitemap you will need: The basic-sql.xml file looks like: http://apache.org/cocoon/forms/1.0#definition"; > http://apache.org/cocoon/SQL/2.0";> SELECT ThemeID, ThemeDesc FROM MovieTheme The widget-theme.xsl stylesheet I use is: http://www.w3.org/1999/XSL/Transform"; xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"; xmlns:sq2="http://apache.org/cocoon/SQL/2.0"; > Part 2: Saving to a database The move is away from ESQL and Modular DB actions to 3rd party database persistence layers.. this is an area new to me, too - a number of folk here are using Hibernate BUT there has been very little documentation produced (despite numerous pleas from me - see the mail archives!!). Start in the wiki with the various Hibernate samples; you can also see the one I did that attempts to make CForms work with Flow; its broken somewhere and so far no one has come forward to help (sorry!). This is a big learning curve, but will probably pay off in the longer term. HTH Derek >>> [EMAIL PROTECTED] 2004/07/16 03:09:42 PM >>> Hi Derek.. Seems like I little bit over simplified my need =) Anyway, concerning to this, my next question is: If I have data on SQL-server, how can I make it as a forms field as radiobutton list? Is it possible if: a) I don't know the result-set b) I know the result set but only part of it are shown? so-> viewing forms page, would work so, that options to radiolist would be fetched from database. Also.. How to save that damn data? If used from flowscript, do I just create some page which get's input from bizData and saves it to database using ESQL? I was thinking that perhaps it could be done with modular database actions (atleast it would look very nice to do it so). Thanks, Joose 16.7.2004 kello 14:40, Derek Hohls kirjoitti: Joose > > Any reason you cannot use Cocoon 2.1.5; the > CForms are a fairly stable and more evolved > verison of Woody - and certainly support radio > buttons! > > Derek > [EMAIL PROTECTED] 2004/07/16 01:37:49 PM >>> > Hi, > > seems like woody is nice, but I did not find a way to do radiobuton > list like this; > > > > > > Is this possible to implement? > > (cocoon 2.1.3) > > 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] > > > -- > 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] > > -- "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] -- 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]
Re: Forms and Database storage [was Re: woody and "big" radiobutton list]
Hi, Part 1: Forms fields Thanks derek for detailed sample. The thing I missed was that I can give cocoon: -style urls to selection-list. Part 2: Saving to a database The move is away from ESQL and Modular DB actions to 3rd party database persistence layers.. this is an I thought that modular db is better than using esql.. But I did not know any other way to do these things. area new to me, too - a number of folk here are using Hibernate BUT there has been very little documentation produced (despite numerous pleas from me - see the mail archives!!). Start in the wiki with the various Hibernate I did not find anything related to hibernate in cocoon 2.1.3, perhaps hibernate is still in expiremental feature? I have to check this Hibernate more closely, it would be very nice to have some documentation or even a page "What is hibernate and what is it for" would be nice :) Thank you very many, 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: Forms and Database storage [was Re: woody and "big" radiobutton list]
Joose Please search in the Cocoon Wiki for "Hibernate"; theres lots of stuff there to get started. Also check the Hibernate web page (remember I said its a 3rd part app); maybe you can also start a wiki page with the basics in it (for the next person!) http://www.hibernate.org/ Derek >>> [EMAIL PROTECTED] 2004/07/16 04:52:40 PM >>> Hi, > Part 1: Forms fields Thanks derek for detailed sample. The thing I missed was that I can give cocoon: -style urls to selection-list. > Part 2: Saving to a database > > The move is away from ESQL and Modular DB actions > to 3rd party database persistence layers.. this is an I thought that modular db is better than using esql.. But I did not know any other way to do these things. > area new to me, too - a number of folk here are using > Hibernate BUT there has been very little documentation > produced (despite numerous pleas from me - see the mail > archives!!). Start in the wiki with the various Hibernate I did not find anything related to hibernate in cocoon 2.1.3, perhaps hibernate is still in expiremental feature? I have to check this Hibernate more closely, it would be very nice to have some documentation or even a page "What is hibernate and what is it for" would be nice :) Thank you very many, 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] -- 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]
Re: Forms and Database storage [was Re: woody and "big" radiobutton list]
Joose Vettenranta wrote: I did not find anything related to hibernate in cocoon 2.1.3, perhaps hibernate is still in expiremental feature? First: there's a licensing problem so, unless the ASF decides that distributing (L)GPL code is OK, you won't find code that depends on Hibernate in the Cocoon repository for the foreseeable future. Second: even if it wasn't for the licensing problems, it's not that you can expect Cocoon to integrate every database access technology under the sun. Hibernate is just a Java library, so there's nothing stopping you from using it from whatever Cocoon component you like. However, it seems that someone has already done something for you. You can find a Cocoon application that uses Hibernate here: http://wiki.apache.org/cocoon/SpringPetstore And if you happen to dislike Hibernate and would prefer OJB instead, there's a OJB block in the latest Cocoon release (2.1.5). I think you have plenty of examples to look at. I have to check this Hibernate more closely, it would be very nice to have some documentation or even a page "What is hibernate and what is it for" would be nice :) Ever tried Google? http://hibernate.org Ugo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]