|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.Component
org.apache.wicket.MarkupContainer
org.apache.wicket.Page
org.apache.wicket.markup.html.WebPage
VPage
@ThreadRestricted(value="wicket") public abstract class VPage
A page in the Web-based voter interface. Access to pages, components and their models
is restricted to Wicket threads. This restriction is documented (in Votorola)
by the annotation @ThreadRestricted("wicket").
Runtime enforcement of compliance is not possible (e.g. by the use of assertions)
because Wicket threads are synchronized through a locking mechanism
(Session.getPage)
that is private to Wicket.
It is not yet clear (not having looked at the code, in detail) whether Wicket is ensuring that the local memory caches of pooled threads are synchronized through main memory. Assuming Wicket does use a pool for its request threads, then it would have to synchronize each on a common lock both prior to, and subsequent to processing the request (thus invalidating and flushing the caches) to guarantee cross-thread visibility of state changes. But we can just assume this for now (it's easy enough to correct, if we're wrong).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.wicket.Page |
|---|
Page.IPageSerializer |
| Nested classes/interfaces inherited from class org.apache.wicket.Component |
|---|
Component.ComponentModelChange, Component.EnabledChange, Component.IVisitor, Component.VisibilityChange |
| Field Summary | |
|---|---|
static int |
SHORT_STRING_LENGTH_MAX
The maximum length of a 'short string', in characters. |
| Fields inherited from class org.apache.wicket.Page |
|---|
LATEST_VERSION, serializer |
| Fields inherited from class org.apache.wicket.Component |
|---|
ENABLE, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED6, FLAG_RESERVED7, FLAG_RESERVED8, PATH_SEPARATOR, RENDER |
| Fields inherited from interface org.apache.wicket.markup.html.INewBrowserWindowListener |
|---|
INTERFACE |
| Fields inherited from interface org.apache.wicket.IRedirectListener |
|---|
INTERFACE |
| Constructor Summary | |
|---|---|
protected |
VPage()
Constructs a VPage, per WebPage() |
protected |
VPage(PageParameters pageParameters)
Constructs a VPage, per WebPage(pageParameters) |
| Method Summary | ||
|---|---|---|
static
|
appendStyleClass(C component,
String classIdentifier)
Appends a CSS class identifier to the component's 'class' attribute. |
|
static EmailAddressValidatorJM |
emailAddressValidator()
A shared instance of a validator for strict email addresses. |
|
static
|
inputLengthConstrained(C field)
Constrains the text field to the standard input length. |
|
static MaxLengthValidator |
inputLengthValidator()
A shared instance of a validator for standard input length. |
|
static
|
invalidStyled(C component)
Trains the form component to aquire the style class 'invalid', whenever it fails validation. |
|
static Label |
newCustomLabel(String id,
String key)
Constructs a custom section of content, as a label. |
|
static Label |
newLabelNBSP(String id)
Constructs a label containing a non-breaking space character ( ). |
|
static Component |
newNullComponent(String id)
Constructs a component that is invisible, and does nothing. |
|
static Component |
newNullComponentAsLabel(String id)
Returns a label containing a non-breaking space character, for situations that preclude using a proper null component. |
|
void |
renderHead(IHeaderResponse r)
|
|
static String |
shortened(String string)
Returns a version of the string that is truncated to SHORT_STRING_LENGTH_MAX characters. |
|
static String |
shortenedWords(String string)
Returns a version of the string, in which each of the whitespace delimited words is truncated to SHORT_STRING_LENGTH_MAX characters; or the same string, if no truncation is required. |
|
static String |
styleClassForKeyword(String prefix,
String keyword)
Constructs a CSS class identifier from a prefix, and an ad hoc keyword. |
|
VApplication |
vApplication()
|
|
VRequestCycle |
vRequestCycle()
|
|
| Methods inherited from class org.apache.wicket.markup.html.WebPage |
|---|
configureResponse, getMarkupType, getUrlCompressor, getWebRequestCycle, homePageLink, onDetach, onNewBrowserWindow, setHeaders |
| Methods inherited from class org.apache.wicket.MarkupContainer |
|---|
add, addOrReplace, autoAdd, autoAdd, contains, findMarkupStream, get, getAssociatedMarkupStream, getMarkupStream, hasAssociatedMarkup, internalAdd, isTransparentResolver, iterator, iterator, newMarkupResourceStream, onComponentTagBody, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderComponentTagBody, replace, setMarkupStream, setModel, size, toString, visitChildren, visitChildren |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.wicket.session.pagemap.IPageMapEntry |
|---|
getPage |
| Field Detail |
|---|
public static final int SHORT_STRING_LENGTH_MAX
| Constructor Detail |
|---|
protected VPage()
protected VPage(PageParameters pageParameters)
| Method Detail |
|---|
public static <C extends Component> C appendStyleClass(C component,
String classIdentifier)
public static EmailAddressValidatorJM emailAddressValidator()
public static <C extends TextField> C inputLengthConstrained(C field)
VoterInputTable.MAX_INPUT_LENGTHpublic static MaxLengthValidator inputLengthValidator()
VoterInputTable.MAX_INPUT_LENGTHpublic static <C extends FormComponent> C invalidStyled(C component)
public static Label newCustomLabel(String id,
String key)
VApplication.putCustomXHTML(String,String)public static Label newLabelNBSP(String id)
public static Component newNullComponent(String id)
public static Component newNullComponentAsLabel(String id)
@ThreadSafe public static String shortened(String string)
@ThreadSafe public static String shortenedWords(String string)
public static String styleClassForKeyword(String prefix,
String keyword)
public VApplication vApplication()
Component.getApplication()public VRequestCycle vRequestCycle()
WebPage.getWebRequestCycle(),
VRequestCycle.get()public void renderHead(IHeaderResponse r)
renderHead in interface IHeaderContributor
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||