locked
HTML client Details Screen using parameterized query not displaying query result in screen fields RRS feed

  • Question

  • I have an RIA service with a entity something like this:

        public class SystemProfileData
        {
            [Key]
            public string MerchantProfileName { get; set; }
            public string Street { get; set; }
            public string City { get; set; }
            public string StateProvince { get; set; }
    // much more stuff
        }


        public class RiaSisService : DomainService
        {
            [Query(IsDefault = true)]
            public IQueryable<SystemProfileData> GetSystemProfileData()
            {
      List<SystemProfileData> list = new List<SystemProfileData>();
               ... // add items to the list with only a few fields populated
               return list.AsQueryable();
            }

            [Query]
            public IQueryable<SystemProfileData> GetSystemProfileDataDeep(string profileName)
            {
      List<SystemProfileData> list = new List<SystemProfileData>();
               ... // add single item to the list but with more fields populated
               return list.AsQueryable();
            }

        }


    The second query goes much deeper in populating SystemProfileData from an external service, takes much longer, and is used only to populate a details screen. The queries both work.

    I have a DetailsScreen that has the GetSystemProfleDeep query on it, with the profileName parameter having the "Is Parameter" checkbox checked to indicate that the query parameter is also a screen parameter.

    I also have a BrowseScreen that uses the (faster) GetSystemProfileData query. The Item Tap for the BrowseScreen Tile List is hooked up to the showDetailsScreen method and the parameter for the screen (profleName) has the value SystemProfileDatas.selectedItem.MerchantProfileName.

    When I click on the Tile List in the BrowseScreen, the DetailsScreen appears as expected and the profileName parameter (dragged to the screen for debugging purposes) has the correct value. 

    Also, the SystemProfileDataDeep query is called on the server code with the correct parameter, and I can verify there that the JSON query result is being populated and returned as expected by using DevTools in Chrome.

    The only problem is that none of the fields returned by the query are being populated on the screen. The labels are there and the profileName parameter is populated correctly, but none of the fields on the screen from the query are being filled.

    It is as if the query result is not updating the fields on the screen.

    This seems a very simple case to me. Is there a way to refresh the screen with the query? Or am I missing something?

    Thanks in advance. 

    Kenneth Clubb

    Sunday, December 28, 2014 11:13 PM

Answers

All replies