RadAsyncUpload Not Uploading in ControlDesigner

Posted by Community Admin on 03-Aug-2018 18:00

RadAsyncUpload Not Uploading in ControlDesigner

All Replies

Posted by Community Admin on 09-May-2011 00:00

RadAsyncUpload Not Doing its Job
The RadAsyncUpload worked for me at one point in the ControlDesigner but now it doesn't seem to upload anything. The other problem is that it seems to not leave any evidence of its inability to do so. This is becoming quite frustrating after trying just about everything to get the job done. 

Posted by Community Admin on 12-May-2011 00:00

Hi jwize,

We need more details in order to find out what the problem is:

1) When it stopped to work ? 
2) Can you reproduce the problem with installing the application on another machine?
3) Do you reproduce the problem when you host the project on IIS and Cassini web server?
4) Can you send us a movie that contains reproduced problem and if possible with enabled firebug console?
5) The easiest way to find out what is the problem (in case we manage to reproduce it and the problem is not related to hosting infrastructure) is to send us backup of your database and App_Data folder

Thanks in advance for your answers!

Kind regards,

Milena
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 12-May-2011 00:00

Widget Designer Requires a Javascript Class
I Figured out the problem. This was related to setting the ClientIDMode=Static and setting the id explicitly on the hosting ServerControl ( inheting from SimpleView) and then setting the ID property explicitly. I did this because I wanted to be able to use the Sys.Application.findComponent(id) from the client-side. When you create a widget you need to author a class in javascript for updating and retrieving values from the Designer. Unfortunately, there is no way to way easily get the component. Setting the ClientIDMode to static and setting the ID forced the component to send a   id = "whateverISetTheIdToInTheClass" into the $create method. Then I could easily find the component.

function fileUploaded(sender, args)
    // Do something to the designer.
    var myComponent = $find("whateverISetTheIdToInTheClass");

This looked good at first but ultimately broke the RadAsyncUpload.

Solution for doing something on the designer component.
I ended up doing it a little different when I found the static id solution was a miss. I added a method onto the component that I needed to execute and then executed it if it was available. That works but it would be nice to have the RadAsyncUpload and other server controls take into account the need for setting the id explicitly and/or add an attribute on the DesignerClass that renders the $create with an id or your choosing. 


var galleryDeisgner = null;
var components = Sys.Application.getComponents();
for (var i = 0; i < components.length; i++)
    if (components[i].set_fileUploadImage != null)
        components[i].set_fileUploadImage(args.get_fileName());


Any other comments are welcomed.

Posted by Community Admin on 17-May-2011 00:00

Hi Jaime Weise,

 I do not understand entirely scenario you are describing, probably if you send your sources and explain with  more details what is the purpose it should be more clear what are you trying to achieve.

Here is just an assumption what could be your problem:

If I were creating server control and id of a component is needed on client I would rather inherit from
SimpleScriptView and send information at GetScriptDescriptors like:
            if (this.DescriptionControl != null)
                descriptor.AddElementProperty("descriptionElement", this.DescriptionControl.ClientID);


All the best,
Milena
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

This thread is closed