| Summary: | [Template] Client crashes if cell position is not specified correctly | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Marco Feldmann <riotsportcrew> | ||||
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | ||||||
| Version: | 2.3 | ||||||
| Target Milestone: | 3.0 M5 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | sr232 | ||||||
| Attachments: |
|
||||||
Actually, your first TextCell has no bounds - nothing is defined (top, left, right...). Nevertheless, the client should not crash in such cases. Fixed with change https://git.eclipse.org/r/#/c/40344/ Backported to 2.3-maintenance branch with change https://git.eclipse.org/r/40525 |
Created attachment 250145 [details] client javascript error Row Template crashs with the following code: Table tblSach = new org.eclipse.swt.widgets.Table(parent, SWT.FULL_SELECTION | SWT.MULTI); tblSach.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); TableColumn column1 = new TableColumn(tblSach, SWT.NONE); column1.setWidth(300); TableColumn column2 = new TableColumn(tblSach, SWT.NONE); column2.setWidth(100); Template template = new Template(); new TextCell(template).setBindingIndex(0).setFont( new Font(null, new FontData("Arial", 14, SWT.BOLD))); new TextCell(template).setBindingIndex(1).setTop(20); TableViewer tblViewer = new TableViewer(tblSach); tblViewer.getTable().getColumn(0).setWidth(900); tblSach.setData(RWT.CUSTOM_ITEM_HEIGHT, new Integer(80)); tblSach.setData(RWT.ROW_TEMPLATE, template); tblSach.pack(); // Befüellen der Spalten TableItem tblItem = new TableItem(tblSach, SWT.NONE); tblItem.setText(0, "Text1: " + "value1"); tblItem.setText(1, "Text2: " + "value2"); tblItem.setBackground(new Color(null, 190, 190, 190));