Class AbstractComponent

    • Field Detail

      • DELETED_ATTRIBUTE

        public static final java.lang.String DELETED_ATTRIBUTE
        See Also:
        Constant Field Values
      • onRendered

        public final Event<java.lang.Void> onRendered
    • Constructor Detail

      • AbstractComponent

        public AbstractComponent()
    • Method Detail

      • mapAbstractUiComponentProperties

        protected void mapAbstractUiComponentProperties​(org.teamapps.dto.UiComponent uiComponent)
      • getId

        public java.lang.String getId()
        Specified by:
        getId in interface ClientObject
      • setVisible

        public void setVisible​(boolean visible)
        Specified by:
        setVisible in interface Component
      • createUiComponent

        public abstract org.teamapps.dto.UiComponent createUiComponent()
      • createUiReference

        public org.teamapps.dto.UiClientObjectReference createUiReference()
        Description copied from interface: ClientObject
        Creates a ui reference to a client object. Ui references are just a simple way to reference objects on the client side.
        Specified by:
        createUiReference in interface ClientObject
      • reRenderIfRendered

        @Deprecated
        public void reRenderIfRendered()
        Deprecated.
        Use explicit ui commands instead.
        Completely removes and rerenders the component on the client side, loosing any state that is not reflected on the server side. This method should be regarded as dangerous, since many components depend on state (data caches, user interaction state) that is not controlled by the server and will get lost when invoking this method.

        Historically, this method was used as a lazy implementation of changing a configuration option, when this change was not implemented on the client side.

      • queueCommandIfRendered

        protected void queueCommandIfRendered​(java.util.function.Supplier<org.teamapps.dto.UiCommand<?>> commandSupplier)
      • setCssStyle

        public void setCssStyle​(java.lang.String selector,
                                java.lang.String propertyName,
                                java.lang.String value)
        Specified by:
        setCssStyle in interface Component
      • toggleCssClass

        public void toggleCssClass​(java.lang.String selector,
                                   java.lang.String className,
                                   boolean enabled)
        Specified by:
        toggleCssClass in interface Component
      • setAttribute

        public void setAttribute​(java.lang.String selector,
                                 java.lang.String attributeName,
                                 java.lang.String value)
        Specified by:
        setAttribute in interface Component
      • setParent

        public void setParent​(Component container)
        Description copied from interface: Component
        Used internally for setting the component's container. May only be invoked by the new container!!
        Specified by:
        setParent in interface Component
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getDebuggingId

        public java.lang.String getDebuggingId()
      • setDebuggingId

        public void setDebuggingId​(java.lang.String debuggingId)