com.primix.tapestry.form
Class ImageSubmit
java.lang.Object
|
+--com.primix.tapestry.AbstractComponent
|
+--com.primix.tapestry.form.AbstractFormComponent
|
+--com.primix.tapestry.form.ImageSubmit
- All Implemented Interfaces:
- IComponent, IFormComponent, IRender
- public class ImageSubmit
- extends AbstractFormComponent
Used to create an image button inside a Form
. Although it
is occasionally useful to know the Point
on the image that was clicked
(i.e., use the image as a kind of image map, which was the original intent
of the HTML element), it is more commonly used to provide a graphic
image for the user to click, rather than the rather plain <input type=submit>.
Parameter |
Type |
Read / Write |
Required |
Default |
Description |
image |
IAsset |
R |
yes |
|
The image to show. |
name |
String |
R |
no |
|
The name to use for the form element. Under Netscape Navigator 4, this
name becomes the tooltip. The name may be modified (by adding a number to the end)
to ensure that it is unique within the form. |
disabled
| boolean |
R |
no |
|
If set to true, the button will be disabled (will not respond to
the mouse). If an alternate image is defined, it will be displayed (typically
a greyed-out version of the normal image). |
disabledImage |
IAsset |
R |
no |
|
An alternate image to display if the component is disabled. |
point |
java.awt.Point |
W |
no |
|
The point at which the image was clicked; used for rare
components that actually need to know (typically, using the image button
list a simple image map). |
selected |
java.lang.Object |
W |
no |
|
This parameter is bound to a property that is
updated when the image button is clicked by the user (submitting
the form). The property
is updated to match the tag parameter. |
tag |
java.lang.Object |
R |
no |
|
Tag used with the selected parameter to indicate which image button
on a form was clicked.
This parameter is required if the selected paremeter is used. |
Informal parameters are allowed. A body is not allowed.
- Version:
- $Id: ImageSubmit.java,v 1.11 2001/08/28 20:33:41 hship Exp $
- Author:
- Howard Ship
Methods inherited from class com.primix.tapestry.AbstractComponent |
addAsset, addComponent, addWrapped, cleanupAfterRender, cleanupComponent, finishLoad, finishLoad, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, generateAttributes, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getChangeObserver, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getListeners, getPage, getSpecification, prepareForRender, renderWrapped, reset, setBinding, setContainer, setId, setPage, setSpecification, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.primix.tapestry.IComponent |
addAsset, addComponent, addWrapped, finishLoad, getAsset, getAssets, getBinding, getBindingNames, getBindings, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getPage, getSpecification, renderWrapped, setBinding, setContainer, setId, setPage, setSpecification |
ImageSubmit
public ImageSubmit()
getName
public java.lang.String getName()
- Description copied from interface:
IFormComponent
- Returns the name of the component, which is automatically generated
during renderring.
This value is set inside the component's render method and is
not cleared. If the component is inside a Foreach
, the
value returned is the most recent name generated for the component.
This property is made available to facilitate writing JavaScript that
allows components (in the client web browser) to interact.
In practice, a Script
component
works with the Body
component to get the
JavaScript code inserted and referenced.
- Overrides:
getName
in class AbstractFormComponent
setImageBinding
public void setImageBinding(IBinding value)
getImageBinding
public IBinding getImageBinding()
setPointBinding
public void setPointBinding(IBinding value)
getPointBinding
public IBinding getPointBinding()
getDisabledBinding
public IBinding getDisabledBinding()
setDisabledBinding
public void setDisabledBinding(IBinding value)
getDisabledImageBinding
public IBinding getDisabledImageBinding()
setDisabledImageBinding
public void setDisabledImageBinding(IBinding value)
setSelectedBinding
public void setSelectedBinding(IBinding value)
getSelectedBinding
public IBinding getSelectedBinding()
setTagBinding
public void setTagBinding(IBinding value)
getTagBinding
public IBinding getTagBinding()
getNameBinding
public IBinding getNameBinding()
setNameBinding
public void setNameBinding(IBinding value)
render
public void render(IResponseWriter writer,
IRequestCycle cycle)
throws RequestCycleException
- Description copied from interface:
IRender
- The principal rendering/rewinding method. This will cause
the receiving component to render its top level elements (HTML
text and components).
Renderring and rewinding are the exact same process. The
same code that renders must be able to restore state by going
through the exact same operations (even though the output is
discarded).