London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

Using XForms for displaying a query on all pages (setting MainXForm as dynamic property)

Vote:
 
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
#12481
Dec 21, 2005 14:25
Vote:
 
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; } }
#14342
Dec 28, 2005 15:44
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.