Class ApplicationForm

  • All Implemented Interfaces:
    com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.ClickNotifier<com.vaadin.flow.component.html.Div>, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasComponents, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasOrderedComponents, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasText, Serializable

    public class ApplicationForm
    extends com.vaadin.flow.component.html.Div
    An Application for performing create-read-update-delete operations on Jobs. See also ApplicationViewLogic for fetching the data, the actual CRUD operations and controlling the view based on events from outside.
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasText

        com.vaadin.flow.component.HasText.WhiteSpace
    • Field Summary

      Fields 
      Modifier and Type Field Description
      com.vaadin.flow.component.textfield.TextField jobCompany
      private final TextField parameter representing jobCompany
      com.vaadin.flow.component.datepicker.DatePicker jobDateApplied
      private final TextField parameter representing jobDateApplied
      com.vaadin.flow.component.textfield.TextField jobDescription
      private final TextField parameter representing jobDescription
      com.vaadin.flow.component.datepicker.DatePicker jobDueDate
      private final TextField parameter representing jobDueDate
      com.vaadin.flow.component.textfield.TextField jobId
      private final TextField parameter representing jobId
      com.vaadin.flow.component.textfield.TextField jobNextAction
      private final TextField parameter representing jobNextAction
      com.vaadin.flow.component.textfield.NumberField jobPriority
      private final TextField parameter representing jobPriority
      com.vaadin.flow.component.textfield.TextField jobSalary
      private final TextField parameter representing jobSalary
      com.vaadin.flow.component.textfield.TextField jobStatus
      private final TextField parameter representing jobStatus
      com.vaadin.flow.component.textfield.TextField jobTitle
      private final TextField parameter representing jobTitle
    • Constructor Summary

      Constructors 
      Constructor Description
      ApplicationForm​(ApplicationViewLogic sampleCrudLogic)
      ApplicationForm for constructor is using to define the job form by defining labels of each textfields and values.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void editJob​(Jobs job)
      This function use a job object as parameter and utilize the view object to call the edit method for the job instance.
      void setJob​(Jobs job)
      This function use a job object as parameter to set it as current job and bind it to the application form.
      • Methods inherited from class com.vaadin.flow.component.HtmlComponent

        getTitle, setTitle
      • Methods inherited from class com.vaadin.flow.component.Component

        addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, scrollIntoView, set, setElement, setId, setVisible
      • Methods inherited from interface com.vaadin.flow.component.AttachNotifier

        addAttachListener
      • Methods inherited from interface com.vaadin.flow.component.ClickNotifier

        addClickListener, addClickShortcut
      • Methods inherited from interface com.vaadin.flow.component.DetachNotifier

        addDetachListener
      • Methods inherited from interface com.vaadin.flow.component.HasComponents

        add, add, add, addComponentAsFirst, addComponentAtIndex, remove, remove, removeAll
      • Methods inherited from interface com.vaadin.flow.component.HasElement

        getElement
      • Methods inherited from interface com.vaadin.flow.component.HasEnabled

        isEnabled, setEnabled
      • Methods inherited from interface com.vaadin.flow.component.HasOrderedComponents

        getChildren, getComponentAt, getComponentCount, indexOf, replace
      • Methods inherited from interface com.vaadin.flow.component.HasSize

        getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull
      • Methods inherited from interface com.vaadin.flow.component.HasStyle

        addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
      • Methods inherited from interface com.vaadin.flow.component.HasText

        getText, getWhiteSpace, setText, setWhiteSpace
    • Field Detail

      • jobId

        public final com.vaadin.flow.component.textfield.TextField jobId
        private final TextField parameter representing jobId
      • jobTitle

        public final com.vaadin.flow.component.textfield.TextField jobTitle
        private final TextField parameter representing jobTitle
      • jobCompany

        public final com.vaadin.flow.component.textfield.TextField jobCompany
        private final TextField parameter representing jobCompany
      • jobDateApplied

        public final com.vaadin.flow.component.datepicker.DatePicker jobDateApplied
        private final TextField parameter representing jobDateApplied
      • jobDueDate

        public final com.vaadin.flow.component.datepicker.DatePicker jobDueDate
        private final TextField parameter representing jobDueDate
      • jobSalary

        public final com.vaadin.flow.component.textfield.TextField jobSalary
        private final TextField parameter representing jobSalary
      • jobDescription

        public final com.vaadin.flow.component.textfield.TextField jobDescription
        private final TextField parameter representing jobDescription
      • jobNextAction

        public final com.vaadin.flow.component.textfield.TextField jobNextAction
        private final TextField parameter representing jobNextAction
      • jobStatus

        public final com.vaadin.flow.component.textfield.TextField jobStatus
        private final TextField parameter representing jobStatus
      • jobPriority

        public final com.vaadin.flow.component.textfield.NumberField jobPriority
        private final TextField parameter representing jobPriority
    • Constructor Detail

      • ApplicationForm

        public ApplicationForm​(ApplicationViewLogic sampleCrudLogic)
        ApplicationForm for constructor is using to define the job form by defining labels of each textfields and values. Binder then binding them into the form to work with the values we are getting from the form textfields. There are action listeners for save, update, delete buttons which is using the binding information to do crud operations Evry change happening on the form is adding intot he content variable to show the changes n the form.
        Parameters:
        sampleCrudLogic - to initialize the view instance for CRUD operations
    • Method Detail

      • editJob

        public void editJob​(Jobs job)
        This function use a job object as parameter and utilize the view object to call the edit method for the job instance. After it will pop up the information from the desired job of grids to the application form.
        Parameters:
        job - that needs to be edited
      • setJob

        public void setJob​(Jobs job)
        This function use a job object as parameter to set it as current job and bind it to the application form.
        Parameters:
        job - to set