1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / CoverFlowWidget demo

CoverFlowWidget demo

2 posts, 0 answered
  1. Daniel
    Daniel avatar
    6 posts
    Registered:
    17 Aug 2010
    01 Oct 2010
    Link to this post
    Hi!

    Trying to run the CoverFlow demo in beta2 (upgraded the project to .net4.0, changed the telerik references to the new ones from beta2)

    But it does not work...

    Getting this error:

    line 1:138: unexpected token: ["",<1>,line=1,col=138]
    Original Query: DEFINE EXTENT extnt FOR Telerik.Sitefinity.Libraries.Model.Image; SELECT * FROM extnt AS t1  WHERE t1.appName =  $1 AND t1.Album.Title_ =

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    01 Oct 2010
    Link to this post
    Hi Daniel,

    Please modify GetImages method as shown below

    private List<Hashtable> GetImages()
     {
         List<Hashtable> results = new List<Hashtable>();
     
         var t = this.AlbumTitle;
         var manager = LibrariesManager.GetManager(LibrariesManager.GetDefaultProviderName());
         if (!String.IsNullOrEmpty(t))
         {
             var al = manager.GetAlbums().Where(a => a.Title == t).SingleOrDefault();
             var authority = this.GetAuthorityUrl();
             if (al != null)
             {
                 var useLive = al.Items.Where(im =>im.Status == Telerik.Sitefinity.GenericContent.Model.ContentLifecycleStatus.Live);
                 foreach (Telerik.Sitefinity.Libraries.Model.Image v in useLive)
                 {
                     Hashtable table = new Hashtable();
                     table.Add("Url", authority + v.MediaUrl);
                     table.Add("Title", v.Title.ToString());
                     results.Add(table);
                 }
             }
         }
         return results;
     }

    The problem comes from the evaluation of AlbumTitle when directly used in a query. You have to expose it in a separate variable which should fix the issue. My code above just represents another way to get the items.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered