|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.barracudamvc.core.comp.AbstractBComponent
org.barracudamvc.core.comp.BComponent
org.barracudamvc.core.comp.BAction
org.barracudamvc.core.comp.BLink
BLink is used to manipulate any element in a DOM template that is capable of generating a URL request. In the case of HTML, this would typically include <a>, <input>, and <button> elements.
In most cases you will not actually need to bind the component to a view in order to use it--if you return it from a model, this will be done for you automatically. If however, you intend to use the component standalone (ie. manually attaching it to a specific node in the DOM) or inline (ie. in a toString()), then you MUST BIND IT TO A VIEW before rendering, or an error will be generated.
Because BLink may often be used for inling, it includes constructors that conveniently allow you to specify the a ViewContext (ie. instead of an actual View)
Field Summary | |
protected boolean |
allowMarkupInText
|
protected static org.apache.log4j.Logger |
logger
|
protected String |
target
|
protected String |
text
|
Fields inherited from class org.barracudamvc.core.comp.BAction |
actionEvent, actionUrl, disableBackButton, disableFormLocking, listeners, params, scriptFunctions |
Fields inherited from class org.barracudamvc.core.comp.BComponent |
DEFAULT_ENCODING, enabled, enc, name, rs, VISIBILITY_MARKER, visible |
Fields inherited from class org.barracudamvc.core.comp.AbstractBComponent |
attrs, children, dvc, isStepChild, parent, statemap, stepChildren, tempViews, validated, views |
Constructor Summary | |
BLink()
Public noargs constructor |
|
BLink(String itext)
Public constructor which creates the component and sets the text, and target values. |
|
BLink(String itext,
ControlEvent iactionEvent)
Public constructor which creates the component and sets the text and action values. |
|
BLink(String itext,
ControlEvent iactionEvent,
ViewContext idvc)
Public constructor which creates the component and sets the text and action values. |
|
BLink(String itext,
String iactionUrl)
Public constructor which creates the component and sets the text and action values. |
|
BLink(String itext,
String iactionUrl,
ViewContext idvc)
Public constructor which creates the component and sets the text and action values. |
Method Summary | |
boolean |
allowMarkupInText()
See if we allow markup in the text |
String |
getTarget()
Get the target for this particular component |
String |
getText()
Get the text for this particular component |
BLink |
setAllowMarkupInText(boolean val)
Do we wish to allow markup in this text (defaults to false) |
BLink |
setTarget(String itarget)
Set the target for this particular component |
BLink |
setText(String itext)
Set the text for this particular component |
Methods inherited from class org.barracudamvc.core.comp.BAction |
addEventListener, addScriptFunction, getAction, getAction, getDisableBackButton, getDisableFormLocking, getParams, getScriptFunctions, hasAction, removeEventListener, setAction, setAction, setDisableBackButton, setDisableFormLocking, setParam, setParam |
Methods inherited from class org.barracudamvc.core.comp.BComponent |
addView, decodeStr, encodeStr, getEncoding, getFirstView, getName, getRenderStrategy, getViews, isEnabled, isVisible, postRender, preRender, removeAllViews, removeView, render, render, renderView, renderView, setEnabled, setEnabled, setEncoding, setName, setRenderStrategy, setView, setVisible, setVisible, supports |
Methods inherited from class org.barracudamvc.core.comp.AbstractBComponent |
addChild, addStepChild, addStepChild, addTempView, clearState, destroyCycle, findComponentMap, findRendererFactory, getAttr, getAttrMap, getChild, getChildren, getDefaultViewContext, getParent, getRenderer, getRenderer, getRootComponent, getState, getStateKeys, getStateStore, hasChildren, hasViews, initCycle, installRendererFactory, invalidate, isStepChild, printStackTrace, printStackTrace, printStackTrace, putState, removeAll, removeAllStepChildren, removeChild, removeChild, removeState, setAttr, setDefaultViewContext, setParent, toRef, toString, toString, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static final org.apache.log4j.Logger logger
protected String text
protected String target
protected boolean allowMarkupInText
Constructor Detail |
public BLink()
public BLink(String itext)
itext
- the text string that backs this componentpublic BLink(String itext, String iactionUrl)
itext
- the text string that backs this componentiactionUrl
- the action url to be fired (opt--if null, the default
action specified in the template will be fired)public BLink(String itext, String iactionUrl, ViewContext idvc)
itext
- the text string that backs this componentiactionUrl
- the action url to be fired (opt--if null, the default
action specified in the template will be fired)idvc
- the default ViewContext (opt--its presence allows the
component to be rendered as markup in toString())public BLink(String itext, ControlEvent iactionEvent)
itext
- the text string that backs this componentiactionEvent
- the action event to be fired (opt--if null, the default
ActionEvent will be fired)public BLink(String itext, ControlEvent iactionEvent, ViewContext idvc)
itext
- the text string that backs this componentiactionEvent
- the action event to be fired (opt--if null, the default
ActionEvent will be fired)idvc
- the default ViewContext (opt--its presence allows the
component to be rendered as markup in toString())Method Detail |
public BLink setText(String itext)
itext
- the text representation of this componentpublic String getText()
public BLink setTarget(String itarget)
itarget
- the ext representation of the targetpublic String getTarget()
public BLink setAllowMarkupInText(boolean val)
val
- true if we wish to allow markup in the textpublic boolean allowMarkupInText()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |