You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

EditorServerRpc.java 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * Copyright 2000-2016 Vaadin Ltd.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5. * use this file except in compliance with the License. You may obtain a copy of
  6. * the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  12. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  13. * License for the specific language governing permissions and limitations under
  14. * the License.
  15. */
  16. package com.vaadin.v7.shared.ui.grid;
  17. import com.vaadin.shared.communication.ServerRpc;
  18. /**
  19. * An RPC interface for the grid editor client-to-server communications.
  20. *
  21. * @since 7.4
  22. * @author Vaadin Ltd
  23. */
  24. public interface EditorServerRpc extends ServerRpc {
  25. /**
  26. * Asks the server to open the editor and bind data to it. When a bind
  27. * request is sent, it must be acknowledged with a
  28. * {@link EditorClientRpc#confirmBind() confirm call} before the client can
  29. * open the editor.
  30. *
  31. * @param rowIndex
  32. * the index of the edited row
  33. */
  34. void bind(int rowIndex);
  35. /**
  36. * Asks the server to save unsaved changes in the editor to the data source.
  37. * When a save request is sent, it must be acknowledged with a
  38. * {@link EditorClientRpc#confirmSave() confirm call}.
  39. *
  40. * @param rowIndex
  41. * the index of the edited row
  42. */
  43. void save(int rowIndex);
  44. /**
  45. * Tells the server to cancel editing. When sending a cancel request, the
  46. * client does not need to wait for confirmation by the server before hiding
  47. * the editor.
  48. *
  49. * @param rowIndex
  50. * the index of the edited row
  51. */
  52. void cancel(int rowIndex);
  53. }