Hi
I’m trying to display a "short query" in a common listing that appears on all pages in a site. My problem is that the EPIeditor can’t handle a dynamic XForm property type. You get a java-script error. The DynamicProperty page is missing some js code.
Has anyone suggestions how i can put a guery in this global way (the simplest way…)
/Janne
Just wanted to let you know that we've now registered it as a bug that the XForm dialog doesn't work if used as a dynamic property.
What you could do is to create your own property to use as a dynamic property. There you change the dialog. For example, instead of the usual dialog, just create a dropdown list with all existing XForms to chose from. You won't be able create new forms, but you will be able to use any XForm created on a normal page with the standrad property.
Create a class and inherit from PropertyXForm. Override the method CreateChildControls with something like the following.
public override void CreateChildControls(string renderType,System.Web.UI.Control container)
{
switch(renderType)
{
case "edit":
/*
Use XFormStatisticsDB.GetAllXForms() to get a list of all XForms. Create a dropdown list with those as elements.
*/
CopyWebAttributes(container,dropdown);
container.Controls.Add(dropdown);
container.Controls.Add(CreateParseValidator(dropdown));
break;
default:
base.CreateChildControls(renderType,container);
break;
}
}