That seems pretty odd. Are you sure that
nothing is getting escaped accidentally, like the <> turning into
< > deeper in?
From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of varalakshmi_palani
Sent: Saturday, November 05, 2005
11:32 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Dyanamic
MXML Loading
Hi,
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 mlns: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.
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS
|