| Summary: | Editable tables: Enhanced functionalities | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Matthias Fischer <mfi> |
| Component: | Scout | Assignee: | Project Inbox <scout.core-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | ivan.motsch, zimmermann |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Matthias Fischer
In General: All of this can be done in your code using the AbstractColumn.execPrepareEdit. Simply override in your column: execPrepareEdit() and either make the super call or re-implement it fully customized. That way you can decorate, enhance and modify the editing field in any way and then return the field. Specific: The following (proposed) properties will be included in the column as configured properties: - Show the codes of a smartfield hierarchical in a smartfield column - MaxLength of a text column - Define a column as mandatory The following callback is already there: - execPrepareLookup is available in the AbstractSmartfieldColumn and is used inside prepareEditInternal added AbstractColumn.getConfiguredMandatory default false added AbstractStringColumn.getConfiguredMaxLength default 4000 added AbstractSmartColumn.getConfiguredBrowseHierarchy default false Task to do: - Implement a solution for mandatory columns. Possible solution: - Check the mandatory state of the table (all cells of a mandatory column), when the form gets stored. Like the normal fields on a form. - Append the message 'Missing madatory values' like: "Table A - Column B" - If the missing madatory cell is the first message, preselect the row in the table and make sure, the given column is visible. added new method ITable.requestFocusInCell added new method IContentProblemDescriptor IFormField.getContentProblemDescriptor() that provides a delegate for fields with problems or issues. It supports for activation of the field/cell etc. That way when an editable table cell is mandatory it will be checked once the form is saved/validated and automatically activate the cell in editing mode using ITable.requestFocusInCell. If the field/table is in a tab that is not yet active, the tab (recursively) is activated so to show the missing field. *** Bug 358059 has been marked as a duplicate of this bug. *** Task 1: MaxLength behaviour on StringFields and StringColumns is not the same. Testcase: Define a StringField and a StringColumn with MaxLength = 60. Copy a long text (Ctrl+c) with over 60 characters. Fill both fields with paste (Ctrl+v). StringField: A messagebox appears and the first 60 copied characters are still in the field. StringColumn: A messagebox appears but the field is empty. Task 2: A hidden (visible = false), mandatory column on a table can be empty. That should not be possible. Task 3: If i store a form with empty mandatory fields, a dialog appears with a message and a list of all open mandatory fields. If there are two empty mandatory columns, only one column is shown in the message. In the message i want to see all empty mandatory fields and columns. Task 1: Fixed Task 2: Fixed. Since scout cannot guess which (hidden) columns should be checked, it simply makes all columns that have the flag editable=true visible before checking. Task 3: Fixed. This will be committed today but i need some break first. Just to clarify task 2: Scout can only check a column validation if a column is visible. So the process to check a column validation is now as follows: - if the column is editable, go further - if the column is invisible, make it visible - check the validation - if the column is valid, make it invisble This is how it works in the background, the user doesn't see if i column gets visible and then changes back to invisilbe. If a validation of an invisble, mandatory column fails, then the column is visible for the user, because he has to manually change something in the column. Thanks for the clarification, thats absolutely right. Sorry for the delay, will commit today. Fixed and in svn. Task 1: Test OK Task 2: Test NOK Task 3: Test OK Problem Task 2: If i store a table with a hidden mandatory field (has a valid value), the user can see, how the column is set to visible and then set back to invisible. If it is possible, the user shouldn't see this process. Task 2: OK Managed to distinguish between editable on column and table level - IColumn.isCellEditable checks enabled and execEditable, but not visible property - ITable.isCellEditable checks IColum.isCellEditable and IColumn.isVisible The ui (swing, swt, rap) layer always calls ITable.isCellEditable The model table validator in AbstractTableField calls IColumn.isCellEditable and can thus make validation without making the column visible. When the column contains invalid editable cells it is made visible. Test successful, thanks! ticket closed. deliverd as part of eclipse scout 3.8.0 (juno release train) |