Class PNewWorkOrderNote

All Implemented Interfaces:
Serializable, overit.geocall.marks.MethodExposer, overit.geocall.marks.NameExposer, AjaxableComponent, Badgeable, Hideable, Identified, Tool, overit.geocall.ux.configurability.UIConfigurable, overit.geocall.ux.edm.ModelConfigurable

public class PNewWorkOrderNote extends Panel
Panel for creating new work order notes. This panel provides a user interface for creating new notes associated with work orders. It allows users to enter note text, optionally associate the note with a specific work order operation, and save the note through a callback mechanism.
Since:
22.0
See Also:
  • Field Details

  • Constructor Details

    • PNewWorkOrderNote

      public PNewWorkOrderNote()
  • Method Details

    • setOnSaveFunction

      public void setOnSaveFunction(Function<BOWorkOrderNote,Boolean> onSaveFunction)
      Sets the callback function that will be invoked when the note is saved or cancelled.
      Parameters:
      onSaveFunction - the callback function to be invoked on save or cancel operations; must not be null
    • setWorkOrderNote

      public void setWorkOrderNote(BOWorkOrderNote workOrderNote)
      Sets the work order note to be created.
      Parameters:
      workOrderNote - the work order note to be created; must not be null
    • show

      public void show()
      Shows the new work order note creation panel.
      Overrides:
      show in class Panel
      Throws:
      IllegalArgumentException - if any of the required preconditions are not met: workOrderNote is null, workOrderNote.getWorkOrder() is null, or onSaveFunction is null
      ApplicationException - if an error occurs while loading work order operations
    • cleanData

      protected void cleanData()
      Clears all data from the new note form.
    • loadOperations

      protected void loadOperations() throws DAException, DAValidateException
      Loads work order operations for optional note association.
      Throws:
      ApplicationException - if a database error occurs during operation loading
      DAException
      DAValidateException
    • onSaveNote

      public boolean onSaveNote(UIMessage uim)
      UI event handler for saving the new work order note.
      Parameters:
      uim - the UI message containing form data from the user interface; expected to contain values for Note (note text) and optionally WorkOrderOperation (operation ID)
      Returns:
      true always, indicating that the event has been processed
    • onClose

      public boolean onClose(UIMessage uim)
      UI event handler for closing/cancelling the new work order note creation.
      Parameters:
      uim - the UI message
      Returns:
      true always, indicating that the event has been processed