November Happy Hour will be moved to Thursday December 5th.

Lee Crowe
Nov 2, 2011
  3807
(1 votes)

ElencySolutions.MultipleProperty v1.3 Released

Last week it came to my attention that there was an issue when using list based properties with my MultipleProperty assembly within a composer function.

The issue that was occurring was that when the list had only one item the changes were not saved/updated but as soon as there were 2 or more items everything worked fine.

Confused smile

This has confused me and to be honest I am still confused by this issue.  There is no logic within my property data or property data control implementation that checks the number of items and works differently based on them.

For some reason when there was only one item and the function data was being saved the PropertyData object was being instantiated but the Property Control was not being created and therefore ApplyEditChanges was never called.

I tried reflecting the composer code but it didn’t really give me any clues.

The issue only seems to occur when there were no other properties on the composer form!

But fortunately I found a solution Smile


The Solution

I am not too happy with the solution outlined below but it seems to do the job so it’s all good as far as I am concerned.

The MultipleProperty assembly now has a new property named MultiplePropertyComposerFixProperty this property has it’s own associated control that inhertis the PropertyString control but the key difference is the table row is set to not be visible.

To fix the issue you will need to add the following code to your Global.asax.cs:

  1: protected void Application_PostMapRequestHandler(object sender, EventArgs e)
  2: {
  3:    MultiplePropertyHelper.ConfigureForComposer();
  4: }

Essentially what this code does is get hold of the Current IHttpHandler and checks whether the handler dealing with the request is the composer property editor page.

If the page is the composer property editor then when the page InitComplete event fires it will use some dirty reflection to add the MultiplePropertyComposerFixProperty property to the Properties and RenderedProperties PropertyDataCollection objects that belong to the PropertyDataFormFactory.

From the small amount of testing I have done this seems to fix the issue.

As I said this is not a clean solution but seems to work.

Installation

The assembly is dependent on EPiServer CMS 6 and onwards.

The easiest way to install the assembly is to get it from the EPiServer nuget feed or you can download it from codeplex.

Release notes

- Minor UI tweaks

- Composer related issue described above.

Feedback

Feedback as always is greatly received.  If there are bugs/issues please feel free to email or twitter me @croweman

Nov 02, 2011

Comments

Please login to comment.
Latest blogs
Optimizely SaaS CMS + Coveo Search Page

Short on time but need a listing feature with filters, pagination, and sorting? Create a fully functional Coveo-powered search page driven by data...

Damian Smutek | Nov 21, 2024 | Syndicated blog

Optimizely SaaS CMS DAM Picker (Interim)

Simplify your Optimizely SaaS CMS workflow with the Interim DAM Picker Chrome extension. Seamlessly integrate your DAM system, streamlining asset...

Andy Blyth | Nov 21, 2024 | Syndicated blog

Optimizely CMS Roadmap

Explore Optimizely CMS's latest roadmap, packed with developer-focused updates. From SaaS speed to Visual Builder enhancements, developer tooling...

Andy Blyth | Nov 21, 2024 | Syndicated blog

Set Default Culture in Optimizely CMS 12

Take control over culture-specific operations like date and time formatting.

Tomas Hensrud Gulla | Nov 15, 2024 | Syndicated blog