0 Replies Latest reply on Jul 24, 2012 5:50 AM by aneh

    UIMediaOutput SVG Issue

    aneh

      I am creating a series of dynamic tabs and I want to be able to have different content on each of these tabs.  I have looked every where for hint, clues, and crumbs on how to do this and found very little.  Finally I resolved to generate the content programatically using the various UIXyz classes.  So far so good for the simply controls that I wanted, now I want to insert some SVG.

       

      First I hard coded the desired result as:

       

      <object data="LogoSmall.svg" type="image/svg+xml" width="300" height="300"/>

       

      and this displays as I expected.

       

      Now I have tried many combinations of calls on UIMediaOutput and have settled on the following as being the closest and yet so far....

       

      UIMediaOutput mo = (UIMediaOutput)application.createComponent(UIMediaOutput.COMPONENT_TYPE);

       

      mo.setElement("object");

       

      mo.setType("image/svg+xml");

       

      mo.setValue("LogoSmall.svg");

       

      The result is close but...

       

      <object data="this is a long string of letter something like and encoded form of an image or text or what but definitely no the file name I was expecting" type="image/svg+xml" />

       

      So I can see that the processing is taking place but I cannot find the right combination of calls to produce what I want.

       

      Any ideas? A complete example that works would obviously be great.  I cannot believe I am the only one with the issue and yet I cannot find anything close on the web to help me.