Class UiFunction

java.lang.Object
org.bgerp.app.servlet.jsp.UiFunction

public class UiFunction extends Object
Methods called in JSP files from ui object
  • Field Details

    • INSTANCE

      public static final UiFunction INSTANCE
      Singleton instance
  • Method Details

    • selectSingleSourceJson

      public static final String selectSingleSourceJson(Collection<IdTitle<?>> list, Set<?> availableIdSet, List<?> availableIdList, Map<Integer, IdTitle<?>> map, boolean showId, boolean showComment) throws com.fasterxml.jackson.core.JsonProcessingException
      JSON source for ui:select-single JSP tag
      Parameters:
      list - items
      availableIdSet - allowed item IDs, or empty for all
      availableIdList - ordered item IDs, takes priority over list
      map - items by ID, used with availableIdList
      showId - append the item ID to the title
      showComment - append the item comment to the title
      Returns:
      JSON array string
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException - on a serialization error
    • processCreatedAndClosed

      public static final String processCreatedAndClosed(Localizer l, Process process)
      Localized text with process creation and closing times
      Parameters:
      l - localizer
      process - the process
      Returns:
      localized text
    • idAndComment

      public static final String idAndComment(Object object)
      A string containing object's comment, case object implements Comment interface and mandatory the object's ID.
      Parameters:
      object - the object, must implement Id
      Returns:
      comment with the object ID