Today I created a rendering component which has around 10 fields but the whole component is not editable in Experience Editor. I decided to use Edit Frame from Glass Mapper. The BeginEditFrame wants all the editable fields as a parameter. But for around 10 fields not that comfortable.

The following code snippet creates an Edit Frame only with 1 field.

Let’s implement a method which gets all the fields from your model.

This method gets the model property names with some reflection magic and creates the lambda expressions dynamically.

You can see that the method has a limitation to allows only IGlassBase interfaces. It is needed to make it more safe as this interface contains all the base properties for a Sitecore item.

Let’s use this util method in our view.