Interface HtmlAttributesBuilder
public interface HtmlAttributesBuilder
Builder for specifying optional attributes of html tag.
- Since:
- 3.9.0
-
Method Summary
Modifier and TypeMethodDescriptionAdds and encodes the value for align attribute.booleanAttribute
(String name) Boolean attribute is defined only by name (e.g.Adds and encodes the value for border attribute.Adds value for attribute specified by name and encodes the value except when name is "href" or "src" (not case sensitive)cellpadding
(String value) Adds and encodes the value for cellpadding attribute.cellspacing
(String value) Adds and encodes the value for cellspacing attribute.Adds and encodes the value for charset attribute.Adds and encodes the value for class attribute.Adds and encodes the value for colspan attribute.Behaves differently for different browsersBehaves differently for different browsersAdds and encodes the value for height attribute.href
(PortalLink link) Adds and encodes the value for id attribute.Adds type="text/javascript" and charset="UTF-8"lastKnownIndex
(int index) Adds and encodes the value for name attribute.Creates new builder for Javascript methods invocationreadOnly()
The read only attribute is a boolean attribute and is property of input element.Adds and encodes the value for rowspan attribute.start
(int start) Adds and encodes the value for style attribute.Adds and encodes the value for target attribute.Adds and encodes the value for title attribute.Adds and encodes the value for type attribute.Adds and encodes the value for width attribute.
-
Method Details
-
id
Adds and encodes the value for id attribute.- Parameters:
value
- - not encoded value, can be null - when null than the attribute will not be in the result- Throws:
IllegalStateException
- ifHtmlTagBuilder.finished()
was called before.IllegalStateException
- if this method was already called for this object
-
className
Adds and encodes the value for class attribute. If class attribute is already set then class will be appended.- Parameters:
value
- - not encoded value, can be null - when null than the attribute will not be in the result- Throws:
IllegalStateException
- ifHtmlTagBuilder.finished()
was called before.
-
style
Adds and encodes the value for style attribute. If style attribute is already set then style will be appended.- Parameters:
value
- - not encoded value, can be null - when null than the attribute will not be in the result- Throws:
IllegalStateException
- ifHtmlTagBuilder.finished()
was called before.
-
target
Adds and encodes the value for target attribute.- Parameters:
value
- - not encoded value, can be null - when null than the attribute will not be in the result- Throws:
IllegalStateException
- if this method was already called for this objectIllegalStateException
- ifHtmlTagBuilder.finished()
was called before.
-
onClick
- Parameters:
value
- - already encoded value, can be null - when null than the attribute will not be in the result- Throws:
IllegalStateException
- if this method was already called for this objectIllegalStateException
- ifHtmlTagBuilder.finished()
was called before.
-
onClickMethod
Creates new builder for Javascript methods invocation- Throws:
IllegalStateException
- if this method was already called for this objectIllegalStateException
- ifHtmlTagBuilder.finished()
was called before.- Since:
- 3.10.0
-
name
Adds and encodes the value for name attribute.- Parameters:
value
- - not encoded value, can be null - when null than the attribute will not be in the result- Throws:
IllegalStateException
- if this method was already called for this objectIllegalStateException
- ifHtmlTagBuilder.finished()
was called before.
-
title
Adds and encodes the value for title attribute.- Parameters:
value
- - not encoded value, can be null - when null than the attribute will not be in the result- Throws:
IllegalStateException
- if this method was already called for this objectIllegalStateException
- ifHtmlTagBuilder.finished()
was called before.
-
border
Adds and encodes the value for border attribute.- Parameters:
value
- - not encoded value, can be null - when null than the attribute will not be in the result- Throws:
IllegalStateException
- if this method was already called for this objectIllegalStateException
- ifHtmlTagBuilder.finished()
was called before.
-
width
Adds and encodes the value for width attribute.- Parameters:
value
- - not encoded value, can be null - when null than the attribute will not be in the result- Throws:
IllegalStateException
- if this method was already called for this objectIllegalStateException
- ifHtmlTagBuilder.finished()
was called before.
-
height
Adds and encodes the value for height attribute.- Parameters:
value
- - not encoded value, can be null - when null than the attribute will not be in the result- Throws:
IllegalStateException
- if this method was already called for this objectIllegalStateException
- ifHtmlTagBuilder.finished()
was called before.
-
cellpadding
Adds and encodes the value for cellpadding attribute.- Parameters:
value
- - not encoded value, can be null - when null than the attribute will not be in the result- Throws:
IllegalStateException
- if this method was already called for this objectIllegalStateException
- ifHtmlTagBuilder.finished()
was called before.
-
cellspacing
Adds and encodes the value for cellspacing attribute.- Parameters:
value
- - not encoded value, can be null - when null than the attribute will not be in the result- Throws:
IllegalStateException
- if this method was already called for this objectIllegalStateException
- ifHtmlTagBuilder.finished()
was called before.
-
rowspan
Adds and encodes the value for rowspan attribute.- Parameters:
value
- - not encoded value, can be null - when null than the attribute will not be in the result- Throws:
IllegalStateException
- if this method was already called for this objectIllegalStateException
- ifHtmlTagBuilder.finished()
was called before.
-
colspan
Adds and encodes the value for colspan attribute.- Parameters:
value
- - not encoded value, can be null - when null than the attribute will not be in the result- Throws:
IllegalStateException
- if this method was already called for this objectIllegalStateException
- ifHtmlTagBuilder.finished()
was called before.
-
align
Adds and encodes the value for align attribute.- Parameters:
value
- - not encoded value, can be null - when null than the attribute will not be in the result- Throws:
IllegalStateException
- if this method was already called for this objectIllegalStateException
- ifHtmlTagBuilder.finished()
was called before.
-
type
Adds and encodes the value for type attribute.- Parameters:
value
- - not encoded value, can be null - when null than the attribute will not be in the result- Throws:
IllegalStateException
- if this method was already called for this objectIllegalStateException
- ifHtmlTagBuilder.finished()
was called before.
-
charset
Adds and encodes the value for charset attribute.- Parameters:
value
- - not encoded value, can be null - when null than the attribute will not be in the result- Throws:
IllegalStateException
- if this method was already called for this objectIllegalStateException
- ifHtmlTagBuilder.finished()
was called before.
-
javascript
Adds type="text/javascript" and charset="UTF-8" -
dleEventCanceling
Behaves differently for different browsers -
dleControlSelectCanceling
Behaves differently for different browsers -
contentNotEditable
-
byName
Adds value for attribute specified by name and encodes the value except when name is "href" or "src" (not case sensitive)- Parameters:
name
- name of attributevalue
- value of attribute- Returns:
- instance of this builder to allow method chaining
-
lastKnownIndex
- Parameters:
index
- - ignored when < 0- Throws:
IllegalStateException
- if this method was already called for this objectIllegalStateException
- ifHtmlTagBuilder.finished()
was called before.
-
start
- Parameters:
start
- - ignored when < 0- Throws:
IllegalStateException
- if this method was already called for this objectIllegalStateException
- ifHtmlTagBuilder.finished()
was called before.
-
readOnly
The read only attribute is a boolean attribute and is property of input element. When present, it specifies that an input field is read-only.- Since:
- 3.9.2
-
booleanAttribute
Boolean attribute is defined only by name (e.g. readonly). When it is present, property is set totrue
otherwise isfalse
.- Parameters:
name
- name of the attribute- Since:
- 3.9.2
-