ImageSelector used in Widget causes Designer to render blank

Posted by Community Admin on 04-Aug-2018 14:22

ImageSelector used in Widget causes Designer to render blank in SF 5.x

All Replies

Posted by Community Admin on 17-Apr-2013 00:00
Hi there, 

I'm developing a widget with an image selector amongst other controls. The designer comes up blank when you click 'edit' on the widget. Eliminating one possibility at a time I got to this line in the Designer.cs file: 
descriptor.AddComponentProperty("imageSelector", this.ImageSelector.ClientID);

When I remove this line the designer shows the other inputs like a regular textbox and the HTMLField of Sitefinity. Both of these controls are storing and retrieving data. 

In the browser console the following error appears when the line above is present: 
Uncaught TypeError: Cannot call method 'apply' of undefined.

Anyone else come across this in SF 5.x? 
The actual version of SF is 5.4.4000.0

Regards,
Jacques
Posted by Community Admin on 22-Apr-2013 00:00
Hi Jacques,

We have addressed the issue int he support thread you had open on this topic, you can find our response there.
For your convenience I'm also pasting our reply below:
"
Actually FieldControls have been designed to work primarily with the backend item create/edit forms, and using them on a control designer might not always result in the proper working behavior.

On the out of the box designers where we have the ImageSelection option exposed, we use the EditorContentManagerDialog - a dialog that support selecting/uploading Images/Videos/Documents items.

If you're using Sitefinity Thunder to create the designer for your control you just need to have a property of type Guid, and Thunder will allow you to select the interface for managing data with this field (ImageSelector, VideosSelector or DocumentsSelector). For your convenience I'm attaching to this reply a sample designer which has the ImageSelector implemented, hope you find it useful.
"


Kind regards,
Boyan Barnev
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Posted by Community Admin on 08-Jul-2013 00:00
How do you setup the files in the .Zip file example?

I have created a sample VS 2010 project, to learn how this code works, but I cannot get it to run.

Can someone please list step-by-step instructions on how to install this code?

Do you create two widgets for each .ascx file (ServiceItem and ServiceItemtDesigner)?

Is ServiceItem.ascx ment to call ServiceItemtDesigner.ascx some how? If so, how do you create the event to fire ServiceItemtDesigner.ascx  to appear?
Posted by Community Admin on 08-Jul-2013 00:00
"If you're using Sitefinity Thunder to create the designer for your control you just need to have a property of type Guid, and Thunder will allow you to select the interface for managing data with this field (ImageSelector, VideosSelector or DocumentsSelector). For your convenience I'm attaching to this reply a sample designer which has the ImageSelector implemented, hope you find it useful."

How do you do this in Thunder? I have not used Thunder enough to fully understand how to create designers for controls.
Posted by Community Admin on 08-Jul-2013 00:00
Another thing that may help, is that this is NOT the widgets controller, but in the widget itself. It is designed to display along with the widget's contents, not as part of it's property display in the control designer.

So I guess this is why a lot of the examples are not working for me, as I'm trying to use them in the widget itself, and the code assumes I am using the designer associated the widget?
Posted by Community Admin on 11-Jul-2013 00:00
Hi,

Regarding Sitefinity Thudner, please review this section of our documentation:
http://www.sitefinity.com/documentation/documentationarticles/sitefinity-thunder

Could you find useful information in the articles available in this URL:

http://www.sitefinity.com/documentation/documentationarticles/creating-widget-designers

Furthermore, when you open your project in Visual Studio you will see a Thunder starting page, go to Create Sitefinity items and select Dynamic items field selector. You could watch the video available there and find some additional information below.

Sitefinity Thunder consists of two parts:
1. The Visual Studio extension which you are using in your screenshot.
2. The Sitefinity server module which you can install using the VS extension from the VS menu -> Telerik -> Sitefinity Thunder -> Install Sitefinity Thunder Module. You need to reinstall the module every time you update your VS extension.

Here are the steps which you should take to get Thunder working:
1. Create your Sitefinity web app project.
2. Host it and then open it through the browser to initialize the project and create the database.
3. Once you have your Sitefinity project running, open Visual Studio to install the Thunder server side module in your project.
3.1. You can install the module by choosing Telerik -> Sitefinity Thunder -> Install Sitefinity Thunder Module from the VS menu.
3.2. Alternatively, you can use the Thunder Start Page which should start automatically by default and select Install Thunder Module in the home page. Then click on the Install Thunder module button located in the bottom of the page.
4. In the dialog which appeared in step 3, select the location of your Sitefinity project and then press install.
5. Now you should create a connection to your project. Select Telerik -> Sitefinity Thunder -> Connection Settings from the VS menu or go to the Manager Connections page in the Thunder Start Page. Click on the Add button and create a connection by using a Connection name (friendly name), root URL to your site, administrator username and password.

You should repeat steps 3 and 4 whenever you update your Thunder Visual Studio extension so that the Thunder Sitefinity server side module is up to date.

Regards,
Stefani Tacheva
Telerik
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
This thread is closed