org.apache.wicket.examples.ajax.builtin
Class RatingsPage

java.lang.Object
  extended by org.apache.wicket.Component
      extended by org.apache.wicket.MarkupContainer
          extended by org.apache.wicket.Page
              extended by org.apache.wicket.markup.html.WebPage
                  extended by org.apache.wicket.examples.WicketExamplePage
                      extended by org.apache.wicket.examples.ajax.builtin.BasePage
                          extended by org.apache.wicket.examples.ajax.builtin.RatingsPage
All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable<Component>, IEventSink, IEventSource, IClusterable, IConverterLocator, IRedirectListener, IRequestListener, IHeaderContributor, IManageablePage, IRequestableComponent, IRequestablePage, IHierarchical<Component>

public class RatingsPage
extends BasePage

Demo page for the rating component.

Author:
Martijn Dashorst
See Also:
Serialized Form

Nested Class Summary
static class RatingsPage.RatingModel
          Rating model for storing the ratings, typically this comes from a database.
 
Field Summary
static ResourceReference WICKETSTAR0
          Star image for no selected star
static ResourceReference WICKETSTAR1
          Star image for selected star
 
Fields inherited from class org.apache.wicket.Component
ENABLE, FLAG_INITIALIZED, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER
 
Fields inherited from interface org.apache.wicket.IRedirectListener
INTERFACE
 
Constructor Summary
RatingsPage()
          Constructor.
 
Method Summary
 java.lang.Boolean getHasVoted()
          Getter for the hasVoted flag.
 boolean isVersioned()
           
 
Methods inherited from class org.apache.wicket.examples.WicketExamplePage
explain
 
Methods inherited from class org.apache.wicket.markup.html.WebPage
configureResponse, dirty, getMarkupType, homePageLink, onAfterRender, onRender, renderXmlDecl, setHeaders
 
Methods inherited from class org.apache.wicket.Page
componentChanged, componentRendered, detachModels, dirty, endComponentRender, getAutoIndex, getId, getPageClass, getPageId, getPageParameters, getPageReference, getRenderCount, getSizeInBytes, getStatelessHint, hierarchyAsString, internalOnModelChanged, internalPrepareForRender, isBookmarkable, isErrorPage, isPageStateless, onBeforeRender, onDetach, onRedirect, renderPage, setFreezePageId, setNumericId, setStatelessHint, setWasCreatedBookmarkable, startComponentRender, toString, wasCreatedBookmarkable, wasRendered
 
Methods inherited from class org.apache.wicket.MarkupContainer
add, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, hasAssociatedMarkup, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, onComponentTagBody, onMarkupAttached, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, visitChildren, visitChildren, visitChildren, visitChildren
 
Methods inherited from class org.apache.wicket.Component
add, addStateChange, afterRender, beforeRender, canCallListenerInterface, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, configure, continueToOriginalDestination, debug, detach, detachModel, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessage, getFeedbackMessages, getFlag, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSession, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalRenderComponent, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVisibilityAllowed, isVisible, isVisibleInHierarchy, locateMarkupStream, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onComponentTag, onConfigure, onEvent, onInitialize, onModelChanged, onModelChanging, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderHead, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setRequestFlag, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, warn, wrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.wicket.request.component.IRequestableComponent
canCallListenerInterface, detach, get, getBehaviorById, getBehaviorId, getPage, getPageRelativePath
 
Methods inherited from interface org.apache.wicket.page.IManageablePage
detach
 

Field Detail

WICKETSTAR0

public static final ResourceReference WICKETSTAR0
Star image for no selected star


WICKETSTAR1

public static final ResourceReference WICKETSTAR1
Star image for selected star

Constructor Detail

RatingsPage

public RatingsPage()
Constructor.

Method Detail

getHasVoted

public java.lang.Boolean getHasVoted()
Getter for the hasVoted flag.

Returns:
true when the user has already voted.

isVersioned

public boolean isVersioned()
Overrides:
isVersioned in class Component
Returns:
true if this component should notify its holding page about changes in its state. If a Page is not versioned then it wont track changes in its components and will use the same Page.getPageId() during its lifetime
See Also:
Component.isVersioned()


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.