Finally, to solve the creating/editing object issue I followed the suggestions made and used pageConfigurations.
I'll post here what I did, just in case someone has to do a similar thing or has a suggestion to add.
.
First, as my application did not use pageConfigs, I had to change (in templates and pages code) all of
D2W.factory().
editPageForNewObjectWithEntityNamed(entityName(), session());
with
D2W.factory().
editPageForNewObjectWithConfigurationNamed("Create"+entityName(), session());
Similarly all
D2W.factory().
editPageForEntityNamed(object().entityName(), session());
with
D2W.factory().
pageForConfigurationNamed("Edit"+entityName(), session());
To reduce the number of rules to write, I used the like operator:
(pageConfiguration like 'Edit*') => task = 'edit'
(pageConfiguration like 'Create*') => task = 'edit'
And for each entity I created a rule:
(pageConfiguration like '*Customer') => entity = "Customer" (Entity Assigment)
So that it matches "EditCustomer" and "CreateCustomer".
I don't like much this part, but I suppose that if I have 100 entities, it is better to add a few rules for each one, than having them freezed or worse.
Finally, with all that set, I used rules like the one below to make those small differences between creating and editing an object.
As an example, here is one to make the id attribute readonly:
(pageConfiguration='EditCustomer' and propertyKey = 'id') => componentName = "D2WDisplayString"
If someone has any suggestions or notes to add I would like to hear them.
Thanks for all the help, it was very usefull.