Example below is just snippets from the code. I am trying to migrate from 3.1 to 4.0 and code that was working is blowing up with a null object reference. I add a section to a section stack and assign it an ID. Later in the code I try to get that section object by ID using getSection(). In 3.1, this call returned a reference to the section stack with that ID. In 4.0 it is returning null.
1. SmartClient Version: v9.0p_2013-07-25/LGPL Development Only (built 2013-07-25)
2. IE 9.0.8112.16421
3. Non-server issue
5. No JavaScript error
6. sample code:
1. SmartClient Version: v9.0p_2013-07-25/LGPL Development Only (built 2013-07-25)
2. IE 9.0.8112.16421
3. Non-server issue
5. No JavaScript error
6. sample code:
Code:
public class FilterAreaWidget extends SectionStack implements {
final String CUSTOM_FILTER_SECTION_ID = "customFilterSection";
SectionStackSection customFilterSection;
public FilterAreaWidget() {
customFilterSection = new SectionStackSection("Filter");
customFilterSection.setID(CUSTOM_FILTER_SECTION_ID);
addSection(customFilterSection);
SectionStackSection s = getSection(CUSTOM_FILTER_SECTION_ID);
// s is null at this point in 4.0 - used to return the section.
}
}