×

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 view inheritance at design time

  • nejjon
  • nejjon's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
More
1 year 1 month ago #11481 by nejjon
view inheritance at design time was created by nejjon
How do you emulate view inheritance at design time using generators.
I have this code with in a views generator generating btn 65 - 80 views spanning different navigation groups and cant use attributes
  private void AddInheritance(IModelObjectView parent, ModelNode child)
        {
            IModelMergedDifferences diffs = child.GetValue<IModelMergedDifferences>("MergedDifferences");//returns null
            IModelMergedDifference diff = diffs.AddNode<IModelMergedDifference>("hgjhg");
            diff.View = parent;
            diff.Strategy= diff.Strategies.First(d=>d.Id()=="Everything");
        }
attribute registrators are a good choice but CloneViewAttribute and ModelMergedDifferencesAttribute are not deterministic in this
senario
More
1 year 1 month ago #11482 by Tolis
Replied by Tolis on topic view inheritance at design time
actually I haven;t used the generators too much, but that is irrelevant.

What is the problem with the code you posted?

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
  • nejjon
  • nejjon's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
More
1 year 1 month ago #11483 by nejjon
Replied by nejjon on topic view inheritance at design time
IModelMergedDifferences diffs = child.GetValue<IModelMergedDifferences>("MergedDifferences"); //returns null
and raises null exception on the next line
  • nejjon
  • nejjon's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
More
1 year 1 month ago #11484 by nejjon
Replied by nejjon on topic view inheritance at design time
IModelMergedDifferences diffs = child.GetValue<IModelMergedDifferences>("MergedDifferences"); //returns null
and raises null exception on the next line

My Goal is to clone parent views and add inheritance.
If it can be done another way even at run-time i will take the solution
More
1 year 1 month ago #11485 by Tolis
Replied by Tolis on topic view inheritance at design time
Can you post more details please as this subject is pretty complex. Can you describe in details with real objects what you are trying to do. e.g I have an Employer that inherits from Person and ??...

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
  • nejjon
  • nejjon's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
More
1 year 1 month ago #11486 by nejjon
Replied by nejjon on topic view inheritance at design time
1.We are using MDI
2.We have 9 navigation groups 7 of which have a similar navigation structure and views just different filters
3.Built in MDI navigation has problems when navigating to views with same view ids and the examples and reference
tickets they provide work well but when you restart the navigation breaks when mdi restore=true.
4.Our solution is to just have all views with different ids using the above approach.
An alternative workaround is welcome
Moderators: expand
Time to create page: 0.316 seconds