Class UIButton

All Implemented Interfaces:
EventListener, SupportFieldId, SupportsAccessKey, SupportsAutoSpacing, Visual

@Generated("component.stg") public class UIButton extends AbstractUIButton implements SupportsAccessKey
Renders a button element. UIComponent class, generated from template component.stg with class ButtonTagDeclaration.
  • Field Details

  • Constructor Details

    • UIButton

      public UIButton()
  • Method Details

    • getEventNames

      public Collection<String> getEventNames()
    • getDefaultEventName

      public String getDefaultEventName()
    • getFamily

      public String getFamily()
    • getImage

      public String getImage()
      Url to an image to display.
      Specified by:
      getImage in class AbstractUICommand
    • setImage

      public void setImage(String image)
    • getMarkup

      public Markup getMarkup()
      Specified by:
      getMarkup in interface Visual
    • setMarkup

      public void setMarkup(Markup markup)
      Specified by:
      setMarkup in interface Visual
    • getLink

      public String getLink()

      Link to an arbitrary URL, either an internal link or an external link. For internal URLs, a session id will be added, if needed (when cookies disabled). The context path needs to be added manually e.g. #{request.contextPath}. For JSF navigation to a viewId use the outcome attribute!

      The semantic of this attributes has been changed from Tobago 3 to 4!

      Specified by:
      getLink in class AbstractUICommandBase
    • setLink

      public void setLink(String link)
    • getTabIndex

      public Integer getTabIndex()
      Controls the navigation of the focus through the input controls on a page with the Tab-Key. The navigation starts from the element with the lowest tabIndex value to the element with the highest value. Elements that have identical tabIndex values should be navigated in the order they appear in the character stream Elements that are disabled or with a negative tabIndex do not participate in the tabbing order.
    • setTabIndex

      public void setTabIndex(Integer tabIndex)
    • getConfirmation

      public String getConfirmation()
      Text to use as confirmation message.
      Specified by:
      getConfirmation in class AbstractUICommandBase
    • setConfirmation

      public void setConfirmation(String confirmation)
    • getLabel

      public String getLabel()
      A localized user presentable label for this component.
      Specified by:
      getLabel in interface SupportsAccessKey
      Specified by:
      getLabel in class AbstractUICommand
    • setLabel

      public void setLabel(String label)
    • isTransition

      public boolean isTransition()
      Specify, if the command calls an JSF-Action. Useful to switch off the Double-Submit-Check and Waiting-Behavior.
      Default: true
      Specified by:
      isTransition in class AbstractUICommandBase
    • setTransition

      public void setTransition(boolean transition)
    • getTarget

      public String getTarget()
      Name of a frame where the resource retrieved via this hyperlink is to be displayed.
      Specified by:
      getTarget in class AbstractUICommandBase
    • setTarget

      public void setTarget(String target)
    • isDefaultCommand

      public boolean isDefaultCommand()
      If true the command is executed as default -- for example if the user presses the enter key inside a related input field.
      Default: false
    • setDefaultCommand

      public void setDefaultCommand(boolean defaultCommand)
    • getFragment

      public String getFragment()
      The identifier of the page fragment which should be brought into focus when the target page is rendered. The value of this attribute is appended to the end of target URL following a hash (#) mark. This notation is part of the standard URL syntax.
      Specified by:
      getFragment in class AbstractUICommandBase
    • setFragment

      public void setFragment(String fragment)
    • getAutoSpacing

      public Boolean getAutoSpacing()
      Automatically add spacing (margins/paddings) to the component for better positioning. Default is 'true' except the component is inside a: - header - footer - bar - sheet - tree - link group - button group - before facet - after facet - label facet - bar facet
      Specified by:
      getAutoSpacing in interface SupportsAutoSpacing
    • setAutoSpacing

      public void setAutoSpacing(Boolean autoSpacing)
    • getAccessKey

      public Character getAccessKey()
      The access key of this control.
      Specified by:
      getAccessKey in interface SupportsAccessKey
    • setAccessKey

      public void setAccessKey(Character accessKey)
    • getCustomClass

      public CustomClass getCustomClass()
      Sets a CSS class in its parent, if the parent supports it. Which this feature it is possible to put a CSS class name into a component with the <tc:style> tag. Example:
       <tc:in>
         <tc:style customClass="my-emphasized"/>
       </tc:in>
       
      One capability is, to used external CSS libs.
      This feature should not be used imprudent. Because it might be unstable against changes in the renderered HTML code.
      Specified by:
      getCustomClass in interface Visual
    • setCustomClass

      public void setCustomClass(CustomClass customClass)
      Specified by:
      setCustomClass in interface Visual
    • getTip

      public String getTip()
      Text value to display as tooltip.
    • setTip

      public void setTip(String tip)
    • isOmit

      public boolean isOmit()
      Flag indicating that the action of this element, will not be executed from client side (e.g. when the user clicks a button. When setting this value to true, the action will not be executed by the Tobago, but it can executed by JavaScript. This attribute is useful, when you want to add JavaScript event handlers to commands manually. In this case you usually don't want a submit with a full reload of the page.
      Default: false
      Specified by:
      isOmit in class AbstractUICommandBase
    • setOmit

      public void setOmit(boolean omit)
      Specified by:
      setOmit in class AbstractUICommandBase
    • getOutcome

      public String getOutcome()
      Link to an internal facelet page, like the outcome of an action. The context path will be added. A session id will be added, if needed.
      Specified by:
      getOutcome in class AbstractUICommandBase
    • setOutcome

      public void setOutcome(String outcome)
    • restoreState

      public void restoreState(jakarta.faces.context.FacesContext context, Object state)
    • addClientBehavior

      void addClientBehavior(String arg0, jakarta.faces.component.behavior.ClientBehavior arg1)
    • getClientBehaviors

      Map<String, List<jakarta.faces.component.behavior.ClientBehavior>> getClientBehaviors()
    • broadcast

      public void broadcast(jakarta.faces.event.FacesEvent arg0) throws jakarta.faces.event.AbortProcessingException
      Throws:
      jakarta.faces.event.AbortProcessingException
    • isImmediate

      public boolean isImmediate()
    • setImmediate

      public void setImmediate(boolean arg0)
    • getValue

      public Object getValue()
    • setValue

      public void setValue(Object arg0)
    • getActionExpression

      public jakarta.el.MethodExpression getActionExpression()
    • setActionExpression

      public void setActionExpression(jakarta.el.MethodExpression arg0)
    • addActionListener

      public void addActionListener(jakarta.faces.event.ActionListener arg0)
    • removeActionListener

      public void removeActionListener(jakarta.faces.event.ActionListener arg0)
    • getActionListeners

      public jakarta.faces.event.ActionListener[] getActionListeners()
    • setId

      public void setId(String arg0)
    • setParent

      public void setParent(jakarta.faces.component.UIComponent arg0)
    • addClientBehavior

      public void addClientBehavior(String arg0, jakarta.faces.component.behavior.ClientBehavior arg1)
    • clearInitialState

      public void clearInitialState()
    • decode

      public void decode(jakarta.faces.context.FacesContext arg0)
    • encodeAll

      public void encodeAll(jakarta.faces.context.FacesContext arg0) throws IOException
      Throws:
      IOException
    • encodeBegin

      public void encodeBegin(jakarta.faces.context.FacesContext arg0) throws IOException
      Throws:
      IOException
    • encodeChildren

      public void encodeChildren(jakarta.faces.context.FacesContext arg0) throws IOException
      Throws:
      IOException
    • encodeEnd

      public void encodeEnd(jakarta.faces.context.FacesContext arg0) throws IOException
      Throws:
      IOException
    • findComponent

      public jakarta.faces.component.UIComponent findComponent(String arg0)
    • getAttributes

      public Map<String,Object> getAttributes()
    • getPassThroughAttributes

      public Map<String,Object> getPassThroughAttributes(boolean arg0)
    • getChildCount

      public int getChildCount()
    • getChildren

      public List<jakarta.faces.component.UIComponent> getChildren()
    • getClientBehaviors

      public Map<String, List<jakarta.faces.component.behavior.ClientBehavior>> getClientBehaviors()
    • getClientId

      public String getClientId(jakarta.faces.context.FacesContext arg0)
    • getFacet

      public jakarta.faces.component.UIComponent getFacet(String arg0)
    • getFacetCount

      public int getFacetCount()
    • getFacets

      public Map<String, jakarta.faces.component.UIComponent> getFacets()
    • getFacetsAndChildren

      public Iterator<jakarta.faces.component.UIComponent> getFacetsAndChildren()
    • getId

      public String getId()
    • getParent

      public jakarta.faces.component.UIComponent getParent()
    • getRendererType

      public String getRendererType()
    • getRendersChildren

      public boolean getRendersChildren()
    • invokeOnComponent

      public boolean invokeOnComponent(jakarta.faces.context.FacesContext arg0, String arg1, jakarta.faces.component.ContextCallback arg2) throws jakarta.faces.FacesException
      Throws:
      jakarta.faces.FacesException
    • visitTree

      public boolean visitTree(jakarta.faces.component.visit.VisitContext arg0, jakarta.faces.component.visit.VisitCallback arg1)
    • isTransient

      public boolean isTransient()
    • markInitialState

      public void markInitialState()
    • addFacesListener

      protected void addFacesListener(jakarta.faces.event.FacesListener arg0)
    • getFacesContext

      protected jakarta.faces.context.FacesContext getFacesContext()
    • getFacesListeners

      protected jakarta.faces.event.FacesListener[] getFacesListeners(Class arg0)
    • getRenderer

      protected jakarta.faces.render.Renderer getRenderer(jakarta.faces.context.FacesContext arg0)
    • removeFacesListener

      protected void removeFacesListener(jakarta.faces.event.FacesListener arg0)
    • processValidators

      public void processValidators(jakarta.faces.context.FacesContext arg0)
    • processUpdates

      public void processUpdates(jakarta.faces.context.FacesContext arg0)
    • processSaveState

      public Object processSaveState(jakarta.faces.context.FacesContext arg0)
    • processRestoreState

      public void processRestoreState(jakarta.faces.context.FacesContext arg0, Object arg1)
    • setTransient

      public void setTransient(boolean arg0)
    • saveAttachedState

      public static Object saveAttachedState(jakarta.faces.context.FacesContext arg0, Object arg1)
    • restoreAttachedState

      public static Object restoreAttachedState(jakarta.faces.context.FacesContext arg0, Object arg1) throws IllegalStateException
      Throws:
      IllegalStateException
    • saveState

      public Object saveState(jakarta.faces.context.FacesContext arg0)
    • setRendered

      public void setRendered(boolean arg0)
    • setRendererType

      public void setRendererType(String arg0)
    • getPassThroughAttributes

      public Map<String,Object> getPassThroughAttributes()
    • initialStateMarked

      public boolean initialStateMarked()
    • isCompositeComponent

      public static boolean isCompositeComponent(jakarta.faces.component.UIComponent arg0)
    • isInView

      public boolean isInView()
    • isVisitable

      protected boolean isVisitable(jakarta.faces.component.visit.VisitContext arg0)
    • setValueExpression

      public void setValueExpression(String arg0, jakarta.el.ValueExpression arg1)
    • getClientId

      public String getClientId()
    • getCompositeComponentParent

      public static jakarta.faces.component.UIComponent getCompositeComponentParent(jakarta.faces.component.UIComponent arg0)
    • getContainerClientId

      public String getContainerClientId(jakarta.faces.context.FacesContext arg0)
    • getCurrentComponent

      public static jakarta.faces.component.UIComponent getCurrentComponent(jakarta.faces.context.FacesContext arg0)
    • getCurrentCompositeComponent

      public static jakarta.faces.component.UIComponent getCurrentCompositeComponent(jakarta.faces.context.FacesContext arg0)
    • getListenersForEventClass

      public List<jakarta.faces.event.SystemEventListener> getListenersForEventClass(Class<? extends jakarta.faces.event.SystemEvent> arg0)
    • getNamingContainer

      public jakarta.faces.component.UIComponent getNamingContainer()
    • setInView

      public void setInView(boolean arg0)
    • getResourceBundleMap

      public Map<String,String> getResourceBundleMap()
    • getValueExpression

      public jakarta.el.ValueExpression getValueExpression(String arg0)
    • subscribeToEvent

      public void subscribeToEvent(Class<? extends jakarta.faces.event.SystemEvent> arg0, jakarta.faces.event.ComponentSystemEventListener arg1)
    • unsubscribeFromEvent

      public void unsubscribeFromEvent(Class<? extends jakarta.faces.event.SystemEvent> arg0, jakarta.faces.event.ComponentSystemEventListener arg1)
    • getStateHelper

      protected jakarta.faces.component.StateHelper getStateHelper()
    • getStateHelper

      protected jakarta.faces.component.StateHelper getStateHelper(boolean arg0)
    • getTransientStateHelper

      public jakarta.faces.component.TransientStateHelper getTransientStateHelper()
    • getTransientStateHelper

      public jakarta.faces.component.TransientStateHelper getTransientStateHelper(boolean arg0)
    • restoreTransientState

      public void restoreTransientState(jakarta.faces.context.FacesContext arg0, Object arg1)
    • saveTransientState

      public Object saveTransientState(jakarta.faces.context.FacesContext arg0)
    • popComponentFromEL

      public void popComponentFromEL(jakarta.faces.context.FacesContext arg0)
    • pushComponentToEL

      public void pushComponentToEL(jakarta.faces.context.FacesContext arg0, jakarta.faces.component.UIComponent arg1)