PROBLEM STATEMENT
Forms with sections do not render consistently with respect to WIDTH. When the Form's layout dictates an area smaller than the Form's rendering, the Form will take up the space necessary to show the form items, and the width of the sections are not re-adjusted to the form item width.
I have attached a snapshot of the inconsistency.
CONFIGURATION
[FONT=Menlo]EXAMPLE CODE[/FONT]
[FONT=Menlo]I modified your SmartGWT Showcase example, Form:Form Layout:Sections[/FONT]
[FONT=Menlo]The modification is the addition of a Layout that made the Form's layout area smaller than the rendering of the Form's Items.[/FONT]
[FONT=Menlo]
Forms with sections do not render consistently with respect to WIDTH. When the Form's layout dictates an area smaller than the Form's rendering, the Form will take up the space necessary to show the form items, and the width of the sections are not re-adjusted to the form item width.
I have attached a snapshot of the inconsistency.
CONFIGURATION
- v1[FONT=Menlo]0.1p_2015-12-18/Enterprise Deployment 2015-12-18
- [/FONT]User-Agent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:26.0) Gecko/20100101 Firefox/26.0'
[FONT=Menlo] - No server side warnings or errors.[/FONT]
[FONT=Menlo] - No JavaScript errors.[/FONT]
[FONT=Menlo]
[FONT=Menlo]EXAMPLE CODE[/FONT]
[FONT=Menlo]I modified your SmartGWT Showcase example, Form:Form Layout:Sections[/FONT]
[FONT=Menlo]The modification is the addition of a Layout that made the Form's layout area smaller than the rendering of the Form's Items.[/FONT]
[FONT=Menlo]
Code:
[/FONT] public void onModuleLoad() { final DynamicForm form = new DynamicForm(); form.setWidth(300); TextItem itemName = new TextItem(); itemName.setName("itemName"); itemName.setTitle("Item"); TextAreaItem descriptionItem = new TextAreaItem(); descriptionItem.setName("descriptionItem"); descriptionItem.setTitle("Description"); TextItem priceItem = new TextItem(); priceItem.setType("float"); priceItem.setName("priceItem"); priceItem.setTitle("Price"); priceItem.setDefaultValue("low"); SectionItem section1 = new SectionItem(); section1.setDefaultValue("Item"); section1.setSectionExpanded(true); section1.setItemIds("itemName", "descriptionItem", "priceItem"); CheckboxItem inStock = new CheckboxItem(); inStock.setName("inStock"); inStock.setTitle("In Stock"); DateItem nextShipment = new DateItem(); nextShipment.setName("nextShipment"); nextShipment.setTitle("Next Shipment"); nextShipment.setUseTextField(true); nextShipment.setDefaultValue(256); SectionItem section2 = new SectionItem(); section2.setDefaultValue("Stock"); section2.setSectionExpanded(false); section2.setItemIds("inStock", "nextShipment"); form.setFields(section1, itemName, descriptionItem, priceItem, section2, inStock, nextShipment); // form.draw(); HLayout hl = new HLayout(); HLayout hh = new HLayout(); form.setWidth("10%"); hh.setWidth("*"); hl.addMember(form); hl.addMember(hh); hl.draw(); }
Comment