|
Dan, you may be on to something here: the “components”
I want to instantiate and initialize are in face full “applications”,
that is, they begin with the <mx:application tag. I associate them
with their UI by using them as the root (application) component of the UI
application. So I could instantiate them with JSP and the
taglib to get a minimal UI. But I would still get the whole logic component
app coming down the wire to the client (without the full UI of course), when I
just want a value.. Good idea, it has me thinking, thanks. From: Dan Schaffer
[mailto:[EMAIL PROTECTED] Another idea is to do server side
processing in a jsp page using the mxml tag library. The jsp source can
use the mxml tag library and generate mxml code dynamically in java.
Using this approach your java code can access your back end resourcesdo
complex calculations/analysis and build the data directly into mxml code.
The tag library builds the generated mxml code into a swf and returns it tothe
client. A jsp request has to return a full swf instead of a
component. It's an interesting idea to think about a jsp returning a
component instead of an mx:Application. So the client might request:
processReport.jsp?queryParam=param1&queryParam2=param2 (or pass
parameters as POST) The jsp may have code like: processReport.jsp: <%@ taglib uri="FlexTagLib"
prefix="mm" %> <mm:mxml> <mx:Application
xmlns:mx=http://www.macromedia.com/2003/mxml>
<mx:Array id="dp0">
<%= buildTableData() %>
</mx:Array>
<mx:DataGrid dataProvider="{dp0}" /> </mx:Application> </mm:mxml> So your buildTableData method is just a
java method which processes the data on the server in java then returns a
string with the format of <mx:Object param1="name1"
param2="name2" /> for each datagrid row. So client downloads
the processed data and does not have do the work on the client (and in
actionscript). Or instead of generating object data as a
dataprovider from java methods you could generate normal mxml tags populated
with the data. Also when building some applications I
have written java http services which call web services and process the data
instead of making the client do additional calculations. Dan -----Original Message----- Thanks, Since duplicating my AS logic
in another language is not practical, I will just have to pull everything down
to the client for my batch operations. I'm not completely giving
up on this idea, though. Maybe a server-side piece could impersonate a
client and access the flex on a second server.... Thanks, guys. From:Elliot
Winard [mailto:[EMAIL PROTECTED] Of course, your
components would then have to be implemented as Java rather than ActionScript. -e -----Original Message----- No, Flex
components aren't meant to be run on the server. This sounds like you
might have a use-case for writing true server-side logic that you would then
call via RemoteObject (or WebServices). Matt -----Original Message----- Say I have very complex, faceless mxml components
(that do data
|
- RE: [flexcoders] Possible to use Flex/Flash components Se... Dan Schaffer
- RE: [flexcoders] Possible to use Flex/Flash componen... Matt Chotin
- RE: [flexcoders] Possible to use Flex/Flash comp... J. Matthew Pryor
- RE: [flexcoders] Possible to use Flex/Flash componen... Matt Chotin
- Tracy Spratt

