I'm currently trying to develop a custom property that can display a list of built-in EPiServer properties in EditMode.
I know the problems regarding saving the data once the fields are displayed but this should be possible to do.
My main problem is that I want to create a custom property which needs to display the propertydata fields from a different pagetype. But I do not want to save a page of this different pagetype as it probably will clutter the pages up...
Is it possible to do this - and how?! Every time I try to do this I get a null-pointer exception due to that CurrentPage is not set.
If I've understood what you want to do correctly, I would rather advice you not to do that. Properties should be tied to a pagetype no matter what.
Do you mean reusing controls like the one for selecting a page in EPiServer, inside your custom control?
Sounds like my Itera.MultiProperty
This is a way of grouping properties together and let them act as one property.And a property shouldn't always be tied to a page type.. Dynamic properties aint!!!
And dynamic datastore will let us make property on the fly...
I have looked at the Itera.MultiProperty and it is very much alike that... but from what I can see from the code in coderesort they are not used native but wrapped. So yes Frederik - reuse controls.
And you are right - they should be tied to a pagetype, and that is actually also what I want, but I want to create a hidden page to tie the propertydatas to - so it is not the actual page that I'm editing, but another hidden page. I could probably do it by using an IFrame, but I'm not that fond of IFrame-solutions.
Couldnt one soluton be that to add yourself to the dataForm.Populate and add your own properties there based on you hidden page. You could prefix those properties with pageID then you can attach yourself to the SavingPageEvent and remove those from that page and save them in the hidden page
I finally got it to work as I wanted... I just had to implement a class that inherit from System.Web.UI.WebControls.Panel (or what-ever at least a controlcontainer) and implemented EPiServer.Core.IPageSource - and then add the list of properties to this panel and it worked as it should...
Or at least it did for now ;-)