Παρουσίαση με Ετικέτες

Partial View inheritance
18 Νοεμβρίου 13 06:13 μμ | tolisss | 0 σχόλια   

A few months ago eXpandFramework released the first version of View inheritance(see http://goo.gl/3YhTa9). In the latest version of the framework (13.1.8.12) it is possible filter the nodes that participate in the inheritance strategy.

The MergedDifference Strategy

To inherit a model view configuration from another view you can use the Model Editor and add a new record in the MergedDifferences collection as illustrated below.

image

Now the great thing is that the Strategy attribute if fully configurable from Application/Options/MergedDifferencesStrategies. By default there are three common strategies Everything, EverythingButLayout, OnlyLayout.

 

In the above image we see how the Everything strategy is defined. It contains all root nodes of both DetailView and ListView nodes.

As you might have guessed the inheritance scenarios are limited only from your imagination. For example in the next image we see the OnlyLayout strategy however what defines the layout may vary so it is possible to inherit from the GridViewOptions node by simply adding a new record in the OnlyLayout strategy (bold).

image

Are there any working examples?

Yes in eXpandFramework source code there are many examples and yes eXpandFramework eats its own food.

The LogicOperationPermissionData

From the LogicOperationPermissionData class starts a deep inheritance tree that defines the Permissions used from all Logic Module depended modules as shown in the next image.

image

Below we see the layout of the base view (LogicRuleOperationPermissionData class).

image

In the next image the next class in the inheritance tree where we note that everything is the same as the base view and we also added the AdditionalViewControls extra tab.

image

The ModelDifferenceObject

In the ModelDifference module you can find the next inheritance tree.

image

The base view.

image

Next is the Role descendant layout, where everything is the same as the base view and we also added the Roles extra tab.

image

The XpandLogonParameters

XpandLogonParameters lives in the Xpand Security module and inherits from the AuthenticationStandardLogonParameters which is an XAF class and lives in the XAF Security module.

Bellow we see the layout of the AuthenticationStandardLogonParameters inside the XAF Security module.

image

Now inside the Xpand Security module we have modified the previous layout of the AuthenticationStandardLogonParameters as in next image.

image

Next, we inherited that layout from the XpandLogonParameters class and added the extra Remember Me item as illustrated below.

image

A cross view custom Merged Strategy

In both model DetailView and ListView nodes you can find the HiddenActions node which can be used to hide actions for a view.

image

Let’s say we want to create a custom merged strategy to distribute the above list of hidden actions (Save, SaveAndClose).

Step 1: Create a View container

We first create a clone of the BaseObject_ListView, name it HiddenActions and add the actions we want to distribute in the HiddenActions collection. I chose the BaseObject_ListView because it can be inherited from all objects.

image

Step 2: Create a Merged Strategy

For this we have to set the NodePath to the HiddenActions node and the ViewType to Any so we can distribute to both DetailViews and ListViews.

image

 

Step 3: Inherit from the HiddenActions view

Go to the view that you want to inherit the HiddenActions view differences and create a MergedDifference record as the one below.

image

Step 4: Close and open again the Model Editor in order to see the inherited HiddenActions

image

Big thanks to everybody that helped making this feature so powerful and even bigger thanks to the XAF developers that work hard to create that wonderful Application Model API.

Δημοσίευση στην κατηγορία: , , , ,
Modular User interface
02 Δεκεμβρίου 10 04:52 πμ | tolisss | 0 σχόλια   
I was discussing with a friend some days ago about his project requirements. Solution had roles but they where fixed (Like Manager, Receptionist etc) Different UI is needed for each role At runtime there should be a way to change the UI using an action He told me that he was aware of eXpand Role models and he thought that they could help his case. Sure I told him ModelDifference module can help , however the approach would be slightly different from the one you had in your mind and here is why: Although the application have roles since there is no login (wanted to change UI from an action ) we could not use ModelDifference Role models.  What I suggested was to use disabled application models and then use eXpand api to just enabled them at runtime. In fact we could create as many application models as the fixed roles are in the updater with a code similar to     public class Updater : ModuleUpdater {         public Updater ( Session session, Version currentDBVersion)

Διαβάστε περισσότερα »

Δημοσίευση στην κατηγορία:
Model Distribution with IO Engine
22 Σεπτεμβρίου 10 02:28 μμ | tolisss | 0 σχόλια   
ModelDifference module is one of the powerfull modules of eXpand . It really helps in managing your application models. Scenario Your application has been already distributed to your client and you no longer have access to the production database. Your client admin is responsible for that. But since development never stops as you know, you client asked for some model modification and some new application models (lets say 10) have been developed by your team and you want to sent them to the admin to update the application. eXpand IO module is the right one for the job Step1—Create a serialization graph to configure which objects/values you are going to export In order to create a serialization graph for an object type you have 1st to create a Serialization Configuration

Διαβάστε περισσότερα »

Δημοσίευση στην κατηγορία: ,
Xaf Models Xaf Models and again Xaf Models
23 Αυγούστου 10 02:02 μμ | tolisss | 0 σχόλια   
This is a sneak peek for eXpand v10. Now it is possible to have multiple models per module as shown in the pic bellow The question is how the use them ? I will say a few words about current approaches. First of all your adiitional models should have Embedded Resource as Build Action Design Time you could use eXpand Model Editor that is based on Devexpress standalone editor. (See here more info about it here) Now when you hit enter or double click an entry in that list the standalone editor will open up and will compine all models but will add as lastlayer the selected one thus forcing model editor to display that model as diffs (bold), and of course when you save is going to use the selected resource file as well. Another question will be how to support child

Διαβάστε περισσότερα »

Δημοσίευση στην κατηγορία: ,
Changing your web Model at runtime with Model Editor and no IIS reset
19 Απριλίου 10 10:59 πμ | tolisss | 0 σχόλια   
I thought I should write for such a case cause seemed interesting to me, and its already implemented at eXpand . How you do it? 1. Create a new eXpanded Application Solution 2. run both the win and the web client so both model will be created and saved at the database byt the modeldifference module. 3. Clone your web model to a role model 4.Assign the roles you want to change (you could assign all roles of the system if you want so the model will applied everywhere) 5. Make your changes (eg. apply a different navigation menu) 6. And since that model is going to be loaded every time a user log on to the system so you only have to log on again to your application in order the model to be refreshed and reloaded

Διαβάστε περισσότερα »

Δημοσίευση στην κατηγορία:
Merge UserModel with Application Model
22 Οκτωβρίου 09 06:23 μμ | tolisss | 0 σχόλια   
By Martin Praxmarer Tired of making all DetailView Layout and ListView Layout in the ModelEditor instead at Runtime where you immediatly see the results? The Solution is eXpands ModelDiffs Module. Setup: Create a new User and give it a name like “ModelAdmin”. Next Create a new Role “ModelAdmin Role” – and create a new Model Combine Permission. Set the Modifier to “Allow”, and set the Difference Name to the Name of your Application Model: Now assign the created User to this new Role. Last step is to open the User Difference Model, and set the Model to “Non Persistent” since we dont want to save User changes here. Thats it. Now you can start your Application, make changes in Detail- and ListViews, and when you exit the Application all changes are merged to the

Διαβάστε περισσότερα »

Δημοσίευση στην κατηγορία:
Saving settings to database instead of cookies
14 Οκτωβρίου 09 01:14 μμ | tolisss | 0 σχόλια   
  THE PROBLEM –> HTTP 400 Bad Request (The data is invalid) Xaf provides peristent of your web listview setting to cookies using Options | SaveListViewStateInCookies attribute in the Application Model. But due to the limit in request buffer size of IIS your web browser will receive a HTTP 400 Bad Request (The data is invalid) when you overcome it. DevExrpess suggest you either persist individual listviews in order you never overcome that limit or as Microsoft also suggested here to add a registry value to raize that limit. SOLUTION ModelDifference module provides the Options | SaveListViewStateInDataStore that can persist your listview settings to your user model and thus to the database and since your model is persistent also at database Technorati Tags:

Διαβάστε περισσότερα »

Δημοσίευση στην κατηγορία: , ,
ModelDifference Module
07 Οκτωβρίου 09 12:40 μμ | tolisss | 0 σχόλια   
DictionaryDifferenceStore has been refactored and added the following features Localization Support Multiple application support Ability to change application model without restarting User,Role differences for web and win environments Persist web settings instead of cookies to the database Ability to work as a standalone module without  having to inherit eXpand.ExpressApp.Win.WinComponent/WebComponent as you saw in previous videos Martin Praxmarer provided great help in that refactoring and I am going to host him here to speak on some of the above subjects and I ll speak on the rest Here are the issues implemented / fixed issues see also: How to get eXpand latest version Technorati Tags: ModelDifference , eXpand

Διαβάστε περισσότερα »

Δημοσίευση στην κατηγορία: ,

Search

Go

Το Ιστολόγιο

Ιστορικό Δημοσιεύσεων

Συνδρομές