Using HTML component Images within a tilelist

I have a very complicated problem and I'm not sure it's even within my ability to achieve if at all but basically in my AIR application I currently have a tilelist populated by a data provider of images which are essentially thumbnail snapshots I've made of websites. When each of these images is clicked within the tilelist they take the user to that specific site. I now however want these images to be live i.e. they change as the site changes.
I've decided to use html components for all of these sites to get these images but I now want these images to be set up as a dataprovider for a tilelist. It's hard to explain so to show what I mean I've made the following code. Basically I want the 2 images/displays that are displayed within the 2 html components to be static i.e. the user can't interact with the sites through them but can simply click on them to go to the site and to be put within a dataprovider somehow that will act as the dataprovider for the imageDisplay tilelist Complicated I know but the guy I'm making the app for wants the images of sites to update themselves and this is the easiest way to do it I've heard :-
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication 
xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Canvas width="100%" height="100%">
<mx:HTML id="content1" location="http://www.adobe.com/" width="300" height="300"/>
<mx:HTML id="content2" location="http://www.google.com/" x="308" width="300" height="300"/>  
<mx:TileList x="0" y="308" width="772" height="300" id="imageDisplay"></mx:TileList>
</mx:Canvas>
</mx:WindowedApplication>

To show you what I mean better here is a partial bit of my code from my existing app in which I've just used static images in the tilelists. The real app is much more advanced but this is to just give you an idea. Users can drag site icons displayed in a tilelist into their own tilelist and then click the save button so these icons will still be in their tilelist when they restart the app. I used the shared object method for this to get it to save these details. As you can see in my code starting at around line 33 I've used an array collection for this. What I need is to somehow get these html live images into that array collection as opposed to the static jpgs I have at the moment.
<?xml version="1.0" encoding="utf-8"?><mx:WindowedApplication  xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="initprofile1NewsAndSportSO();">
 <mx:Script>
<![CDATA[
[Bindable][
Embed(source="assets/images/bbcnews_small.png")] 
public var image5:Class; 
Bindable][
Embed(source="assets/images/itv_small.png")] 
public var image7:Class; 
Bindable][
Embed(source="assets/images/skynews_small.png")] 
public var image10:Class; 
]]>
</mx:Script>
 <mx:Script>
<![CDATA[
 private function profile1NewsAndSportAddButtonClickHandler():void{ 
for each(var a:uint in profile1NewsAndSportAddLinksTilelist.selectedIndices){ 
if(profile1NewsAndSportLinkChoice.dataProvider != null){ 
if(!ArrayCollection(profile1NewsAndSportLinkChoice.dataProvider).contains(ArrayCollection(pr ofile1NewsAndSportAddLinksTilelist.dataProvider).getItemAt(a))){ArrayCollection(profile1NewsAndSportLinkChoice.dataProvider).addItem(ArrayCollection(profi le1NewsAndSportAddLinksTilelist.dataProvider).getItemAt(a));
ArrayCollection(profile1NewsAndSportAddLinksTilelist.dataProvider).removeItemAt (a);
else{profile1NewsAndSportLinkChoice.dataProvider.addItem(ArrayCollection(profile1NewsAndSportAd dLinksTilelist.dataProvider).getItemAt(a));
ArrayCollection(profile1NewsAndSportAddLinksTilelist.dataProvider).removeItemAt(a);
private function profile1NewsAndSportRemoveButtonClickHandler():void{ 
for each(var a:uint in profile1NewsAndSportLinkChoice.selectedIndices){ArrayCollection(profile1NewsAndSportAddLinksTilelist.dataProvider).addItem(ArrayCollection (profile1NewsAndSportLinkChoice.dataProvider).getItemAt(a));
ArrayCollection(profile1NewsAndSportLinkChoice.dataProvider).removeItemAt(a);
]]>
</mx:Script>
 <mx:Script>
<![CDATA[
 import mx.collections.*; 
import flash.net.SharedObject; 
public var profile1NewsAndSportSO:SharedObject; 
private var profile1NewsAndSportaddLinksFullAC:ArrayCollection = new ArrayCollection([{link:
"www.bbcnews.com", label:"BBC News", icon:"image7", largeImage:"assets/images/bbcnews_small.png", title:"BBC News", description:"BBC News description will go here"},{link:
"www.itv.com/", label:"ITV", icon:"image5", largeImage:"assets/images/itv_small.png", title:"ITV", description:"ITV Description will go here"},{link:
"www.skynews.com", label:"Sky News", icon:"image10", largeImage:"assets/images/skynews_small.png", title:"Sky News", description:"Sky News Description will go here"}]);
private var profile1NewsAndSportaddLinksAC:ArrayCollection = new ArrayCollection([{link:
"www.bbcnews.com", label:"BBC News"},{link:
"www.itv.com/", label:"ITV"},{link:
"www.skynews.com", label:"Sky News"}]);
private function profile1NewsAndSportReset():void{resetprofile1NewsAndSportAC();
profile1NewsAndSportAddLinksTilelist.dataProvider
= profile1NewsAndSportaddLinksAC;
profile1NewsAndSportLinkChoice.dataProvider =
new ArrayCollection([]);}
private function resetprofile1NewsAndSportAC():void{profile1NewsAndSportaddLinksAC.removeAll();
for each(var obj:Object in profile1NewsAndSportaddLinksFullAC){profile1NewsAndSportaddLinksAC.addItem(obj);
private function initprofile1NewsAndSportSO():void{profile1NewsAndSportLinkChoice.dataProvider =
new ArrayCollection();profile1NewsAndSportAddLinksTilelist.dataProvider =
new ArrayCollection();profile1NewsAndSportSO = SharedObject.getLocal(
"profile1NewsAndSport"); 
if(profile1NewsAndSportSO.size > 0){ 
if(profile1NewsAndSportSO.data.profile1NewsAndSportaddList){ 
if(profile1NewsAndSportSO.data.profile1NewsAndSportaddList != "empty"){ 
var profile1NewsAndSportaddList:Array = profile1NewsAndSportSO.data.profile1NewsAndSportaddList.split(","); 
var profile1NewsAndSporttempAC1:ArrayCollection = new ArrayCollection(); 
for each(var str:String in profile1NewsAndSportaddList){ 
for each(var obj1:Object in profile1NewsAndSportaddLinksAC){ 
if(str == obj1.label){profile1NewsAndSporttempAC1.addItem(obj1);
continue;}
if(profile1NewsAndSporttempAC1.length > 0){profile1NewsAndSportAddLinksTilelist.dataProvider = profile1NewsAndSporttempAC1;
if(profile1NewsAndSportSO.data.profile1NewsAndSportchoiceList){ 
var profile1NewsAndSportchoiceList:Array = profile1NewsAndSportSO.data.profile1NewsAndSportchoiceList.split(","); 
var profile1NewsAndSporttempAC2:ArrayCollection = new ArrayCollection(); 
for each(var str2:String in profile1NewsAndSportchoiceList){ 
for each(var obj2:Object in profile1NewsAndSportaddLinksAC){ 
if(str2 == obj2.label){profile1NewsAndSporttempAC2.addItem(obj2);
continue;}
if(profile1NewsAndSporttempAC2.length > 0){profile1NewsAndSportLinkChoice.dataProvider = profile1NewsAndSporttempAC2;
else{profile1NewsAndSportReset();
private function saveprofile1NewsAndSport(event:MouseEvent):void{ 
var profile1NewsAndSportaddList:String = ""; 
if(profile1NewsAndSportAddLinksTilelist.dataProvider){ 
if(ArrayCollection(profile1NewsAndSportAddLinksTilelist.dataProvider).length > 0){ 
for each(var obj1:Object inprofile1NewsAndSportAddLinksTilelist.dataProvider){
profile1NewsAndSportaddList += obj1.label +
else{profile1NewsAndSportaddList =
"empty";}
profile1NewsAndSportSO.data.profile1NewsAndSportaddList = profile1NewsAndSportaddList;
var profile1NewsAndSportchoiceList:String = ""; 
for each(var obj2:Object inprofile1NewsAndSportLinkChoice.dataProvider){
profile1NewsAndSportchoiceList += obj2.label +
profile1NewsAndSportSO.data.profile1NewsAndSportchoiceList = profile1NewsAndSportchoiceList;
profile1NewsAndSportSO.flush();
]]>
</mx:Script>
 <mx:Button click="profile1NewsAndSportReset()" id="reset" label="
Reset" y="5" height="25" x="5"/>
 <mx:TileList id="profile1NewsAndSportLinkChoice" fontWeight="bold" dragEnabled="
true" dragMoveEnabled="true" dropEnabled="true" height="129" width="
650" top="10" left="519" columnCount="5" rowHeight="145" columnWidth="
125" backgroundColor="#000000" color="#FFFFFF"creationComplete="profile1NewsAndSportLinkChoice.selectedIndex=0"
/>
 <mx:TileList id="profile1NewsAndSportAddLinksTilelist" fontWeight="bold" dragEnabled="
true" dragMoveEnabled="true" dropEnabled="true" height="129" width="
385" top="10" left="126" columnCount="3" rowHeight="145" columnWidth="125" backgroundColor="
#000000" color="#FFFFFF"creationComplete="profile1NewsAndSportAddLinksTilelist.selectedIndex=0"
/>
 <mx:Button click="saveprofile1NewsAndSport(event)" id="save" label="Save Changes" x="
5" y="38" width="113" height="25.5"/>
 <mx:Button x="126" y="147" label="Add" id="profile1NewsAndSportAddSelectedLinkButton" click="profile1NewsAndSportAddButtonClickHandler()"/>
 <mx:Button x="519" y="147" label="Remove" id="profile1NewsAndSportRemoveSelectedLinkButton" click="profile1NewsAndSportRemoveButtonClickHandler()"/>
 </mx:WindowedApplication>

Similar Messages

  • Using an WD Component twice within the same Component

    Hi all,
    our company has made a WD Component for editing business partners.
    My job is to build a WD Component where two business partners (different roles) are edited within the same window.
    My idea was to make 2 separate component usages of the Business Partner WD Component within my component.
    This just works fine. But there is a problem when mapping the context of both Business Partner-Components into my WD Component. There are always naming conflicts. This is because it is not allowed that there are two nodes with the same name in the context, even if they are in different subnodes. Renaming the nodes after mapping them in my component also doesn't work, because it is not possible to rename nested nodes.
    Does anyone know a solution?
    Kind regards,
    Florian

    Hi Anurag,
    thank you for giving me help. You are right, it is possible to use a component twice within the same webdynpro component.
    But the problem is the context mapping in the target component.
    Let me give you an example.
    This is the context of the twice used component.
    CONTEXT
    |
    |->NODE_1
    |  |
    |  |->SUBNODE_1
    |  |  |
    |  |  |->SUBSUB_NODE_1
    |  |  |  |
    |  |  |  |->ATTRIBUTE_1_1_1
    |  |  |  |->ATTRIBUTE_1_1_2
    |  |  |->SUBSUB_NODE_2
    |  |  |->SUBSUB_NODE_3
    |  |  |->ATTRIBUTE_1_1
    |  |  |->ATTRIBUTE_1_2
    |  |->ATTRIBUTE_1
    |  |->ATTRIBUTE_2
    |  |->ATTRIBUTE_3
    Now, if i map this context (NODE_1) to the target web dynpro component I have a problem. I have to map it twice (one time for each used component), so that i can access both used components. But WebDynpro only allows me to rename the node NODE_1. Mapped subnodes (SUBNODE_1, ...) cannot be renamed. So i cannot map the context of both used components, because there are always naming conflicts. WebDynpro doesn't allow that there are two nodes with identical names within the context, even if they are in different subnodes.
    Is there a solution? We really need one.
    Thanks
    Florian

  • Using Jumpeye Component in Flex

    Hi,
    has anyone successfully used Jumpeye's Drop Down Tree Menu
    Component V3 in Flex 3? It's a great component to use in flash, the
    submenus open and close on rollover/rollout (something I have not
    been able to acheive with the Flex menubar). I used the flex
    component kit to export the Jumpeye component from flash and
    imported the swc into flex builder (I also imported the relevant
    classes etc, inc faking an instance of mx.core.UIComponent(as per a
    document I found on afcomponent's site). It works great on a simple
    level (i.e. using defaults) but fails when I try to set any style
    properties (these are done via an xml file with tags predefined by
    Jumpeye in the component shim). I'm pretty new to Flex and am
    obviously doing something very wrong, however, Jumpeye were not
    able to help me as their focus is flash, although they commented
    that clients of theirs have used the component successfully within
    Flex.
    Any help would be greatly appreciated.
    Julie

    >>You will need to put a little code here to better
    understand, but as a guess, you might not have wrapped the
    MovieClip in a UIComponent before adding it to the Flex display
    list.
    No. If the symbol in Flash was converted to a Flex Component,
    this step is already taken care of.
    Follow the example by Peter Ent to check if you have setup
    the symbol in Flash correctly.
    http://weblogs.macromedia.com/pent/archives/2007/04/example_of_the.html

  • Automatically place images within multiple InDesign documents

    I work for a publishing company of agricultural trade magazines and work on few titles each month. We are trying to streamline our production procedures and previous company I worked for had a script they used to place images within text pages by searching for the file name, however there were some limitations with this script (it would only work within 1 InDesign document and only within 1 InDesign story at a time). The company I am with now breaks out each editorial story into separate InDesign files and we place image boxes when the display ads are going to go. For our purposes now, I am looking for a script that, once all of the image boxes were tagged with the image file names, could search between multiple InDesign documents in a folder and automatically place all the images for us. Is anything like this available or able to be created? If so, would it have the capacity to search between multiple InDesign documents and search the entire document for the image file names? Any help would be greatly appreciated!

    Hi Kasyan,
    They were tagged using a program called Pathways created by a computer programmer the company used at the time. The issues that I was working on were annual Buyers' Guides so they were mainly just listings and inline graphics. The kinds of issues I work on now are monthly issue with various stories and no inline graphics, but display advertisements. And each story is created and laid out in a separate InDesign document. So I would need a script that can search an entire group of documents for file names and/or image boxes instead of just in one story in one document for inline graphics. (sorry if this is confusing).
    I currently do not have a script to work from and am looking for something new that can be used to save use the time of placing every ad manually.
    Thanks for your help and feedback!
    Matt

  • Need Help With An Application That Produces Live Images Within Tilelists

    At the moment I have an application which is meant to produce live thumbnail images of websites. Currently how it does this is a html component (myhtml) loads websites via it's location property changing from website to website and upon fully loading of each site a "snapshot" is taken of the html component and saved as a bitmap and applied as the source of an image corresponding to that particular site (abcnewsimage and bbcnewsimage). However I now need to insert these snapshots within the 'icon' properties of 2 array collections (myTilelistAArrayCollection and myTilelistBArrayCollection) which act as dataproviders to populate 2 tilelists (mtTilelistA and myTilelistB).
    Basically I need the same images to appear automatically within the tilelists the way they do in the 2 images as the snapshots are taken by applying the same bitmaps into the currently empty 'icon' properties of the 2 tilelists i.e. the icon of the ABC News Item of both array collections must be the same as the abcnewsimage and appear as it appears and the same for the BBC News Item icon being the same as the bbcnewsimage picture as that appears.
    It should look like the images are appearing in the tilelist at the same time as they are appearing in the regular images. What will I need to put into the icon properties to do this?
    I hope this makes sense and if anyone can help me out it would be much appreciated. :-)
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication
    xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" verticalAlign="middle" backgroundColor="white" width="1024" height="768">
    <mx:Script>
    <![CDATA[
    import mx.graphics.ImageSnapshot;
    import mx.collections.*;
    private function takeSnapshot(event:Event) :void{
    var imageBitmapData:BitmapData = ImageSnapshot.captureBitmapData(myhtml) ;
    switch(myhtml.location){
    case "http://abcnews.go.com/":abcnewsimage.source =
    new Bitmap(imageBitmapData);myhtml.location =
    "http://news.bbc.co.uk/";
    break;
    case "http://news.bbc.co.uk/":bbcnewsimage.source =
    new Bitmap(imageBitmapData);
    break;}
    private var myTilelistAArrayCollection:ArrayCollection = new ArrayCollection([{id:
    "ABC New Item", label:"ABCNews", icon:""},{id:
    "BBC News Item", label:"BBC News", icon:""}]);
    private var myTilelistBArrayCollection:ArrayCollection = new ArrayCollection([{id:
    "ABC News Item", label:"ABCNews", icon:""},{id:
    "BBC News Item", label:"BBC News", icon:""}]);
    ]]>
    </mx:Script>
    <mx:HBox x="10" y="10">
    <mx:Image id="abcnewsimage" width="100" height="100" scaleContent="true"/>
    <mx:Image id="bbcnewsimage" width="100" height="100" scaleContent="true"/>
    </mx:HBox>
    <mx:HTML id="myhtml" location="http://abcnews.com/" complete="takeSnapshot(event)" width="250" height="250" horizontalScrollPolicy="off" verticalScrollPolicy="off" x="10" y="118"/>
    <mx:TileList x="268" y="118" width="294" height="250" id="myTilelistA" dataProvider="{myTilelistAArrayCollection}" rowHeight="100" columnWidth="100"/>
    <mx:TileList x="570" y="118" width="294" height="250" id="myTilelistB" dataProvider="{myTilelistBArrayCollection}" rowHeight="100" columnWidth="100"/>
    </mx:WindowedApplication>

    Cheers Flex harUI. From what I can see superimage is mainly used to keep images at better quality. What I'm concerned with is having the images set within the 'icon' properties of the 2 tilelists AS they are set within their specific images. I've tried databinding by doing this for example:-
    {id:
    "ABC New Item", label:"ABCNews", icon:"{abcnewsimage.source}"},
    I hoped that would cause the icon field of the array collection to be populated by the source of the abcnewsimage so that as the abcnewsimage is populated by the snapshot that is taken of the abcnews website the icon field of the abc news item in the array collection would be too so that furthermore the tilelists would then be populated by these images. Basically as each snapshot appears in it's specfic image it needs to be loaded into the icon property of the array collection too. In the end the icons should look as if they are appearing within both the tilelists the same way as they are appearing within the images if that makes sense. The images should be loading within the tilelist one at a time as they are in the regular image components.

  • Need Help With An Application Which Produces Live Images Within Tilelists

    At the moment I have an application which is meant to produce live thumbnail images of websites. Currently how it does this is a html component (myhtml) loads websites via it's location property changing from website to website and upon fully loading of each site a "snapshot" is taken of the html component and saved as a bitmap and applied as the source of an image corresponding to that particular site (abcnewsimage and bbcnewsimage). However I now need to insert these snapshots within the 'icon' properties of 2 array collections (myTilelistAArrayCollection and myTilelistBArrayCollection) which act as dataproviders to populate 2 tilelists (mtTilelistA and myTilelistB).
    Basically I need the same images to appear automatically within the tilelists the way they do in the 2 images as the snapshots are taken by applying the same bitmaps into the currently empty 'icon' properties of the 2 tilelists i.e. the icon of the ABC News Item of both array collections must be the same as the abcnewsimage and appear as it appears and the same for the BBC News Item icon being the same as the bbcnewsimage picture as that appears.
    It should look like the images are appearing in the tilelist at the same time as they are appearing in the regular images. What will I need to put into the icon properties to do this?
    I hope this makes sense and if anyone can help me out it would be much appreciated.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication
    xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" verticalAlign="middle" backgroundColor="white" width="1024" height="768">
    <mx:Script>
    <![CDATA[
    import mx.graphics.ImageSnapshot;
    import mx.collections.*;
    private function takeSnapshot(event:Event) :void{
    var imageBitmapData:BitmapData = ImageSnapshot.captureBitmapData(myhtml) ;
    switch(myhtml.location){
    case "http://abcnews.go.com/":abcnewsimage.source =
    new Bitmap(imageBitmapData);myhtml.location =
    "http://news.bbc.co.uk/";
    break;
    case "http://news.bbc.co.uk/":bbcnewsimage.source =
    new Bitmap(imageBitmapData);
    break;}
    private var myTilelistAArrayCollection:ArrayCollection = new ArrayCollection([{id:
    "ABC New Item", label:"ABCNews", icon:""},{id:
    "BBC News Item", label:"BBC News", icon:""}]);
    private var myTilelistBArrayCollection:ArrayCollection = new ArrayCollection([{id:
    "ABC News Item", label:"ABCNews", icon:""},{id:
    "BBC News Item", label:"BBC News", icon:""}]);
    ]]>
    </mx:Script>
    <mx:HBox x="10" y="10">
    <mx:Image id="abcnewsimage" width="100" height="100" scaleContent="true"/>
    <mx:Image id="bbcnewsimage" width="100" height="100" scaleContent="true"/>
    </mx:HBox>
    <mx:HTML id="myhtml" location="http://abcnews.com/" complete="takeSnapshot(event)" width="250" height="250" horizontalScrollPolicy="off" verticalScrollPolicy="off" x="10" y="118"/>
    <mx:TileList x="268" y="118" width="294" height="250" id="myTilelistA" dataProvider="{myTilelistAArrayCollection}" rowHeight="100" columnWidth="100"/>
    <mx:TileList x="570" y="118" width="294" height="250" id="myTilelistB" dataProvider="{myTilelistBArrayCollection}" rowHeight="100" columnWidth="100"/>
    </mx:WindowedApplication>

    Cheers Flex harUI. From what I can see superimage is mainly used to keep images at better quality. What I'm concerned with is having the images set within the 'icon' properties of the 2 tilelists AS they are set within their specific images. I've tried databinding by doing this for example:-
    {id:
    "ABC New Item", label:"ABCNews", icon:"{abcnewsimage.source}"},
    I hoped that would cause the icon field of the array collection to be populated by the source of the abcnewsimage so that as the abcnewsimage is populated by the snapshot that is taken of the abcnews website the icon field of the abc news item in the array collection would be too so that furthermore the tilelists would then be populated by these images. Basically as each snapshot appears in it's specfic image it needs to be loaded into the icon property of the array collection too. In the end the icons should look as if they are appearing within both the tilelists the same way as they are appearing within the images if that makes sense. The images should be loading within the tilelist one at a time as they are in the regular image components.

  • I want to display BLOB image in JSP Using  html tags IMG src=

    GoodAfternoon Sir/Madom
    I Have got the image from oracle database but want to display BLOB image using <IMG src="" > Html tags in JSP page . If it is possible than please give some ideas or
    Send me sample codes for display image.
    This code is ok and working no problem here Please send me code How to display using html tag from oracle in JSP page.
    <%@ page import="java.sql.*" %>
    <%@ page import="java.io.*" %>
    <%@ page import="javax.swing.ImageIcon;" %>
          <%
            out.print("hiiiiiii") ;
                // declare a connection by using Connection interface
                Connection connection = null;
                /* Create string of connection url within specified format with machine
                   name, port number and database name. Here machine name id localhost
                   and database name is student. */
                String connectionURL = "jdbc:oracle:thin:@localhost:1521:orcl";
                /*declare a resultSet that works as a table resulted by execute a specified
                   sql query. */
                ResultSet rs = null;
                // Declare statement.
                PreparedStatement psmnt = null;
                  // declare InputStream object to store binary stream of given image.
                   InputStream sImage;
                try {
                    // Load JDBC driver "com.mysql.jdbc.Driver"
                    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
                        /* Create a connection by using getConnection() method that takes
                        parameters of string type connection url, user name and password to
                        connect to database. */
                    connection = DriverManager.getConnection(connectionURL, "scott", "root");
                        /* prepareStatement() is used for create statement object that is
                    used for sending sql statements to the specified database. */
                    psmnt = connection.prepareStatement("SELECT image FROM img WHERE id = ?");
                    psmnt.setString(1, "10");
                    rs = psmnt.executeQuery();
                    if(rs.next()) {
                          byte[] bytearray = new byte[1048576];
                          int size=0;
                          sImage = rs.getBinaryStream(1);
                        //response.reset();
                          response.setContentType("image/jpeg");
                          while((size=sImage.read(bytearray))!= -1 ){
                response.getOutputStream().write(bytearray,0,size);
                catch(Exception ex){
                        out.println("error :"+ex);
               finally {
                    // close all the connections.
                    rs.close();
                    psmnt.close();
                    connection.close();
         %>
         Thanks

    I have done exactly that in one of my applications.
    I have extracted the image from the database as a byte array, and displayed it using a servlet.
    Here is the method in the servlet which does the displaying:
    (since I'm writing one byte at a time, it's probably not terribly efficient but it works)
         private void sendImage(byte[] bytes, HttpServletRequest request, HttpServletResponse response) throws IOException {
              ServletOutputStream sout = response.getOutputStream();
              for(int n = 0; n < bytes.length; n++) {
                   sout.write(bytes[n]);
              sout.flush();
              sout.close();
         }Then in my JSP, I use this:
    <img src="/path-to-servlet/image.jpg"/>
    The name of the image to display is in the URL as well as the path to the servlet. The servlet will therefore need to extract the image name from the url and call the database.

  • Adjust aliasing of webfonts within an HTML component?

    Hello,
    I'm trying to use an icon font in an html page that is being loded into an HTML component. I read somewhere that the HTML component uses webkit as its rendering engine, but -webkit-font-smoothing in the web page's css appears to be ignored. Is there another way to adjust the aliasing of fonts within the HTML?
    I've seen plenty of articles about embeding fonts in the flex application itself, but as far as I've been able to tell, that has no effect on the fonts in the HTML component itself.
    Thanks for any help,
    Cameron

    JFC/Swing has JEditorPane that can be used in conjunction with HTMLEditorKit to display HTML 3.2
    http://developer.java.sun.com/developer/onlineTraining/GUI/Swing1/shortcourse.html#JFCEditorPane
    Look for section
    11.1.5 JEditorPane
    in the sample chapter of a swing book at:
    http://manning.spindoczine.com/sbe/files/uts2/Chapter11html/Chapter11.htm

  • Repository Images within HTML

    Hello All-
    I would like to reference image variants within an HTML text object in my MDM repository.
    Something along the lines of
    img src="imagename.variant"
    Is this possible or do I need to combine the information in a custom jsp?
    thanks
    Tim

    if you're using html, then when you place the image make it spaced from the right, or define location with percentage of screen.

  • Loading local images into HTML component

    I need to intermix text and images for a project I'm working
    on, and using htmlText seems the best way to do it. However, I
    can't get it to work when the images are loaded from the local file
    system.
    It seems to work fine with remote images:
    <mx:HTML x="480" y="191" width="256" height="315">
    <mx:htmlText>
    <![CDATA[
    <p>Image: <img src='
    http://knight.fb.hive7.com/res/img/ico/x32/coin.gif'
    ></p>
    ]]>
    </mx:htmlText>
    </mx:HTML>
    But not with local images:
    <mx:HTML x="480" y="191" width="256" height="315">
    <mx:htmlText>
    <![CDATA[
    <p>Image: <img src='../assets/coin.gif'
    ></p>
    ]]>
    </mx:htmlText>
    </mx:HTML>
    Anybody have any ideas or workarounds?

    Hi,
    I tried your solution, it did not worked, it gave me following error -
    ==========
    ReferenceError: Error #1056: Cannot create property placeLoadStringContentInApplicationSandbox on mx.core.FlexHTMLLoader.
        at com.exa.view::TestView/changeEvt()[/home/sachin/workspace/newed/src/com/exa/view/TestView .mxml:70]
        at com.exa.view::TestView/__toctree_change()[/home/sachin/workspace/newed/src/com/exa/view/T estView.mxml:89]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.3.0\frameworks\projects\framework\src \mx\core\UIComponent.as:9308]
        at mx.controls.listClasses::ListBase/mouseUpHandler()[C:\autobuild\3.3.0\frameworks\projects \framework\src\mx\controls\listClasses\ListBase.as:8989]
        at mx.controls::List/mouseUpHandler()[C:\autobuild\3.3.0\frameworks\projects\framework\src\m x\controls\List.as:2279]
        at mx.controls::Tree/mouseUpHandler()[C:\autobuild\3.3.0\frameworks\projects\framework\src\m x\controls\Tree.as:2952]
    ===========
    Here is the code, the function gets called on change event of a tree component(not shown in code here)
    ===============
    <mx:Panel width= "70%" height="100%" id="cpanel" paddingBottom="10" paddingLeft="20" paddingTop ="20">
            <mx:HTML id="htmlc" width="100%" height = "100%">
            </mx:HTML>
        </mx:Panel>
    <mx:Script>
        <![CDATA[
              public function changeEvt(event:Event):void{
                   htmlc.htmlLoader.placeLoadStringContentInApplicationSandbox = true;
                   htmlc.htmlLoader.loadString(rh.content.replace(/src="\/images/mg,'src="assets'));
        ]]>
    </mx:Script>
    ================
    It would be helpful if you give more insight on your html component.
    Adobe air -version - 1.5
    Thanks

  • I am getting a error IO when trying to upload multiple images within wordpress using the flash uploader. I do not get the error when uploading using explorer. The error only appears if I try uploading using firefox....any ideas?

    I am getting a error IO when trying to upload multiple images within wordpress using the flash uploader. I do not get the error when uploading using explorer. The error only appears if I try uploading using firefox....any ideas?

    Logged the call with SAP who directed me to 'Define settings for attachments' in IMG and setting the 'Deactivate Java Applet' & 'Deactivate Attachment versioning' checkboxes - problem solved.

  • Using a different default component state within each page state

    I am using a custom component in multiple page states but would like to have a different default state (for the same custom component) within each page state.
    Is there anyway to use a different default component state within each page state .
    When I change the default state at a component level it seems to go across all my page states.  Any solutions?
    Thank you

    I guess I can just add that interaction for that component!
    I think my brain is just catching up

  • Using the value "Image/*" for the accept attribute of the HTML input Element, how can I add .pdf to the array of preconfigured file types (.jpe, .jpg, .jpeg, .?

    On a form, using the value "image/*" for the accept attribute of the HTML input Element, how can I add .pdf to the array of pre-configured file types (.jpe, .jpg, .jpeg, .gif, .png, .bmp, .ico, .svg, .svgz, .tif, .tiff, .ai, .drw, .pct, .psp, .xcf, .psd, .raw)?
    Say I wanted to add .gif, .jfif or .ico. I find this array limited, how can I add types to image?
    <input type="file" name="file" accept="image/*" id="file" />
    mimeTypes.rdf does not seem to allow this.

    ''mimeTypes.rdf'' has nothing to do with web development. It's a file that stores your file handling preferences (e.g. if you want ZIP files automatically saved or opened).
    You can't change the file types of the pre-defined content specifiers (audio/*, video/*, image/*), but you can specify additional MIME types. To add PDF to your above example,
    <pre><nowiki><input type="file" name="file" accept="image/*,application/pdf" id="file" /></nowiki></pre>
    For details, see
    * [https://developer.mozilla.org/En/HTML/Element/Input developer.mozilla.org/En/HTML/Element/Input]

  • Unable to use HTML tags in the BPEL email component

    Hi,
    I am using BPEL email component to send mail notifications. I want the email should be in proper format.If I use HTML tags the workflow application build fails .It says invalid syntax for html tags.So, I removed the tags and just using the concat string operations as of now.To format i even tried '\n' like in java but it didnt help. Could you please let me know how do I achieve this?
    The JDeveloper version is 11.1.1.3 and SOA ,OIM both are 11.1.1.3
    The BPEL source code for the email content I configured is:
    <copy>
    <from expression="concat(string('AD Account access request has been rejected by manager.\n
    Here are some details about the request:\n
    Request ID : '), bpws:getVariableData('inputVariable','payload','/ns3:process/ns4:RequestID'),string('\n'),
    string('Employee First Name : '),bpws:getVariableData('empFName'),string('\n'),
    string('Employee Last Name : '),bpws:getVariableData('empLName'),string('\n'),
    string('Manager Employee ID : '),bpws:getVariableData('manager'),string('\n\n\n'),string('Thanks,\n IDM Administration')
    )"/>
    <to variable="varNotificationReq"
    part="EmailPayload"
    query="/EmailPayload/ns15:Content/ns15:ContentBody"/>
    </copy>
    Please suggest .
    Thanks,
    Piyasa

    Hi
    Here is the sameple email from BEPL email component. See if this helps:
    "<html>&#x0A;<body>&#x0A;<p>This is an automated message from the <b>Identity Provisioning Solution</b>. Please don’t reply to this email.</p>&#x0A;&#x0A;<p>An access request has been successfully submitted for <%concat(bpws:getVariableData('inputVariable','payload','/ns3:process/ns4:BeneficiaryDetails/ns4:FirstName'),' ',bpws:getVariableData('inputVariable','payload','/ns3:process/ns4:BeneficiaryDetails/ns4:LastName'))%> to access <%bpws:getVariableData('inputVariable','payload','/ns3:process/ns4:ObjectDetails/ns4:name')%>.</p>&#x0A;&#x0A;To view additional details of the request, login to the Identity Provisioning Solution.&#x0A;&#x0A;<br>Request ID: <%bpws:getVariableData('inputVariable','payload','/ns3:process/ns4:RequestID')%>&#x0A;<br>&#x0A;<br>&#x0A;<br>&#x0A;<br>Thank you,&#x0A;<br>Identity and Access Management&#x0A;</body>&#x0A;</html>&#x0A;"
    Regards
    user12841694

  • How to use LIVE images within a flex app

    My App is composed of links to other websites. Currently these links are in the form of images which are basically static screenshots of the websites.
    What I want is for these images to instead be live i.e. what the website looks like currently. So if the website changes it's background colour etc this will change within the image making it a live screenshot. This is something my client wants so that the app is is basically self updatable. Can anyone help me out on how to do this please?

    I see what you mean about the clickable transparent overlays as this would stop the user interacting with the images which is what I want and I also see what you mean about it being hard to scale the images as it seems iframe has it's own scrollbars and includes the entire screen rather than thumbnails.
    My further problem is that I need to display these images in a tilelist that the user can scoll up and down and the images need to be drag and droppable between 2 tilelists. Yikes. They already are drag and droppable at the moment and are all displayed within a tilelist but I just need to make them live.
    Now I'm scared. Ha.

Maybe you are looking for

  • Problem with cookies in FL4, Android 2.1, EVO4G?

    Got a 4G at work today and started putting some of our apps onto it.  First time using Flash Lite 4, so it was very exciting to see it running AS3 swfs right out of the box.  Very slick. Ran into a problem though.  When I talk to a server which creat

  • Can i pass an int * to a native function?

    From Java, can I pass an int pointer to the JNI? I want the native function to assign data to an int in the Java program. Many thanks!

  • How to paste exposure setting to multiple images

    Hi all: I know this question has probably been asked many times but I couldn't find any answer using the search so please be patient with me. :) I came from the world of RawShooter Premium and I realized that my version of RSP can't read RAW file fro

  • Video frames to layers coming out blank on cs3 extended

    This has only just recently started happening as it was working fine earlier, but now when I try to open an Avi. file into video layers the frames are just coming out white. Anything I can do to fix this?

  • Audio Input on the Left Channel is fine, Right Channel, Not So Much...

    Okay, so I'm attempting to record some audio into my eMac using it's 3.5mm Line Input Jack, but Sound Studio is telling me that all of the audio is coming out of the left channel. I checked balance, it's a new cable that works fine otherwise, the dev