SEBSERV-185 implemented
This commit is contained in:
		
							parent
							
								
									3b4c168c43
								
							
						
					
					
						commit
						11c11d0f7d
					
				
					 1 changed files with 18 additions and 1 deletions
				
			
		| 
						 | 
					@ -150,8 +150,19 @@ public class TableFieldBuilder extends AbstractTableFieldBuilder {
 | 
				
			||||||
        private void deleteRow(final int selectionIndex) {
 | 
					        private void deleteRow(final int selectionIndex) {
 | 
				
			||||||
            this.control.remove(selectionIndex);
 | 
					            this.control.remove(selectionIndex);
 | 
				
			||||||
            this.values.remove(selectionIndex);
 | 
					            this.values.remove(selectionIndex);
 | 
				
			||||||
 | 
					            try {
 | 
				
			||||||
 | 
					                if (this.values.size() > selectionIndex) {
 | 
				
			||||||
 | 
					                    this.control.select(selectionIndex);
 | 
				
			||||||
 | 
					                } else {
 | 
				
			||||||
 | 
					                    this.control.select(this.values.size() - 1);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                this.control.showSelection();
 | 
				
			||||||
 | 
					            } catch (final Exception e) {
 | 
				
			||||||
 | 
					                // ignore auto selection error
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            // send new values to web-service
 | 
					            // send new values to web-service
 | 
				
			||||||
            this.tableContext.getValueChangeListener()
 | 
					            this.tableContext
 | 
				
			||||||
 | 
					                    .getValueChangeListener()
 | 
				
			||||||
                    .tableChanged(extractTableValue(this.values));
 | 
					                    .tableChanged(extractTableValue(this.values));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -168,6 +179,12 @@ public class TableFieldBuilder extends AbstractTableFieldBuilder {
 | 
				
			||||||
            this.values.add(rowValues);
 | 
					            this.values.add(rowValues);
 | 
				
			||||||
            addTableRow(this.values.size() - 1, rowValues);
 | 
					            addTableRow(this.values.size() - 1, rowValues);
 | 
				
			||||||
            this.control.layout();
 | 
					            this.control.layout();
 | 
				
			||||||
 | 
					            try {
 | 
				
			||||||
 | 
					                this.control.select(index);
 | 
				
			||||||
 | 
					                this.control.showSelection();
 | 
				
			||||||
 | 
					            } catch (final Exception e) {
 | 
				
			||||||
 | 
					                // ignore auto selection error
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            // send new values to web-service
 | 
					            // send new values to web-service
 | 
				
			||||||
            this.tableContext.getValueChangeListener()
 | 
					            this.tableContext.getValueChangeListener()
 | 
				
			||||||
                    .tableChanged(extractTableValue(this.values));
 | 
					                    .tableChanged(extractTableValue(this.values));
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue