Skip to content

Commit

Permalink
A few small renames and typo fixes for Grid
Browse files Browse the repository at this point in the history
* SortNotifier.removeSortistener -> removeSortListener
* DisabledGridClientTest now extends GridBasicClientFeatures
* GridServerRpc.selectionChange -> select

Change-Id: Id01b1d51f84c996444de28b262df3db7a6c35a09
  • Loading branch information
jdahlstrom authored and Vaadin Code Review committed Jan 11, 2015
1 parent b16e3db commit 0c41a02
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion client/src/com/vaadin/client/connectors/GridConnector.java
Expand Up @@ -356,7 +356,7 @@ public void onSelect(SelectionEvent<JsonObject> event) {
selectedKeys.add(dataSource.getRowKey(row));
}

getRpcProxy(GridServerRpc.class).selectionChange(
getRpcProxy(GridServerRpc.class).select(
new ArrayList<String>(selectedKeys));
} else {
updatedFromState = false;
Expand Down
2 changes: 1 addition & 1 deletion server/src/com/vaadin/event/SortEvent.java
Expand Up @@ -105,6 +105,6 @@ public interface SortNotifier extends Serializable {
* @param listener
* the sort order change listener to remove
*/
public void removeSortistener(SortListener listener);
public void removeSortListener(SortListener listener);
}
}
4 changes: 2 additions & 2 deletions server/src/com/vaadin/ui/Grid.java
Expand Up @@ -2619,7 +2619,7 @@ public void select(SelectionEvent event) {
registerRpc(new GridServerRpc() {

@Override
public void selectionChange(List<String> selection) {
public void select(List<String> selection) {
Collection<Object> receivedSelection = getKeyMapper()
.getItemIds(selection);

Expand Down Expand Up @@ -3763,7 +3763,7 @@ public void addSortListener(SortListener listener) {
* the sort order change listener to remove
*/
@Override
public void removeSortistener(SortListener listener) {
public void removeSortListener(SortListener listener) {
removeListener(SortEvent.class, listener, SORT_ORDER_CHANGE_METHOD);
}

Expand Down
7 changes: 4 additions & 3 deletions shared/src/com/vaadin/shared/ui/grid/GridServerRpc.java
Expand Up @@ -27,10 +27,11 @@
* @author Vaadin Ltd
*/
public interface GridServerRpc extends ServerRpc {
void selectionChange(List<String> newSelection);

void sort(String[] columnIds, SortDirection[] directions,
boolean userOriginated);
void select(List<String> newSelection);

void selectAll();

void sort(String[] columnIds, SortDirection[] directions,
boolean userOriginated);
}
Expand Up @@ -24,9 +24,9 @@
import org.openqa.selenium.interactions.Actions;

import com.vaadin.testbench.elements.GridElement.GridRowElement;
import com.vaadin.tests.components.grid.basicfeatures.GridBasicFeaturesTest;
import com.vaadin.tests.components.grid.basicfeatures.GridBasicClientFeaturesTest;

public class DisabledGridClientTest extends GridBasicFeaturesTest {
public class DisabledGridClientTest extends GridBasicClientFeaturesTest {

@Before
public void setUp() {
Expand Down
Expand Up @@ -606,6 +606,14 @@ public void execute() {
}
}, "Component", "State", "Frozen column count");
}

addMenuCommand("Enabled", new ScheduledCommand() {

@Override
public void execute() {
grid.setEnabled(!grid.isEnabled());
}
}, "Component", "State");
}

private void createColumnsMenu() {
Expand Down

0 comments on commit 0c41a02

Please sign in to comment.