code: private void storeInSession()
      {
          try {
              Context.getThreadContext().setSessionAttribute(getCacheKey(), isExpanded());
          } catch (final EFapsException e) {
              UIMenuItem.LOG.error("Error storing Session info for UIMenuItem called by Command with UUID: {}",
                              getCommandUUID(), e);
          }
      }
docs: Store the Information in the Session.