version and forms

Apr 3, 2009 at 5:24 PM
Edited Apr 3, 2009 at 9:37 PM

First of all. Thank you for creating something M$ should have created in the first place. sigh!!!
Anyhow, here is a scenario which prevents us from deploying

1.- Edit NEWFORM.ASPX  for one of the lists containing the bronyx column.  (Careful when editing this form, if you know what are you doing you'll know that you must first hide the original form part and insert a custom list form).
How to customize NEWFORM.ASPX

2.- Using design mode, select the "webpartpages:ListFormWebPart" right click and select "web part properties".   You will get an error.  

3.- Error follows
     "Trying to use an SPweb object that has been closed or disposed is no longer valid."

Another method to get an error

1.- Again editing NEWFORM.ASPX  of a list containing the bronyx column.

2.- Try adding a new item using IE6+.

3.- An error follows.
Apr 3, 2009 at 5:30 PM
Edited Apr 3, 2009 at 9:31 PM
The reason I have to modify the forms is because of those tiny default lookup forms don't cut it...

Possible workaround to edit webpart settings.

1.- Switch to code mode and change the webpart settings.

Please note that despite this you will still have issues launching the new modified form. IE6-8 still give me the error "Trying to use an SPWeb object that has been closed or disposed and is no longer valid." (test this with a list containing more than 19 items)

Ironically, Google Chrome and Firefox are able to launch the form. Heck, even ubuntu + FireFox can launch the form.  now, that's really odd...

Apparently IE gets special treatment...

    protected override void CreateChildControls() {
      // 19 items is limit for switching from
      // standard dropdown to SharePoint fancy dropdown
      if (base.Field != null && base.ControlMode != SPControlMode.Display) {
        if (!this.ChildControlsCreated) {
          this.Controls.Add(new LiteralControl("<span dir=\"none\">"));
          FilteredLookupField field = base.Field as FilteredLookupField;

          if (_availableItems != null && _availableItems.Count > 19 && IsExplorerOnWin()) {
          else { CreateStandardSelect(); }
          this.Controls.Add(new LiteralControl("<br /></span>"));