Here's a way you can build a dynamic form http://labs.flexcoders.nl/?p=27
--- In flexcoders@yahoogroups.com, "Igor Costa" <[EMAIL PROTECTED]> wrote: > > You really have to test the DaoFlex or the Flex Coldfusion Integration kit. > > Regards. > > On 10/26/06, javaflash1 <[EMAIL PROTECTED]> wrote: > > > > My company has a database-driven system of web forms, each of which > > consists of many questions in various layouts (2-column radio, 1 > > column checkbox, etc). The forms are never hard-coded. Each HTTP > > request causes Java code to perform DB queries to dynamically > > generate the various questions and answers. Those questions are then > > rendered through JSP and Struts tiles into HTML. > > > > The HTML also contains JavaScript functions to hide/show conditional > > questions on the web page based on answers to earlier questions. > > > > Now we're trying to figure out the best way to adapt this system to > > use a Flash front-end instead of HTML/JavaScript. > > > > My preliminary research suggests at least two possible approaches: > > > > 1. A pre-compiled SWF could send a request with certain parameters, > > and the server could respond with an XML description of the form to > > build. Then the SWF could parse that XML and dynamically generate > > the form using attachMovie for each form element (with a lot of math > > to determine relative positions of elements with variable sizes, > > like text labels). > > > > 2. Flex might reduce the code for placing elements, by using MXML to > > describe the form structure as well as visual arrangement. I haven't > > used this yet, and I'm wary of Flex 2 simply because it requires > > Flash Player 9 which is only at 50% browser penetration > > (http://blog.flashforwardconference.com/2006/09/12/adobe-keynote- > > some-highlights/) but I might try an earlier version of Flex if it > > helps. > > > > Does anyone have a suggestion about the best approach to solving > > this problem? > > > > Thanks in advance for any advice. > > > > > > > > > > -- > ---------------------------- > Igor Costa > www.igorcosta.com >