|
||||||||||
| 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.markup.html.WebMarkupContainer
org.apache.wicket.markup.html.form.LabeledWebMarkupContainer
org.apache.wicket.markup.html.form.FormComponent<String>
org.apache.wicket.markup.html.form.Button
org.apache.wicket.markup.html.form.ImageButton
public class ImageButton
<input type="image"> component - like Button only with an image.
For details of how ImageButtons load, generate and manage images, see
LocalizedImageResource.
| Field Summary |
|---|
| Fields inherited from class org.apache.wicket.markup.html.form.FormComponent |
|---|
FLAG_CONVERT_EMPTY_INPUT_STRING_TO_NULL, VALUE_SEPARATOR |
| 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.IResourceListener |
|---|
INTERFACE |
| Constructor Summary | |
|---|---|
ImageButton(String id,
IModel<String> model)
|
|
ImageButton(String id,
IResource imageResource)
Constructs an image directly from an image resource. |
|
ImageButton(String id,
ResourceReference resourceReference)
Constructs an image button from an image ResourceReference. |
|
ImageButton(String id,
ResourceReference resourceReference,
PageParameters resourceParameters)
Constructs an image button from an image ResourceReference. |
|
ImageButton(String id,
String string)
|
|
| Method Summary | |
|---|---|
protected IResource |
getImageResource()
|
protected ResourceReference |
getImageResourceReference()
|
protected boolean |
getStatelessHint()
Returns whether the component can be stateless. |
protected void |
onComponentTag(ComponentTag tag)
Processes the component tag. |
void |
onResourceRequested()
Called when a resource is requested. |
ImageButton |
setDefaultModel(IModel<?> model)
Sets the given model. |
void |
setImageResource(IResource imageResource)
|
void |
setImageResourceReference(ResourceReference resourceReference)
|
void |
setImageResourceReference(ResourceReference resourceReference,
PageParameters parameters)
|
| Methods inherited from class org.apache.wicket.markup.html.form.Button |
|---|
getDefaultFormProcessing, getForm, getOnClickScript, initModel, onAfterSubmit, onError, onSubmit, setDefaultFormProcessing, updateModel |
| Methods inherited from class org.apache.wicket.markup.html.form.FormComponent |
|---|
add, add, checkRequired, clearInput, convertInput, convertValue, error, getConvertedInput, getDefaultLabel, getDefaultLabel, getInput, getInputAsArray, getInputName, getModel, getModelObject, getModelValue, getRawInput, getType, getValidatorKeyPrefix, getValidators, getValue, hasRawInput, inputAsInt, inputAsInt, inputAsIntArray, inputChanged, internalOnModelChanged, invalid, isInputNullable, isMultiPart, isRequired, isValid, newValidatable, onDetach, onDisabled, onInvalid, onValid, processChildren, processInput, remove, reportRequiredError, setConvertedInput, setLabel, setModel, setModelObject, setModelValue, setRequired, setType, shouldTrimInput, trim, updateCollectionModel, valid, validate, validateRequired, validateValidators, visitComponentsPostOrder, visitFormComponentsPostOrder |
| Methods inherited from class org.apache.wicket.markup.html.form.LabeledWebMarkupContainer |
|---|
getLabel, setLabelInternal |
| Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer |
|---|
getWebPage, getWebRequest |
| Methods inherited from class org.apache.wicket.MarkupContainer |
|---|
add, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, hasAssociatedMarkup, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, onComponentTagBody, onMarkupAttached, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, size, swap, toString, toString, visitChildren, visitChildren, 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.markup.html.form.IFormSubmittingComponent |
|---|
getInputName |
| Constructor Detail |
|---|
public ImageButton(String id,
ResourceReference resourceReference)
ResourceReference. That resource
reference will bind its resource to the current SharedResources.
If you are using non sticky session clustering and the resource reference is pointing to a
Resource that isn't guaranteed to be on every server, for example a dynamic
image or resources that aren't added with a IInitializer at application startup.
Then if only that resource is requested from another server, without the rendering of the
page, the image won't be there and will result in a broken link.
id - See ComponentresourceReference - The shared image resource
public ImageButton(String id,
ResourceReference resourceReference,
PageParameters resourceParameters)
ResourceReference. That resource
reference will bind its resource to the current SharedResources.
If you are using non sticky session clustering and the resource reference is pointing to a
Resource that isn't guaranteed to be on every server, for example a dynamic
image or resources that aren't added with a IInitializer at application startup.
Then if only that resource is requested from another server, without the rendering of the
page, the image won't be there and will result in a broken link.
id - See ComponentresourceReference - The shared image resourceresourceParameters - The resource parameters
public ImageButton(String id,
IResource imageResource)
ResourceReference constructor has. But this will result in a non 'stable' url
and the url will have request parameters.
id - See ComponentimageResource - The image resource
public ImageButton(String id,
IModel<String> model)
id - model - Component.Component(String, IModel)
public ImageButton(String id,
String string)
id - See Componentstring - Name of imageComponent.Component(String, IModel)| Method Detail |
|---|
public void onResourceRequested()
IResourceListener
onResourceRequested in interface IResourceListenerIResourceListener.onResourceRequested()public void setImageResource(IResource imageResource)
imageResource - The new ImageResource to set.public void setImageResourceReference(ResourceReference resourceReference)
resourceReference - The shared ImageResource to set.
public void setImageResourceReference(ResourceReference resourceReference,
PageParameters parameters)
resourceReference - The shared ImageResource to set.parameters - Set the resource parameters for the resource.public ImageButton setDefaultModel(IModel<?> model)
ComponentWARNING: DO NOT OVERRIDE THIS METHOD UNLESS YOU HAVE A VERY GOOD REASON FOR IT. OVERRIDING THIS MIGHT OPEN UP SECURITY LEAKS AND BREAK BACK-BUTTON SUPPORT.
setDefaultModel in class MarkupContainermodel - The model
Component.setDefaultModel(org.apache.wicket.model.IModel)protected IResource getImageResource()
protected ResourceReference getImageResourceReference()
protected final void onComponentTag(ComponentTag tag)
onComponentTag in class Buttontag - Tag to modifyComponent.onComponentTag(ComponentTag)protected boolean getStatelessHint()
Component
getStatelessHint in class ComponentComponent.getStatelessHint()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||