Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

EditorServerRpc.java 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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 com.vaadin.shared.communication.ServerRpc;
  18. /**
  19. * An RPC interface for the grid editor client-to-server communications.
  20. *
  21. * @since 8.0
  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(boolean) confirm call} before the
  29. * client can open the editor.
  30. *
  31. * @param key
  32. * the identifier key for edited item
  33. */
  34. void bind(String key);
  35. /**
  36. * Asks the server to save unsaved changes in the editor to the bean. When a
  37. * save request is sent, it must be acknowledged with a
  38. * {@link EditorClientRpc#confirmSave(boolean) confirm call}.
  39. */
  40. void save();
  41. /**
  42. * Tells the server to cancel editing. When sending a cancel request, the
  43. * client does not need to wait for confirmation by the server before hiding
  44. * the editor.
  45. *
  46. * @param afterBeingSaved
  47. * if {@code true} then this method is called to close editor
  48. * after save action, otherwise it represents a cancel action
  49. */
  50. void cancel(boolean afterBeingSaved);
  51. /**
  52. * Asks the server to check the validity of the current values in the
  53. * editor. When a check-validity request is sent, the server must respond
  54. * with a {@link EditorClientRpc#confirmValidity(boolean) confirm call}.
  55. */
  56. void checkValidity();
  57. }