×

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

More
1 year 1 month ago #11487 by Tolis
Replied by Tolis on topic view inheritance at design time
so my understanding is that you use the cloneviewattribute to clone views? this apparently creates different instances so then you thought you can use the view inheritance to have one view to support am I right?

and can you post a link to the MDI problem?

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 #11488 by nejjon
Replied by nejjon on topic view inheritance at design time
Exactly
T446027
Steps
1.Open two list views via menu
2.open listview via navigation item
3.Restart app
You cant navigate to one of the restored views
  • nejjon
  • nejjon's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
More
1 year 1 month ago - 1 year 1 month ago #11489 by nejjon
Replied by nejjon on topic view inheritance at design time
Exactly

T446027

Steps
1.Open two list views via menu
2.open listview via navigation item
3.Restart app
You cant navigate to one of the restored views

The related Q487879 presents different problems based still related to mdi restore

I guess there are two issues being discussed here.
For the first one i suggest this solution
1. Modify the Registrator like this
public class AttributeRegistrator{
public AttributeRegistrator()
            :this(true)
        {
        }
        public AttributeRegistrator(bool runtimeOnly)
        {
            this.RuntimeOnly = runtimeOnly;
        }
}
2.In the XpandModuleBase.CustomizeTypesInfo Remove the RuntimeMode check
public override void CustomizeTypesInfo(ITypesInfo typesInfo) {
                      foreach (var persistentType in typesInfo.PersistentTypes) {
                        CreateAttributeRegistratorAttributes(persistentType);
                    }
                }
3.Then modify IEnumerable<Attribute> GetAttributes(ITypeInfo type, AttributeRegistrator registrator) accordingly

this way you can generate attributes at designtime using attributeregistrator

I also suggest you look into the mdi issue
Last edit: 1 year 1 month ago by nejjon.
More
1 year 1 month ago #11490 by Tolis
Replied by Tolis on topic view inheritance at design time
>this way you can generate attributes at designtime using attributeregistrator

Sorry but I do not see how this helps your case. Actually the attributeregistrator was designed for the needs of the FeatureCenter demo many years ago and is still in the framework for the same reason as I do not think it offers more much more than a decoupled way (same as a Controller) to customize the TypesInfo.

What I thought is that you need to create clone views and inherit from a base view, please correct me if I am wrong but where is the problem to use the ModelMergedDifferences and CloneView attributes together as bellow?


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:
  • nejjon
  • nejjon's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
More
1 year 1 month ago - 1 year 1 month ago #11491 by nejjon
Replied by nejjon on topic view inheritance at design time
My task was to generate these attributes rather than hand type them (about 39x8x2 attributes) and have the changes show up at designtime.
Thats a large number.I will customize the TypesInfo in the module.Seems to work for small tests.
Last edit: 1 year 1 month ago by nejjon.
More
1 year 1 month ago #11492 by Tolis
Replied by Tolis on topic view inheritance at design time
        public override void CustomizeTypesInfo(ITypesInfo typesInfo){
            base.CustomizeTypesInfo(typesInfo);
            var typeInfo = (TypeInfo)typesInfo.FindTypeInfo(typeof(TestObject));
            typeInfo.AddAttribute(new CloneViewAttribute(CloneViewType.ListView, "TestObject2_ListView"));
            typeInfo.AddAttribute(new ModelMergedDifferencesAttribute("TestObject2_ListView","TestObject_ListView"));

works as just fine

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
Moderators: expand
Time to create page: 0.394 seconds