-
1. Re: a4j:mediaOutput
iimirela Jul 8, 2009 10:39 AM (in response to iimirela)I fixed the problem partially. I was a matter of
<context-param> <param-name>org.richfaces.LoadScriptStrategy</param-name> <param-value>ALL</param-value> </context-param>
in the web.xml file.
Now.. the fact that the swf is in another war is a problem :)
How can I call it? And pass flashvars?
Thanks,
Ioana. -
2. Re: a4j:mediaOutput
nbelaevski Jul 8, 2009 11:14 AM (in response to iimirela)Hi Ioana,
Why not use SWF file directly? E.g.swfobject.embedSWF("/anothercontext/flash/my.swf", ...)
without a4j:mediaOutput? -
3. Re: a4j:mediaOutput
iimirela Jul 9, 2009 2:32 AM (in response to iimirela)Because it's a dynamic thing, and I need to specify in java what to show, so a4j:mediaoutput is very confy. In the paintFlash method is there a way to get the swf in another context?
Thanks,
Ioana. -
4. Re: a4j:mediaOutput
nbelaevski Jul 9, 2009 6:04 AM (in response to iimirela)I'm not sure what dynamical do you mean, so how about this:
swfobject.embedSWF("#{bean.movieUrl}", ...)
?
If this doesn't work for you, then you can try forwarding request to SWF resource; however this solution will work better with custom-coded Servlet and without a4j:mediaOutput, because I do not see a good place to include forwarding in its code. -
5. Re: a4j:mediaOutput
iimirela Jul 9, 2009 6:10 AM (in response to iimirela)I meant dynamic in the sense that not always I have to show a swf.
I have a tree menu, and in base of the selected leaf, I show a swf, or an image, or smth else.
Thanks.
Ioana. -
6. Re: a4j:mediaOutput
nbelaevski Jul 9, 2009 6:14 AM (in response to iimirela)Ioana,
Then you can hide/show a4j:outputPanel holding SWF. E.g. using "rendered". -
7. Re: a4j:mediaOutput
iimirela Jul 9, 2009 8:22 AM (in response to iimirela)Hi,
Yes, I'll render/rerender :) but I have to dynamically decide the content of the outputpanel. Maybe you'll disagree, but I did smth like this int the paintFlash method:javax.faces.context.ExternalContext ext = FacesContext.getCurrentInstance().getExternalContext(); HttpServletRequest request = (HttpServletRequest)ext.getRequest(); ServletContext context = request.getSession(). getServletContext).getContext("/otherContext"); InputStream stream = context.getResourceAsStream("/myflex.swf");
And it works for me.
Ioana. -
8. Re: a4j:mediaOutput
nbelaevski Jul 9, 2009 8:57 AM (in response to iimirela)Hi Ioana,
Nice to hear it's working.