Class HiddenFieldPositioner
- java.lang.Object
-
- org.apache.tapestry5.corelib.internal.HiddenFieldPositioner
-
public class HiddenFieldPositioner extends Object
Used to position a hidden field (as part of a form-related component). Hidden fields are not allowed to go just anywhere, there are rules, dictated by the (X)HTML schema, about where they are allowed. We use theMarkupWriterListener
interface to monitor elements as they are started and ended to find a place to put content.
-
-
Constructor Summary
Constructors Constructor Description HiddenFieldPositioner(MarkupWriter writer, HiddenFieldLocationRules rules)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
discard()
Discard this positioner (an alternative to invokinggetElement()
).Element
getElement()
Returns the hidden field element, which can have its attributes filled in.
-
-
-
Constructor Detail
-
HiddenFieldPositioner
public HiddenFieldPositioner(MarkupWriter writer, HiddenFieldLocationRules rules)
-
-
Method Detail
-
getElement
public Element getElement()
Returns the hidden field element, which can have its attributes filled in.- Returns:
- the element
- Throws:
IllegalStateException
- if the element was not positioned
-
discard
public void discard()
Discard this positioner (an alternative to invokinggetElement()
). If anElement
has been created for the hidden field, that element is removed.- Since:
- 5.2.0
-
-