i'm working to a JSF project, and i need to integrate some Flex.. i have a Flex application that is a Chart (i added some features to the Flex chart).
I will embed this flex application in some page, and this is not going to be a problem.. i can embed it and i can use the external interface of flex to, for example, set some property before doing a database query for the data (i'm using spring-flex too, to use the beans of the application).
The problem is that, for example, in another jsf page, i have to develop an application that contains a chart too.. i mean, for example:
- page_1.jspx: i embed the chart, to show some i can set with the external interface api
- page_2.jspx: i want to embed another application in flex that use that chart too.. for example with a menu to select dates or parameters.
The problem is that the same flex app, the chart, is being used as an application.. but i need to use it like a component too.
I can resolve this using the SWFLoader, for sure, but.. the same chart that use the external interface.. i have to use it with SWFLoader in another way.. so in the same chart app i should implement code for both things.
Well.. i'm asking help just to know how would you organize this projects, because i don't have many experience with it.
I hope i've explained well the problem, sorry for my english if i wrote something wrong.
Sounds like you want to leverage the same chart component that you developed on another page but embed a second application in the page with additional controls. Not a big deal. Just define some clean interfaces between them and let them communicate through the ExternalInterface. This way you can swap out them out easily. For example, you could decide to ditch the Flex control app and use HTML instead and not have to change a whole lot.