Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Anyone else use SectionItem???

    Does anyone else that uses SectionItem have an issue with the actual graphic for the SectionItem showing up?

    I am using the newest versions of both GWT and SmartGWT. In addition to that, I also have the isomorphicDir variable set in the template html file.

    The typical behavior of the lack of isomorphicDir causes the image files for things to just not show up completely. This behavior is different. They are initially not loaded, however upon clicking in the implied location of the section headers, they will load. They are just not initially loaded.

    What is ever weirder is the fact that this is not an issue in Firefox, but only IE and the built in browser used by the hosted mode within the GWT eclipse plugin.

    I have used Fiddler2 to try and debug any errors. I am unable to locate any errors in Fiddler2, but this may be partly due to my unfamiliarity with Fiddler. When I sent the request in Fiddler, I can see a circle with a slash through is signifying there is an error, but the actual response object is the correct html file. This leads me to believe that the javascript is failing, but I am unable to see anything.

    Any help would be much appreciated.

    EDIT: SOLUTION/WORKAROUND Found.

    all of my SectionItems were being placed in a DynamicForm. By simply calling the .redraw method of my DynamicForm object, the Section Headers were rendered.
    Last edited by Rakmos; 15 Oct 2009, 16:40.

    #2
    I've been using it and it works OK in all browsers and hosted mode.

    Do mind that it's a bit different in use compared to other components:

    -To set the title, use setDefaultValue()
    -To add other formitems to the section item, use sectionitem.setItemIds(item1.getName(), item2.getName())
    -Then also add the sectionitem together with the normal formitems as the form's fields: form.setFields(sectionitem, item1, item2) and I think it's important to first set the sectionitem followed by it's items.

    If this also the case for you, try maybe starting IE, clear its cache and retry hosted mode.
    You can also start hosted mode in a lower debug level which actually shows you the headers of the request in the hosted mode console. Maybe that will tell you if the image is not loaded or gotten from your cache (and failed for some reason).

    Comment


      #3
      The following is my onModuleLoad() code. Does this look like valid code?

      It is also not initially loading the images.

      It should also be noted that I get an exception if I attempt to use the .expandSection of the sectionItem object. Is this normal?

      Code:
                      frm = new DynamicForm();
      		ts_TransactionSlips_Bound = new TextItem("ts_TransactionSlips_Bound","Transaction Slips (Bound)");
      		os_paperClips_Large = new TextItem("os_paperClips_Large","Paper Clips (Large)");
      		secTellerSupplies = new SectionItem();
      		secOfficeSupplies = new SectionItem();
      		secTellerSupplies.setDefaultValue("Teller Supplies");
      		secOfficeSupplies.setDefaultValue("Office Supplies");
      		secTellerSupplies.setWidth(300);
      		secOfficeSupplies.setWidth(300);
      		secTellerSupplies.setItemIds(ts_TransactionSlips_Bound.getName());
      		secOfficeSupplies.setItemIds(os_paperClips_Large.getName());
      		ts_TransactionSlips_Bound.setWrapTitle(false);
      		
      		frm.setFields(secTellerSupplies, ts_TransactionSlips_Bound, secOfficeSupplies, os_paperClips_Large);
      		RootPanel.get().add(frm);

      Comment


        #4
        I realized there are skins missing in that seems like smart gwt request. I even set that ispomic path and it solved many of the skin problems but not all.

        Comment

        Working...
        X