iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi,
I am trying to reuse a view model across multiple tabs in a MultiPageViewModelBase subclass and simply make it base its data on a parameter, but no matter what I try, the parameter data is always null in my viewmodel's Navigated() method.
Simple reproducible scenario:
public class MyTabViewModel : MultiPageViewModelBase, IChildViewModel { public MyTabViewModel() { var parameter1 = "Section 1"; var parameter2 = "Section 2"; var items = new List<NavigationItem>(); items.Add(new NavigationItem("First Tab", new NavigationTarget(typeof(MySectionViewModel), new NavigationParameter(parameter1)))); items.Add(new NavigationItem("Second Tab", new NavigationTarget(typeof(MySectionViewModel), new NavigationParameter(parameter2)))); this.Items = items.ToArray(); } } public class MySectionViewModel : DataListViewModelBase<MyItem, IMyRepository>, IChildViewModel { public override void Navigated(NavigatedParameter parameter) { // parameter.Data is always null! } }
Another issue: an overridden ShouldNavigate() in MyTabViewModel never gets called.
Any help would be greatly appreciated, but it seems like a bug that is really blocking our project progress, because we need this approach for dynamic data which isn't known beforehand.
The problem, parameter.Data is always null, has been forwarded to Crosslight development team and filed under CROSS-522.
I will keep this thread updated with any news I heard from the team regarding CROSS-522.
Edited on August 26, 2014 11:00 PMReason: Update status of CROSS-522
I'd like to inform you that a nightly build hotfix is available which resolves the problem, NavigationParameter.Data always return null. The nightly build is available in here.
Please have the nightly build hotfix evaluated on your end and let me know whether it helps or not.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname