Are there any good code examples for displaying preview images in the storefront?

I can gather other info using folio.xxx, but can not find any good examples to use for preview images.  Tried folio.getPreviewImage() with no success.  Oh, I should mention it is version 2.  Plenty of examples for version 1.
Perhaps if I get a little more specific.
I am calling up the folios via:
       adobeDPS.libraryService.folioMap.addedSignal.add(function(folios) {
            for (var i = 0; i < folios.length; i++) {
                addFolio(folios[i]);
        }, this);
This eventually works into a function where I am gathering and displaying folio data:
     var productId = folio.productId;
    var html  = "<div id='" + productId + "'>";
        html +=     "<a href='#'><img class='shadow' width='120' src='' border=0 /></a>";
        html +=     "<br /><span class='bold'>" + folio.title + "</span>";
        html += "</div>";
    this.$el = $(html);
folio.title works fine to pull up the title, but I can no longer use folio.getPreviewURL in v2.  What code should I be using to set the src to the preview image?
Thanks

Have you looked at the default implementations of the library?
In FolioItemView's render function, there is a function(follow the nested functions!):
setTimeout(function(){ scope.loadPreviewImage() }, 100);
It references this function (this doesn't copy well):
loadPreviewImage: function() {
if (this.el.parentElement) {
var transaction = this.folio.getPreviewImage(135, 180, true);
transaction.completedSignal.addOnce(this.getPreviewImageHandler, this);
Going deeper, into the getPreviewImageHandler function is where you see the url value..
if (transaction.state == adobeDPS.transactionManager.transactionStates.FINISHED && transaction.previewImageURL != null) {
                              this.$el.find(".folio-thumb").attr("src", transaction.previewImageURL);
Within the example is also code for supplying a preview when the Adobe API is not available:
(Within the render function)
var json = this.model.toJSON();
$folioThumb.attr("src", json.libraryPreviewUrl);
If you're making any changes to where the preview is displayed, you can just swap out the class ".folio-thumb" to whatever the class (or id) is of the element you're wanting to render the preview in.

Similar Messages

  • Are there any good free templates for motion like the 8 that come with it?

    Hi,
       Are there any decent free templates out there for Motion - similar to the ones that it ships with (ie small intros, lower thirds, etc..)
       Thanks!
      - Jack

    You may want to check here first.
    http://www.fcp.co/forum/9-free-fcpx-plugins-and-templates

  • Are there any clustering deployment parameters for MDB ?

    Hi all,
              Are there any clustering deployment parameters for MDB ?
              We set the Default Load Algorithm to weight-based on the Administration
              Console,
              and three servers in the cluster have the folloing weights:
              Server1: 100
              Server2: 1
              Server3: 50
              Put 10000 messages to the queue which a MDB is listening. The three servers
              consume messages:
              Server1: 4154
              Server2: 3181
              Server3: 2665
              If we set th Algorithm to round-robin and put 10000 messages again, the
              result is:
              Server1: 3559
              Server2: 2696
              Server3: 3745
              It seems that the weight-based setting doesn't work.
              Except the settings on the Administration Console, are there any clustering
              deployment parameters for MDB to have different behaviors?
              TIA
              Alan.
              

    Thanks that was very helpful. My problem however wasn't with using Message driven beans or with sending/receiving messages to/from queue/topics from clients within the application ear file but from outside the ear file , like a remote client. When I follow the exact same steps for a remote client, except getting the context ofcourse, though I am able to lookup the queues and queue connection factories, I am not able to send messages to those queues. It's then that the client throws an exception that it couldn't connect to the JMS Server.
    The server throws the following exception:
    java.lang.NullPointerException
    at com.evermind.server.jms.JMSServer.removeClient(JMSServer.java:724)
    at com.evermind.server.jms.JMSRequestHandler.run(JMSRequestHandler.java:
    278)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExec
    utor.java:796)
    at java.lang.Thread.run(Thread.java:484).
    The client throws the following exception:
    Exception in thread "main" javax.jms.JMSException: Unable to connect to JMSServe
    r (localhost/127.0.0.1:9127)
    at com.evermind.server.jms.EvermindQueueConnection.connect(EvermindQueue
    Connection.java:144)
    at com.evermind.server.jms.EvermindQueueConnection.send(EvermindQueueCon
    nection.java:94)
    at com.evermind.server.jms.EvermindQueueSession.send(EvermindQueueSessio
    n.java:117)
    at com.evermind.server.jms.EvermindQueueSender.send(EvermindQueueSender.
    java:75)
    at com.evermind.server.jms.EvermindQueueSender.send(EvermindQueueSender.
    java:36)
    at com.evermind.server.jms.EvermindQueueSender.send(EvermindQueueSender.
    java:31)
    at examples.jms.queue.QueueSend.send(QueueSend.java:71)
    at examples.jms.queue.QueueSend.readAndSend(QueueSend.java:120)
    at examples.jms.queue.QueueSend.main(QueueSend.java:106)
    Any idea what might be causing this? Or is a remote client not allowed to send/receive messages from queue with oc4j?
    Thanks again,
    Bakul.

  • Are there any mac screen savers for multiple screens

    Are there any mac screen savers for multiple screens? like the one in the swordfish movie with john travolta haha

    screensaver +, free from the apps store, will do two monitors.  It does not do three monitors . 

  • Are there any good tool for checking security risks, Code review, memory leakages for SharePoint projects?

    Are there any good tool for checking security risks, Code review, memory leakages for SharePoint projects?
    I found one such tool "Fortify" in the below link. Are there any such kind of tools available which supports SharePoint?
    Reference: http://www.securityresearch.at/en/development/fortify/
    Amalaraja Fernando,
    SharePoint Architect
    Please Mark As Answer if my post solves your problem or Vote As Helpful if a post has been helpful for you. This post is provided "AS IS" with no warrenties and confers no rights.

    Hi Amalaraja Fernando,
    I'm not sure that there is one more tool that combines all these features. But you may take a look at these solutions:
    SharePoint diagnostic manager
    SharePoint enterprise manager
    What is SPCop SharePoint Code Analysis?
    Dmitry
    Lightning Tools Check
    out our SharePoint tools and web parts |
    Lightning Tools Blog | Мой Блог

  • Are there any good third party or otherwise apps and/or plugins for imovie'11?

    Are there any good third party or otherwise apps and/or plugins for imovie'11?

    Re: Plugins for iMovie 11
    Someone just asked this question yesterday. So I am cutting and pasting the answer From Bengt Warleby
    Hi
    You can not.
    Nor to iMovie'08 or 09 or 11 - They do not accept any Plug-ins.
    How about FinalCut Pro X - I don't know but i regard to Apple way of progress - I doubt
    For iMovie up to HD6 and FinalCut Express and FinalCut Pro up to 7.0 - there are plenty.
    Yours Bengt W

  • Are there any good DVD authoring programs for Mac now that Apple has discontinued DVD Studio and iDVD? I need to make DVDs that have interactive menus and such (Final Cut X and Compressor 4's DVD option is a little cheap). Any ideas?

    Are there any good DVD authoring programs for Mac now that Apple has discontinued DVD Studio and iDVD? I need to make DVDs that have interactive menus and such (Final Cut X and Compressor 4's DVD option is a little cheap and doesn't provide any kind of professional DVD authoring). Any ideas?

    This comes up a lot these days.
    Practically speaking, there are really four options for the Mac platform: Toast (<$100),  Adobe Premier Productiom ($1,600 to buy or $50/month to rent),  find a copy of Final Cut Studio from 3rd  party (+/- $1,000 new) or a boxed edition of iLife to get iDVD ($50 - $90 on Amazon new).
    The other question everyone has is how many OS versions before iDVD or FCS breaks? No one knows, but Apple has said they're no longer supporting these legacy apps. Of course, no one is mandated to upgrade to a new OS unless they buy a new computer. So if it works on a system, stay with it as long as it makes sense.
    Good luck.
    Russ

  • Hi:) I want to cancel my "one year membership" for the education-programm without loosing to much money. Are there any good ideas?

    Hi:) I want to cancel my "one year membership" for the education-programm without loosing to much money. Are there any good ideas?

    You paid for one year and that's just it. If you don't use it then that's nothing anyone can change. feel free to contact sales support.
    Mylenium

  • Are there any graphic driver updates for Satellite L850-162

    Are there any driver updates available for the L850-162?
    I'm just running with the ones that came installed with the laptop but the display is pixellated and jumpy when watching video.
    Any help/advice would be much appreciated

    Sat L850-162 is a part of the PSKDGE and it has been equipped with an Intel HD (INTEL HM76) Express chipset (graphic chip)
    There are more Toshiba series which use the same chipset so you could also use the drivers released for such notebook models.
    For example:
    C850 PSKC8E
    C855 PSKC8E
    C870 PSC8EE
    L830 PSK84E
    L870 PSKBGE
    P850 PSPKBE
    and others
    At least you could also try to use the Intel HD HM76 driver from the Intel page.

  • Are there any available vi's for PXI?

    Are there any VI's avaliable for PXI as it is for example VXI?
    Regards
    Henrik

    Hi Henrik,
    What kind of VI's do you need? PXI (PCI Extension for Instrumentation) is based on the PCI bus and you've usually a Windows PXI-Controller or a MXI-4 link (PCI-PCI-Bridge) which controls all boards in a PXI Chassis. There is no difference prgramming differnce between a LabVIEW VI which runs in a PC or in a PXI Controller. For example, it doesn't matter if you've a PCI-6025 DAQ board or a PXI-6025 board. The VI (programming) is the same. Of course, the PXI factor has more synchronisation and trigger capabilities then a PC based system, but there are no special VI's for that. The same DAQ driver handles both.
    I can give you a more detailed answer if you can give more informations. What do you want to do?
    Regards,
    Luca

  • OFSAA CRM ERROR 16616 - Are there any list of errors for consult

    Hi gys
    OFSAA CRM ERROR 16616 - Are there any list of errors for consult about CRM ?
    regards
    Daniel Daniele

    @chris_l -- yeah I was worried that might be the case, still I'm not sure if that explains why it keeps failing the burn process part way through?
    I've tried this and that in Linux but without much luck. I'm still quite a noob with a lot of Linux things and this is the first time I'm trying anything to do with optical disks/drives etc. so I'm learning as I go...
    The disk that failed in Windows but was 'readable' in Linux did just pass a run through ddrescue -- i.e. it created an output file okay and did not report any errors in the process.
    However when I mounted the resulting image and tried to copy the files across the first folder reported an "input/ouput error" (just using gui copy+paste in Thunar file manager)
    ...the other folders did copy okay though!
    It seems as though it's the lead-in / lead-out and disc finalizing process that are the main fail points with the burn operation. I don't know if InfraRecorder is any good or likely to be the problem? Anyway the drive cam with Nero (inc. Linux version) so might give either or both of these a go too, if they don't work either then at least I wont be short of something to rest a mug o' tea on
    @ chris_l (again) -- the Plextor drives do have a "Vari-Rec" feature which allows a user to 'tweak' the laser power / output level so I might try this too.
    @alphaniner -- thanks I've not seen this package before, I'm guessing it's a bit like cdparanoia but for dvds?!
    Thanks for the help!
    (pre-post) UPDATE >>> I've just mounted my Windows partition  in Linux so I'll have a crack at burning the files using cdrtools before I resort to throwing the dvd drive out of the window and chasing it around the yard with a lump hammer

  • Are there any WWI flying games for the mac?

    Are there any WWI flying games for the modern mac? (Computer)
    The only one's I can find are on line.
    Which isn't always an option when traveling.

    You might want to search in the App Store.
    Phil

  • Are there any free templates available for MUSE?

    Are there any free templates available for MUSE?

    Thank you for your help!
    Sent from my T-Mobile 4G LTE Device

  • Hi, are there any free replace program for iMac 27' 2011 mid?

    hi, are there any free replace program for iMac 2011 27' mid? I just read some news which said apple could provide a free replacement of graphics card for imac 2011 mid. becacue imac produced from 2011 to 2012 had some issued in graphic card. is it true?

    If it qualifies, see > iMac (27-inch): AMD Radeon 6970M Video Card Program

  • Are there any monthly calendar templates for Pages?

    Are there any monthly calendar templates for Pages?

    Take a look at the user-contributed templates at iWork Community.

Maybe you are looking for

  • "Either 10 sec with no data" or "Insufficient bandwidth"

    Have been trying for past two weeks since I got this computer to successfully video iChat with someone. I live in Orange County, New York (ISP Cable - Road Runner) and my family lives in Tacoma, WA. They have the identical system I have - they have c

  • PO creator name display in SAP

    Hi Experts, We are using SRM 4.0 classic scenario which is connected to SAP R/3 version 4.7C. Whenever we create PO's from SRM, the me23n display of the PO shows the PO name created by USERID of the user instead of the full name of the user. Where do

  • Question on self service application ... URGENT

    gurus, i have the following requirement :- 1. a vendor comes to site 2. he has not logged in yet 3. he registers himself on the site thru a portal form (the portal form is on the public page) 4. as part of the registration, he/she enters his name, ad

  • JavaFx For Mobile

    hi frndz i am new in JavaFX technology. Can u suggest me ,how i can develop mobile application by using JavaFx thanks in advance

  • Null Pointer eEception

    Hi to all, while running this program,I am getting NullPointer exception and i have the records in login table.I am new to java.Please tell me the solution.Thanks public class displayserv extends HttpServlet      public void doGet(HttpServletRequest