November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Sure, try with this code:
[UIHint("Folder browser ")] [BackingType(typeof(PropertyFolderBrowser))] public virtual string Folder{ get; set; }
Cheers
Frederik
Hi,
Thanks, that does register correctly, but there are still a few problems.
1) On the editing screen the control displays a disabled textbox with text "Click the button to edit" and button with text "...", rather than showing the existing value like in the screenshots from epicode. This would be rather annoying for users as they could not see the existing value. Is there some other attribute I should have?
2) When I click the button to get the folder selector popup, and the subsequent button to browse for a folder, this popup is missing all it's styling. This is because the dialog gets 404s for a couple of CSS files. I'd say this missing CSS is causing the dialog save button not to work (using Chrome).
Looking at the code for FolderBrowserDialog.aspx, it's using a path from a variable named ShellPath, which comes from a VPP named EPiServerShell. This VPP did not exist in my config. I've tried to create the VPP as follows, but these CSS resources still result in 404s. Does the config look correct or am I missing something obvious:
<add virtualPath="~/EPiServerShell" physicalPath="C:\Program Files (x86)\EPiServer\Framework\7.0.859.1\Application\UI"
name="EPiServerShell" type="EPiServer.Web.Hosting.VirtualPathNonUnifiedProvider, EPiServer.Framework" />
I'm wondering if there is some special permissions that blocks files from this location by default?
Thanks,
Andy
Andy have you setup a corresponding location element in web.config?
http://world.episerver.com/Blogs/Robert-Dougan/Dates/2010/12/Setting-Up-a-New-VPP/
Hi,
No, I'd forgotten to do that. I've now configured the web.config:
<location path="EPiServerShell">
<system.webServer>
<handlers>
<add name="webresources" path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" />
<add name="wildcard" path="*" verb="*" type="EPiServer.Web.StaticFileHandler, EPiServer.Framework" />
</handlers>
</system.webServer>
</location>
and VPP in episerverframework.config:
<add name="EPiServerShell" virtualPath="~/EPiServerShell/" physicalPath="C:\Program Files (x86)\EPiServer\Framework\7.0.859.1\Application\UI" type="EPiServer.Web.Hosting.VirtualPathNonUnifiedProvider, EPiServer.Framework" />
also changed the paths in FolderBrowserDialog.aspx so that I don't get 404s any more:
<link href="<%= ShellPath %>ClientResources/EPi/themes/legacy/Shell.css" type="text/css" rel="stylesheet" />
<link href="<%= ShellPath %>ClientResources/EPi/themes/legacy/ShellLightTheme.css" type="text/css" rel="stylesheet" />
However the problems still remain. The folder does not show on the main editing screen, and the styling is mostly missing in the select folder dialog.
I also noticed that there are a few JavaScript errors being reported in the select folder tree:
These will be what is stopping Chrome from processing the Save button. I don't get any JavaScript errors on the main editing screen so not sure why the selected folder doesn't display.z
I think I'll have to stick with a plain text property for now unfortunately as it doesn't look like the folder browser works quite right under v7.
Thanks for your help though!
Andy
Hi Andy!
The problem is that fireEvent is only compatible with IE. (See: http://help.dottoro.com/ljvtddtm.php). You can use jQuery's trigger to fire the onchange event instead, so you need to change 3 lines of code in ScriptHelper.cs:
Change the lines:
statusTextboxCtrl.fireEvent('onchange');
to:
$(statusTextboxCtrl).trigger('onchange');
and of course import jQuery in the beginning of scriptString. :)
It fixes the problem for Chrome and Firefox!
/Masoud
Any chance the version on NuGet could be fixed?
I'd fix myself if I had access to the source code.
Thx, Mike
Hello
I have a problem with the Folder Browser Dialog on WebForms.
I can't get the OnSelectedNodeChanged event to fire at all.
Seems to be some problem with the datasource?
Hi,
I'm looking for an example of using the Meridium.FolderBrowserProperty NuGet package to implement a folder selection property in an EPiServer 7 MVC site. I've got it installed, but can't get the editing UI to display the popup folder selector. I suspect I'm not registering a UIHint or similar problem.
Can anyone provide an example please?
thanks,
Andy