×

Notice

The forum is in read only mode.
×
Getting new Releases

To get notified on new releases you may follow us on twitter @expandframework or subscribe in our main RSS feed.

Topic-icon Rental Calendar

  • georgeloseby
  • georgeloseby's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
More
4 years 8 months ago #7137 by georgeloseby
Replied by georgeloseby on topic Rental Calendar
Can I send it to your email address?

This attachment is hidden for guests.
Please log in or register to see it.

This message has an attachment file.
Please log in or register to see it.

More
4 years 8 months ago - 4 years 8 months ago #7138 by Tolis
Replied by Tolis on topic Rental Calendar
Let me give you a brief on how this works

The FilteredColumn and the DataSourceView properties are lookups, so this means that there should be a datasource for them. So you locate the owner interface as shown bellow.




So we are talking about the IModelDashboardViewFilter . By looking the attributes you can tell that FilteredColumns is one of the lookup datasources. Therefore you should expect a method named as Get_FilteredColumns in the IModelDashboardViewFilter domainlogic . Finally as you can see in github.com/expand/eXpand/blob/master/Xpa...shboard/Model.cs#L55 the Get_FilteredColumns will enumerate only the DomainComponent members. So I guess your class does not have such a member.

To get notified on new releases follow us on twitter @expandframework or subscribe RSS feed. I am also available @tolisss . Also see How to debug eXpand
Attachments:
Last edit: 4 years 8 months ago by Tolis.
More
4 years 8 months ago #7139 by Tolis
Replied by Tolis on topic Rental Calendar
the feature is about cascading views so in other words you need to classes with a reference to each other. The lookup will enumerate the reference properties

To get notified on new releases follow us on twitter @expandframework or subscribe RSS feed. I am also available @tolisss . Also see How to debug eXpand
  • georgeloseby
  • georgeloseby's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
More
4 years 8 months ago #7141 by georgeloseby
Replied by georgeloseby on topic Rental Calendar
Please forgive me but it feels like there something fundamental missing in my knowledge here.
I see that the code you are mentioning is already implemented in the xpand persistent.base.

Are you suggesting that I re-implement the code in Model.cs and DasboardInteraction.cs into my project?


if you are not suggesting this, rather that I just use the code in my project, how would I apply this to my current xaf project (sorry again if this is a simple question)

Thanks
More
4 years 8 months ago #7144 by Tolis
Replied by Tolis on topic Rental Calendar
hmm let me try a difference approach. In general when you see a working feature you need to study it in place and then try to replicate in your own project. So ask your self the following questions

1. Where the feature works?

in XVideoRental Calendar_Dashboard view there is a Calendar item using as view the Rent_ListView_Calendar view and the Rent Bo

2. What values are in the lookup of the Calendar Item.

These are all the reference properties of the Rent BO

so in your case you should expect to see all the reference properties of your Employee class or nothing if no props exist

To get notified on new releases follow us on twitter @expandframework or subscribe RSS feed. I am also available @tolisss . Also see How to debug eXpand
  • georgeloseby
  • georgeloseby's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
More
4 years 8 months ago #7145 by georgeloseby
Replied by georgeloseby on topic Rental Calendar
Hi Tolis
I really want to do just about exactly what you are doing with your filter. For now I don't even need to interact with the model I am just trying to hard code it in controller just to see this working.
I have an employees class which inherits from IResource , and I have a Event class which contains a collection of resources.

I have used a standard View controller to see this working.

protected override void OnViewControlsCreated()
{
base.OnViewControlsCreated();

SourceItem = (DashboardViewItem)View.FindItem(FilterSourceID);
TargetItem = (DashboardViewItem)View.FindItem(FilterTargetId);

if (Frame.GetController<RecordsNavigationController>() != null)
{
// TargetItem.InnerView.GetCurrentObjectCaption
TargetItem.Frame.GetController<RecordsNavigationController>().Active.SetItemValue("DashboardFiltering", false);
if (SourceItem != null)
{
ListView innerListView = SourceItem.InnerView as ListView;
// SchedelistView
if (innerListView != null)
{
innerListView.SelectionChanged -= innerListView_SelectionChanged;
innerListView.SelectionChanged += innerListView_SelectionChanged;
}
}

}


}


private void innerListView_SelectionChanged(object sender, EventArgs e)
{
FilterDetailListView((ListView)SourceItem.InnerView, (ListView)TargetItem.InnerView);
}

private void FilterDetailListView(ListView masterListView, ListView detailListView)
{
detailListView.CollectionSource.Criteria.Clear();
List<object> searchedObjects = new List<object>();
foreach (object obj in masterListView.SelectedObjects)
{
searchedObjects.Add(detailListView.ObjectSpace.GetKeyValue(obj));
}



if (searchedObjects.Count > 0)
{
CriteriaOperator criteria2 = CollectionSource.EmptyCollectionCriteria;

// Guid empId = new Guid(searchedObjects[0]);

criteria2 = CriteriaOperator.Parse("ResourceId = ?", searchedObjects[0]);
// detailListView.CollectionSource.Criteria[CriteriaName] = new InOperator("ResourceId", searchedObjects);

// detailListView.CollectionSource.Criteria[CriteriaName] = CriteriaSelectionOperator(masterListView, "Employee", "ResourceId");

detailListView.CollectionSource.Criteria[CriteriaName] = criteria2;

}




}

As you can see from the code above I have tried filtering on a single resourceId but this is not having any effect on the view, this is why I think there is something else I am missing here. I then tried your implementation with the Model interaction but I am having some other issues with that for now I would just really like to see this working.

Thanks again for your assistance.
George
Moderators: expand
Time to create page: 0.326 seconds