Interface IRequestableComponent

All Known Subinterfaces:
All Known Implementing Classes:
AbstractCheckSelector, AbstractChoice, AbstractDataGridView, AbstractErrorPage, AbstractFilter, AbstractItem, AbstractLink, AbstractOptions, AbstractOutputTransformerContainer, AbstractPageableView, AbstractRepeater, AbstractSingleSelectChoice, AbstractSubmitLink, AbstractTextComponent, AbstractToolbar, AbstractTree, AccessDeniedPage, AjaxButton, AjaxCheckBox, AjaxEditableChoiceLabel, AjaxEditableLabel, AjaxEditableMultiLineLabel, AjaxFallbackButton, AjaxFallbackDefaultDataTable, AjaxFallbackHeadersToolbar, AjaxFallbackLink, AjaxFallbackOrderByBorder, AjaxLazyLoadPanel, AjaxLink, AjaxListPanel, AjaxNavigationToolbar, AjaxOrderByLink, AjaxPagingNavigation, AjaxPagingNavigationIncrementLink, AjaxPagingNavigationLink, AjaxPagingNavigator, AjaxSubmitLink, AjaxTabbedPanel, AjaxWizardButtonBar, ApplicationView, Audio, AutoCompleteTextField, AutoLabelResolver.AutoLabel, AutoLinkResolver.AutolinkBookmarkablePageLink, BaseWicketTester.StartComponentInPage, Body, BookmarkablePageLink, Border, Border.BorderBodyContainer, BorderPanel, BranchItem, BreadCrumbBar, BreadCrumbBar.BreadCrumbsListView, BreadCrumbLink, BreadCrumbPanel, BreadCrumbPanelLink, BrowserInfoForm, BrowserInfoPage, Button, CancelButton, Check, CheckBox, CheckBoxMultipleChoice, CheckboxMultipleChoiceSelector, CheckBoxSelector, CheckedFolder, CheckFolder, CheckGroup, CheckGroupSelector, ChoiceFilter, Choices, ClientSideImageMap, ColGroup, ColGroup.Col, Component, ComponentFeedbackPanel, ContextImage, DataGridView, DataTable, DataTable.Caption, DataView, DataViewBase, DateTextField, DebugBar, DefaultCssAutoCompleteTextField, DefaultDataTable, DefaultNestedTree, DefaultTableTree, DevUtilsPage, DevUtilsPanel, DownloadLink, DropDownChoice, DummyHomePage, DummyHomePage.TestLink, DummyPanelPage, DynamicWizardStep, EmailTextField, EmptyPanel, Enclosure, EnclosureContainer, EnhancedPageView, EnumLabel, ExceptionErrorPage, ExportToolbar, ExternalImage, ExternalLink, ExternalSource, FeedbackPanel, FencedFeedbackPanel, FileUploadField, FilterForm, FilterToolbar, FinishButton, Folder, Form, FormComponent, FormComponentFeedbackBorder, FormComponentFeedbackIndicator, FormComponentLabel, FormComponentPanel, Fragment, GenericPanel, GenericWebMarkupContainer, GenericWebPage, GoAndClearFilter, GoFilter, GridView, GroupedDropDownChoice, HeaderPartContainer, HeaderResponseContainer, HeadersToolbar, HiddenField, HtmlHeaderContainer, HtmlHeaderItemsContainer, Image, ImageButton, Include, IndicatingAjaxButton, IndicatingAjaxFallbackLink, IndicatingAjaxLink, InlineEnclosure, InlineFrame, InlineImage, InspectorDebugPanel, InspectorPage, InternalErrorPage, Item, KittenCaptchaPanel, Label, LabeledWebMarkupContainer, LastButton, Link, ListChoice, ListItem, ListMultipleChoice, ListView, LiveSessionsPage, LocalDateTextField, LocalDateTimeField, LocalDateTimeTextField, LocalTimeTextField, Loop, LoopItem, MarkupContainer, MediaComponent, MockHomePage, ModalDialog, MultiFileUploadField, MultiLineLabel, NavigationToolbar, NavigatorLabel, NestedTree, NextButton, Node, NoFilter, NonCachingImage, NoopOutputTransformerContainer, NoRecordsToolbar, NumberTextField, OddEvenItem, OddEvenListItem, OrderByBorder, OrderByLink, Page, PageableListView, PageExpiredErrorPage, PageStoreDebugPanel, PageStorePage, PageView, PagingNavigation, PagingNavigationIncrementLink, PagingNavigationLink, PagingNavigator, Palette, Panel, PasswordTextField, PersistedPanel, Picture, PopupCloseLink, PopupCloseLink.ClosePopupPage, PreviousButton, PropertyListView, Radio, RadioChoice, RadioGroup, RangeTextField, RatingPanel, Recorder, RedirectPage, RefreshingView, RepeatingView, RequestsPage, RequiredTextField, ResourceLink, Select, Selection, SelectOption, SelectOptions, SessionSizeDebugPanel, SessionView, SignInPage, SignInPanel, SignInPanel.SignInForm, SignOutPage, SimpleFormComponentLabel, SmartLinkLabel, SmartLinkMultiLineLabel, Source, Source, StandardDebugPanel, StatelessForm, StatelessLink, StaticContentStep, StyledLinkLabel, SubmitLink, Subtree, TabbedPanel, TableTree, TextArea, TextField, TextFilter, TimeField, Track, TransparentWebMarkupContainer, UploadProgressBar, UrlTextField, Video, WebComponent, WebMarkupContainer, WebPage, Wizard, WizardButton, WizardButtonBar, WizardStep, XsltOutputTransformerContainer, ZonedDateTimeField

public interface IRequestableComponent
Base interface for components. The purpose of this interface is to make certain parts of Wicket easier to mock and unit test.
Matej Knopp
  • Method Details

    • getPageRelativePath

      Gets this component's path.
      Colon separated path to this component in the component hierarchy
    • getId

      Gets the id of this component.
      The id of this component
    • getPage

      Returns page this component belongs to.
      The page holding this component
      WicketRuntimeException - Thrown if component is not yet attached to a Page.
    • get

      Gets the component at the given path.
      path - Path to component
      The component at the path
    • getBehaviorId

      int getBehaviorId(Behavior behavior)
      Gets a stable id for the specified non-temporary behavior. The id remains stable from the point this method is first called for the behavior until the behavior has been removed from the component. This includes from one request to the next, when the component itself is retained for the next request (i.e. is stateful). Note that the bookkeeping required for these stable ids increases the memory footprint of the component.
      behavior -
      a stable id for the specified behavior
      IllegalArgumentException - when the behavior is temporary
    • getBehaviorById

      Gets the behavior for the specified id
      id -
      behavior or null if none
      InvalidBehaviorIdException - when behavior with this id cannot be found
    • detach

      void detach()
      Detaches the component.

      NOTE: this method is not inherited from IDetachable on purpose. in Wicket the assumption for a long time has been that Components do not implement IDetachable; doing so may lead to some very nasty side-effects. Consider AbstractPropertyModel#detach() which looks like this:

       public void detach()
              // Detach nested object if it's a detachable
              if (target instanceof IDetachable)
                      ((IDetachable) target).detach();
      If the model was constructed thusly, which is quite common: new PropertyModel(this, "person") and Component implemented IDetachable then calling @{code model.detach()} will cause an infinite loop with the model trying to detach the component and the component trying to detach the model.

    • canCallListenerAfterExpiry

      true if it is save to call an IRequestListener on this component when the owner page is freshly created after expiration