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.

EditorClientRpc.java 2.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*
  2. * Copyright 2000-2021 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.shared.ui.grid.editor;
  17. import java.util.List;
  18. import com.vaadin.shared.communication.ClientRpc;
  19. /**
  20. * An RPC interface for the grid editor server-to-client communications.
  21. *
  22. * @since 8.0
  23. * @author Vaadin Ltd
  24. */
  25. public interface EditorClientRpc extends ClientRpc {
  26. /**
  27. * Tells the client to open the editor and bind data to it.
  28. *
  29. * @param rowIndex
  30. * the index of the edited row
  31. *
  32. */
  33. void bind(int rowIndex);
  34. /**
  35. * Tells the client to cancel editing and hide the editor.
  36. */
  37. void cancel();
  38. /**
  39. * Confirms a pending {@link EditorServerRpc#bind(String) bind request} sent
  40. * by the client.
  41. *
  42. * @param bindSucceeded
  43. * {@code true} if and only if the bind action was successful
  44. */
  45. void confirmBind(boolean bindSucceeded);
  46. /**
  47. * Confirms a pending {@link EditorServerRpc#save() save request} sent by
  48. * the client.
  49. *
  50. * @param saveSucceeded
  51. * {@code true} if and only if the save action was successful
  52. */
  53. void confirmSave(boolean saveSucceeded);
  54. /**
  55. * Sets the displayed error messages for editor.
  56. *
  57. * @param errorMessage
  58. * the error message to show the user; {@code} null to clear
  59. * @param errorColumnsIds
  60. * a list of column ids that should get error markers; empty list
  61. * to clear
  62. *
  63. */
  64. void setErrorMessage(String errorMessage, List<String> errorColumnsIds);
  65. /**
  66. * Confirms whether the binder's validation has passed so as to determine
  67. * whether to allow the pending navigation action.
  68. *
  69. * @param isValid
  70. * {@code true} if the binder value is valid
  71. */
  72. void confirmValidity(boolean isValid);
  73. }