Package org.zkoss.stateless.sul
Interface IHtml
-
- All Superinterfaces:
IAnyGroup<IHtml>
,IComponent<IHtml>
,IHtmlBasedComponent<IHtml>
,IXulElement<IHtml>
public interface IHtml extends IXulElement<IHtml>, IAnyGroup<IHtml>
ImmutableHtml
componentA component used to embed the browser native content (i.e., HTML tags) into the output sent to the browser. The browser native content is specified by
withContent(java.lang.String)
.Notice that
Html
generates HTML SPAN to enclose the embedded HTML tags. Thus, you can specify the style (IHtmlBasedComponent.getStyle()
), tooltipIXulElement.getTooltip()
and so on.- Author:
- katherine
- See Also:
Html
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
IHtml.Builder
Builds instances of typeIHtml
.static class
IHtml.Updater
Builds an updater of typeIHtml
forUiAgent.smartUpdate(Locator, SmartUpdater)
.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.lang.String
getContent()
Returns the embedded content (i.e., HTML tags).default java.lang.String
getWidgetClass()
Returns the client widget class.static IHtml
of(java.lang.String content)
Returns the instance with the given content.static IHtml
ofId(java.lang.String id)
Returns the instance with the given id.IHtml
withContent(java.lang.String content)
Returns a copy ofthis
immutable component with the specifiedcontent
.-
Methods inherited from interface org.zkoss.stateless.sul.IComponent
getAction, getActions, getClientAttributes, getId, getMold, getWidgetListeners, getWidgetOverrides, isVisible, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withActions, withActions, withClientAttribute, withClientAttributes, withId, withMold, withVisible, withWidgetClass, withWidgetListener, withWidgetListeners, withWidgetOverride, withWidgetOverrides
-
Methods inherited from interface org.zkoss.stateless.sul.IHtmlBasedComponent
getClientAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZIndex, isFocus, withClientAction, withDraggable, withDroppable, withFocus, withHeight, withHflex, withLeft, withRenderdefer, withSclass, withStyle, withTabindex, withTabindex, withTooltiptext, withTop, withVflex, withWidth, withZclass, withZIndex
-
Methods inherited from interface org.zkoss.stateless.sul.IXulElement
getContext, getCtrlKeys, getPopup, getTooltip, withContext, withCtrlKeys, withPopup, withTooltip
-
-
-
-
Field Detail
-
DEFAULT
static final IHtml DEFAULT
Constant for default attributes of this immutable component.
-
-
Method Detail
-
getWidgetClass
default java.lang.String getWidgetClass()
Returns the client widget class.Default:
"zul.wgt.Html"
- Specified by:
getWidgetClass
in interfaceIComponent<IHtml>
-
getContent
default java.lang.String getContent()
Returns the embedded content (i.e., HTML tags).
-
withContent
IHtml withContent(java.lang.String content)
Returns a copy ofthis
immutable component with the specifiedcontent
.Sets the embedded content (i.e., HTML tags).
Security Note
Unlike other methods, the content assigned to this method is generated directly to the browser without escaping. Thus, it is better not to have something input by the user to avoid any XSS attach.
- Parameters:
content
- The HTML content.Default:
""
.- Returns:
- A modified copy of the
this
object
-
of
static IHtml of(java.lang.String content)
Returns the instance with the given content.- Parameters:
content
- The HTML content
-
ofId
static IHtml ofId(java.lang.String id)
Returns the instance with the given id.- Parameters:
id
- The id to identify this component
-
-