I think you might want to step back and decide if you really want to use this approach. One of the biggest advantages of a RIA interface is to avoid the request/response style of building web applications. What you are looking to do here is a direct analog to that request/response "traditional" web style of development and is kind of a step back rather then forward.
Worse off, going to a controller servlet which dynamically builds MXML, compiles it, retuns the SWF embedded inside a dynamicaly built JSP etc is IMHO going to be a dog. I can tell you that in production we pre-compile all MXML into swf's. The JIT MXML compiler isnt exactly performant. Roll in that you have to build the MXML dynamically in a servlet, then render it inside a JSP, then have it comiled, downloaded, etc. For a bonus, every screen loaded also now required database I/O, which is always the slowest concern in a web application. Continue on with the fact you likely are much more dependant on an HTTP session object to maintain state, blah blah. I would seriously review your design and decide for yourself if you want to develop a RIA this way. -- Dave Wolf Cynergy Systems, Inc. Macromedia Flex Alliance Partner http://www.cynergysystems.com Email: [EMAIL PROTECTED] Office: 866-CYNERGY --- In [email protected], "varalakshmi_palani" <[EMAIL PROTECTED]> wrote: > > Hi All, > > I have a requirement to dynamically load mxml at runtime. > > We use a custom tool to generate MXML code for various screens. The > MXML sources thus generated are stored as an XML Objects in the > database associated with a screen ID. > > For. eg. > > Screen Code | MXML source stored as XML object > ----------------------------------------------------------- > S001 | (XML Object) MXML source code for Screen 1 > S002 | (XML Object) MXML source code for Screen 2 > > The screens will be accessed calling a common servlet and passing > the screen ID to it. > > The servlet is responsible for > a) fetching the XML object corresponding to the screen id from the > database > b) dispatching the request to a JSP with the XML String thus fetched. > > The called JSP should render the XML String using Flex Tag Libs as > shown below, > > <%@ taglib uri="FlexTagLib" prefix="mm" %> > <% > String mxmlString=request.getParameter("mxml"); > // "mxml" is the name of the attribute that holds the XML String > %> > <mm:mxml> > <%=mxmlString%> > </mm:mxml> > > The problem we are facing is that the MXML does not get rendered > properly. Supposing the MXML source is as shown below, > > <mx:Application xmlns:mx='http://www.macromedia.com/2003/mxml'> > <mx:Panel height='600' width='600' title='test' id='Panel1'> > <mx:TextInput id='TextInput2' /> > <mx:DataGrid id='DataGrid3' /> > </mx:Panel> > <mx:TextInput id='TextInput3' /> > </mx:Application> > > The MXML embedded in the JSP only displays the direct children of > the Application. In the above examples, the Panel1 and TextInput3 > are displayed while TextInput2 and DataGrid3 are node displayed. > (Please note that the mxmlString contains the source code correctly). > > It will a great help if you can give any suggestion/solution to this > problem. Please let me know if there is any alternate way to > dynamically display mxml. > ------------------------ Yahoo! Groups Sponsor --------------------~--> Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM --------------------------------------------------------------------~-> -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

