|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.smartgwt.client.core.JsObject
com.smartgwt.client.core.DataClass
com.smartgwt.client.core.RefDataClass
com.smartgwt.client.widgets.form.fields.FormItem
com.smartgwt.client.widgets.form.fields.StaticTextItem
com.smartgwt.client.widgets.form.fields.LinkItem
public class LinkItem
A FormItem that displays an HTML URL. In read-only mode (canEdit:false) the URL is shown as a link; in editable mode the URL is shown in a textbox.
The link to open is specified as the item value with FormItem.setValue or defaultValue. The link title defaults to the URL
unless linkTitle is specified.
Additionally, a
custom action can be triggered when the link is clicked: see target for details.
| Field Summary |
|---|
| Fields inherited from class com.smartgwt.client.core.JsObject |
|---|
jsObj |
| Constructor Summary | |
|---|---|
LinkItem()
|
|
LinkItem(JavaScriptObject jsObj)
|
|
LinkItem(String name)
|
|
| Method Summary | |
|---|---|
HandlerRegistration |
addClickHandler(ClickHandler handler)
Add a click handler. |
String |
getLinkTitle()
Optional title text to display for this item's link. |
static LinkItem |
getOrCreateRef(JavaScriptObject jsObj)
|
String |
getTarget()
By default, clicking a link rendered by this item opens it in a new browser window. |
void |
setLinkTitle(String linkTitle)
Optional title text to display for this item's link. |
void |
setTarget(String target)
By default, clicking a link rendered by this item opens it in a new browser window. |
| Methods inherited from class com.smartgwt.client.widgets.form.fields.StaticTextItem |
|---|
getClipValue, getDateFormatter, getEscapeHTML, getTextBoxStyle, getWrap, setClipValue, setDateFormatter, setEscapeHTML, setTextBoxStyle, setWrap |
| Methods inherited from class com.smartgwt.client.core.RefDataClass |
|---|
getRef, getRef |
| Methods inherited from class com.smartgwt.client.core.DataClass |
|---|
doAddHandler, fireEvent, getAttributeAsDoubleArray, getAttributeAsIntArray, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsStringArray, getAttributes, getHandlerCount, getJsObj, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute |
| Methods inherited from class com.smartgwt.client.core.JsObject |
|---|
setJsObj |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
|---|
fireEvent |
| Constructor Detail |
|---|
public LinkItem()
public LinkItem(JavaScriptObject jsObj)
public LinkItem(String name)
| Method Detail |
|---|
public static LinkItem getOrCreateRef(JavaScriptObject jsObj)
public void setLinkTitle(String linkTitle)
linkTitle - new linkTitle for this item. Default value is nullpublic String getLinkTitle()
public void setTarget(String target)
target attribute of
the anchor tag used to render the link. If you set linkItem.target to "javascript", the default behaviour is to
catch and consume mouse-clicks that would result in the link being followed. Instead, the FormItem.click event is fired.
target - target Default value is "_blank"public String getTarget()
target attribute of
the anchor tag used to render the link. If you set linkItem.target to "javascript", the default behaviour is to
catch and consume mouse-clicks that would result in the link being followed. Instead, the FormItem.click event is fired.
public HandlerRegistration addClickHandler(ClickHandler handler)
FormItemCalled when this FormItem is clicked on.
Note: click() is available on StaticTextItem, BlurbItems,
ButtonItem, and derivatives. Other form items (such as HiddenItem) do not support click().
addClickHandler in interface HasClickHandlersaddClickHandler in class FormItemhandler - the click handler
HandlerRegistration used to remove this handler
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||