Sharepoint 2007 Webparts and Ext.net.ResourceMgr.init issue

Page 1 of 2 12 LastLast
  1. #1

    Sharepoint 2007 Webparts and Ext.net.ResourceMgr.init issue

    Hi,

    I'm having a strange issue with two sharepoint webparts I have built that both contain ext.net components. The resource manager is loaded in the masterpage.

    When both web parts are loaded on the same page with WebpartA first and WebPartB second everything works fine.

    If I logically move WebPartB to be ordered first in the web part zone, all of the content disappears from WebPartA (I am left with empty placeholder divs for the panels). If I check the code I can see that the controls from WebPartA are now missing from the Ext.net.ResourceMgr.init() call.

    It's probably something simple but can anyone help point me in the right direction? If I reorder the webparts back everything returns to normal again.

    WebPartA has a store, panel and dataview. WebPartB has a store, panel and gridview.

    Many thanks,
    Andy.
  2. #2
    Interestingly I re-created WebPartA and now the problem is reversed!

    Is it relevant that the two web parts are in the same assembly? I'll try seperating them out.

    FYI I realise I didn't mention before I'm using Ext.NET v1.2.0.21945 and VS2010.
  3. #3
    I tried seperating the web parts out into seperate assemblies and the problem remains.

    Can anyone provide any further suggestions on this? I'm pretty much out of ideas.
  4. #4
    For the benefit of others:

    I've not identified the exact issue, but do have a workaround/solution.

    As I stated previously - load a resource manager at the top of your masterpage. Then at the very bottom add any ext control - I've added a container. This stops Ext from thinking it has finished generating controls before it should and your webparts will all render correctly in any order :)

    Please mark as solved.
  5. #5
    Hi @Zappa,

    Thanks for the sharing the workaround, it might really help someone on the forums in the future.

    We would like to investigate the initial problem, but could you provide a sample to reproduce?
  6. #6
    I can't really provide an example as it's specifically when using Sharepoint 2007/2010 and loading any Ext.NET components within multiple web parts on the same page.

    It's something to do with the order the components are loaded by sharepoint being out of sync with the order that Ext thinks the components are loaded. I don't know exactly what it is as I don't know enough about how either of them work under the hood.

    I can tell you this was not a problem when deploying an asp.net webforms application to run within sharepoint - only webparts.
  7. #7
    Quote Originally Posted by Zappa View Post
    I can't really provide an example as it's specifically when using Sharepoint 2007/2010 and loading any Ext.NET components within multiple web parts on the same page.
    Not sure that I understand. We just need something to test with :)
  8. #8
    Well, I can provide you a step by step:

    Create an empty sharepoint project in Visual Studio 2010
    Add two visual web parts to the project
    In the page_load event of each web part check for an existing resourcemanager and if none exists add one to the page
    Add any Ext.Net controls to the web part (such as a panel)
    Create WSP and deploy to Sharepoint 2010 (or 2007)
    Add both web parts on the same page
    In one order the controls will display within the web parts. In the reverse order they will not.

    The coding/content of the web parts themselves is irrelevant. All you get is div placeholders.
  9. #9
    Honestly, I have never worked with SharePoint yet.

    When I'm creating a new project, I'm getting:
    Click image for larger version. 

Name:	Sharepoint.JPG 
Views:	143 
Size:	20.9 KB 
ID:	3874

    Can I somehow avoid installing the SharePoint server, but have a possibility to test? I just try to don't install any software which I can avoid to install.

    If not, what way would you recommend to install the SharePoint server with minimum required configuration?
    Last edited by Daniil; Mar 01, 2012 at 6:46 PM.
  10. #10
    Unfortunately you do need to install sharepoint. You can install the foundation edition from here: http://www.microsoft.com/download/en...s.aspx?id=5970

    You need to be running Windows Server 2008 or 2008 R2 though.
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 0
    Last Post: Aug 25, 2010, 8:23 AM
  2. Windows 2007 - window.show not working
    By Tbaseflug in forum 1.x Help
    Replies: 0
    Last Post: Apr 16, 2010, 3:42 PM
  3. Controls in WebParts
    By DasPhansom in forum 1.x Help
    Replies: 5
    Last Post: Feb 16, 2010, 9:34 AM
  4. [CLOSED] TriggerField issue in Sharepoint with v1.0
    By turione in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jan 06, 2010, 6:39 AM
  5. ScriptManager issue in sharepoint
    By turione in forum 1.x Legacy Premium Help
    Replies: 13
    Last Post: Apr 02, 2009, 12:01 PM

Tags for this Thread

Posting Permissions