Change single selection behavior for Table and Tree #PL-4752

This commit is contained in:
Gleb Gorelov 2015-09-29 13:03:38 +00:00
parent 952f45b4b5
commit bb78cb0726
3 changed files with 7 additions and 8 deletions

View File

@ -3,7 +3,7 @@
* Use is subject to license terms, see http://www.cuba-platform.com/license for details.
*/
project.ext.vaadinVersion = '7.5.6.cuba.3'
project.ext.vaadinVersion = '7.5.6.cuba.4'
project.ext.vaadinShared = [group: 'com.vaadin', name: 'vaadin-shared', version: vaadinVersion]
project.ext.vaadinServer = [group: 'com.vaadin', name: 'vaadin-server', version: vaadinVersion]

View File

@ -394,6 +394,7 @@ public class CubaGroupTableWidget extends CubaScrollTableWidget {
protected String groupKey;
protected boolean expanded;
protected Boolean hasCells;
protected Element expander;
public CubaGroupTableGroupRow(UIDL uidl, char[] aligns) {
super(uidl, aligns);
@ -578,11 +579,11 @@ public class CubaGroupTableWidget extends CubaScrollTableWidget {
container.setInnerHTML("");
Element groupDiv = DOM.createDiv();
groupDiv.setInnerHTML(" ");
expander = DOM.createDiv();
expander.setInnerHTML(" ");
groupDiv.setClassName(CLASSNAME + "-group-cell-expander");
DOM.appendChild(container, groupDiv);
expander.setClassName(CLASSNAME + "-group-cell-expander");
DOM.appendChild(container, expander);
Element contentDiv = DOM.createDiv();
contentDiv.setInnerHTML(containerInnerHTML);
@ -602,7 +603,7 @@ public class CubaGroupTableWidget extends CubaScrollTableWidget {
}
setRowFocus(this);
if (!isSingleSelectMode()) {
if (event.getEventTarget().cast() != expander) {
deselectAll();
sendSelectedRows(false);
}

View File

@ -483,7 +483,6 @@ public abstract class WebAbstractTable<T extends com.vaadin.ui.Table & CubaEnhan
protected void initComponent(final T component) {
component.setMultiSelect(false);
component.setNullSelectionAllowed(false);
component.setImmediate(true);
component.setValidationVisible(false);
component.setShowBufferedSourceException(false);
@ -1342,7 +1341,6 @@ public abstract class WebAbstractTable<T extends com.vaadin.ui.Table & CubaEnhan
@Override
public void setMultiSelect(boolean multiselect) {
component.setNullSelectionAllowed(multiselect);
super.setMultiSelect(multiselect);
}