Class DemoAction

java.lang.Object
org.apache.struts.action.Action
org.apache.struts.actions.BaseAction
org.apache.struts.actions.DispatchAction

public class DemoAction extends DemoAction
Demo actions showcasing UI components and entity CRUD
  • Constructor Details

    • DemoAction

      public DemoAction()
      Default constructor
  • Method Details

    • unspecified

      public org.apache.struts.action.ActionForward unspecified(DynActionForm form, ConnectionSet conSet)
      Description copied from class: BaseAction
      Default action method if no parameter 'action' passed. Overwrite and implement.
      Overrides:
      unspecified in class DemoAction
      Parameters:
      form -
      conSet -
      Returns:
    • enumValues

      public org.apache.struts.action.ActionForward enumValues(DynActionForm form, ConnectionSet conSet)
      Returns sample enumeration values
      Parameters:
      form - request form
      conSet - connection set
      Returns:
      JSON response
    • tabContentFirst

      public org.apache.struts.action.ActionForward tabContentFirst(DynActionForm form, ConnectionSet conSet)
      Returns the content of the first demo tab
      Parameters:
      form - request form
      conSet - connection set
      Returns:
      HTML view forward
    • tabContentSecond

      public org.apache.struts.action.ActionForward tabContentSecond(DynActionForm form, ConnectionSet conSet)
      Returns the content of the second demo tab
      Parameters:
      form - request form
      conSet - connection set
      Returns:
      HTML view forward
    • formSend

      public org.apache.struts.action.ActionForward formSend(DynActionForm form, ConnectionSet conSet) throws BGIllegalArgumentException, InterruptedException
      Simulates handling of a submitted form
      Parameters:
      form - request form
      conSet - connection set
      Returns:
      JSON response
      Throws:
      BGIllegalArgumentException - if the title is blank
      InterruptedException - if the simulated processing is interrupted
    • entityList

      public org.apache.struts.action.ActionForward entityList(DynActionForm form, Connection con) throws SQLException
      Searches the list of demo entities
      Parameters:
      form - request form
      con - database connection
      Returns:
      HTML view forward
      Throws:
      SQLException - on a database error
    • entityGet

      public org.apache.struts.action.ActionForward entityGet(DynActionForm form, Connection con) throws Exception
      Loads a single demo entity for editing
      Parameters:
      form - request form
      con - database connection
      Returns:
      HTML view forward
      Throws:
      Exception - on any error
    • entityUpdate

      public org.apache.struts.action.ActionForward entityUpdate(DynActionForm form, Connection con) throws Exception
      Creates or updates a demo entity
      Parameters:
      form - request form
      con - database connection
      Returns:
      JSON response
      Throws:
      Exception - on any error
    • entityDelete

      public org.apache.struts.action.ActionForward entityDelete(DynActionForm form, Connection con) throws Exception
      Deletes a demo entity
      Parameters:
      form - request form
      con - database connection
      Returns:
      JSON response
      Throws:
      Exception - on any error