public abstract class AbstractChip extends java.lang.Object implements Chip
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CHIP_KEY |
static java.lang.String |
FALSE |
static java.lang.String |
FRAME_KEY |
static java.lang.String |
SHOW_JSP_COMMENTS
Deprecated.
since ages - use
ConfigConstants.DEBUG_SHOWJSPCOMMENTS directly |
static java.lang.String |
TRUE |
static java.lang.String |
USE_SOCKET_NAMING |
DISPLAY_EVENT, FILTERED_PREFIX| Constructor and Description |
|---|
AbstractChip(DisplayState displayState,
Chip parent) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEventListener(java.lang.String topic,
ChipEventListener listener) |
void |
checkValid()
Gives the chip the possibility to check if its objects are still valid.
|
protected void |
clearInfoMessages() |
java.lang.Object |
clone() |
boolean |
containsDisplayEvent(java.util.Map<java.lang.String,java.util.List<java.lang.String>> events) |
java.lang.String |
createMenuEntriesForJS(java.util.List<MenuEntry> menuEntries) |
void |
dispose()
called when its display state is unbound from its http session.
|
protected boolean |
errorQueueEmpty()
Deprecated.
since ages - Please use
isErrorQueueEmpty() instead. |
protected java.lang.Object |
getClipboard()
Gets an Object from the WebChips-clipboard
|
java.lang.String |
getCommandID(java.lang.String eventID)
Convenience method.
|
java.lang.String |
getDisplayParameters()
The default implementation returns
Null since this feature is not supported by default. |
DisplayState |
getDisplayState()
Returns the current DisplayState.
|
java.lang.String |
getEventID(java.lang.String eventID)
Convenience method.
|
java.lang.String |
getEventURL(java.lang.String eventID,
java.lang.String value) |
java.lang.String |
getEventValue(java.lang.String eventID,
java.lang.String value)
Chips that translate event values (i.e.
|
protected Frame |
getFrame()
Tries to find the surrounding frame.
|
java.lang.String |
getID() |
protected java.util.List<java.lang.String> |
getInfoMessages() |
JaloSession |
getJaloSession()
Returns the current JaloSession.
|
static java.lang.String |
getLocalizedString(java.lang.String strKey)
Returns a localized string for the given key or the key itself if no localized string was found.
|
static java.lang.String |
getLocalizedString(java.lang.String pattern,
java.lang.Object... arguments) |
Logger |
getLogger() |
java.util.List<MenuEntry> |
getMenuEntries()
Here you can specify what Actions you are able to perform at the moment.
|
java.lang.String |
getNameSpace() |
static java.lang.String |
getNameSpaceFor(Chip chip) |
Chip |
getParent()
Returns the parent if there is one
|
protected java.lang.String |
getProposedUniqueName() |
protected static java.lang.String |
getProposedUniqueNameFor(Chip chip)
Use this static method from within deeply nested chips if you need to have a 'clean' unique name.
|
boolean |
getRequestFocus()
Gets the current request focus flag and resets it to false.
|
protected java.lang.String |
getSessionIdentifier() |
java.lang.String |
getStringValue(java.util.Map<java.lang.String,java.util.List<java.lang.String>> events,
java.lang.String event) |
java.lang.String |
getUniqueName() |
Window |
getWindow()
Tries to find the surrounding window
|
void |
goFullScreen()
As a result of this call your chip will be displayed fullscreen.
|
boolean |
hasVisibleContextMenuEntries() |
boolean |
isButtonPushed(java.util.List<java.lang.String> eventValues,
java.lang.String eventName) |
boolean |
isButtonPushed(java.util.Map<java.lang.String,java.util.List<java.lang.String>> eventValueMap,
java.lang.String buttonName) |
protected boolean |
isErrorQueueEmpty() |
boolean |
isValid()
Returns whether the chip is still valid In contrast to checkValid() it doesn't actually ask its objects but just
returns the state set in checkValid()
|
void |
leaveFullScreen()
As a result of this call your chip will not be displayed fullscreen any longer.
|
protected void |
notifyEventListeners(ChipEvent event) |
protected void |
notifyEventListeners(java.util.Map<java.lang.String,java.util.List<java.lang.String>> events)
All events contained in the given map will be dispatched to their appropriate event listeners.
|
protected void |
postErrorMessage(java.lang.String error)
Posts error messages to the error handler Usually these error messages will be displayed as popup windows.
|
protected void |
postInfoMessage(java.lang.String info)
Posts info messages to the error handler Usually these info messages will be displayed as popup windows.
|
protected void |
postWindowEvent(WindowEvent event)
Posts WindowEvents to the handler
|
protected void |
refresh() |
protected void |
refreshChild(Chip child) |
java.lang.String |
registerUniqueName(java.lang.String proposedName,
Chip chip) |
void |
removeEventListener(java.lang.String topic,
ChipEventListener listener) |
protected void |
removeInfoMessage(int pos) |
void |
render(HttpServletRequest request,
HttpServletResponse response)
Is used to render the chip.
|
void |
render(PageContext context)
Call this method from inside a JSP.
|
protected void |
setClipboard(java.lang.Object object)
Puts an Object into the WebChips-clipboard
|
protected void |
setParent(Chip parent) |
void |
setRequestFocus(boolean focus)
Sets the request focus flag.
|
protected void |
setValid(boolean valid)
Sets whether the chips is still valid
|
protected void |
setWindowStatus(java.lang.String status) |
java.lang.String |
translateFormFieldToEventName(java.lang.String formFieldName)
used for macro testing; translate a JSP form field name (may be PK) to the name used in macro file step elements
Don't use the jalosession or change the internal state of the chip here!!!
|
java.lang.String |
translateFormFieldToEventValue(java.lang.String formFieldName,
java.lang.String formFieldValue)
used for macro testing; translate a JSP form field value (may be PK) to the value used in macro file step elements
Don't use the jalosession or change the internal state of the chip here!!!
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetJSPURI, processEventspublic static final java.lang.String USE_SOCKET_NAMING
public static final java.lang.String CHIP_KEY
public static final java.lang.String FRAME_KEY
@Deprecated public static final java.lang.String SHOW_JSP_COMMENTS
ConfigConstants.DEBUG_SHOWJSPCOMMENTS directlypublic static final java.lang.String TRUE
public static final java.lang.String FALSE
public AbstractChip(DisplayState displayState, Chip parent)
public void dispose()
Chipprotected static final java.lang.String getProposedUniqueNameFor(Chip chip)
protected java.lang.String getProposedUniqueName()
public final java.lang.String getUniqueName()
getUniqueName in interface Chippublic final java.lang.String registerUniqueName(java.lang.String proposedName,
Chip chip)
registerUniqueName in interface Chippublic final java.lang.String getNameSpace()
public static final java.lang.String getNameSpaceFor(Chip chip)
public java.util.List<MenuEntry> getMenuEntries()
getMenuEntries in interface Chippublic boolean hasVisibleContextMenuEntries()
public final java.lang.String createMenuEntriesForJS(java.util.List<MenuEntry> menuEntries)
menuEntries - public final DisplayState getDisplayState()
getDisplayState in interface Chippublic static java.lang.String getLocalizedString(java.lang.String strKey)
DisplayState.getLocalizedString(String) on the current DisplayState.strKey - the key to get a localized representation for.public static java.lang.String getLocalizedString(java.lang.String pattern,
java.lang.Object... arguments)
public final JaloSession getJaloSession()
getJaloSession in interface Chippublic void goFullScreen()
goFullScreen in interface Chippublic void leaveFullScreen()
leaveFullScreen in interface Chippublic final void render(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
java.io.IOException
ServletExceptionjava.io.IOExceptionpublic final java.lang.String getEventID(java.lang.String eventID)
getEventID in interface Chippublic final java.lang.String getCommandID(java.lang.String eventID)
getCommandID in interface Chippublic final java.lang.String getEventValue(java.lang.String eventID,
java.lang.String value)
translateFormFieldToEventValue(String,String)) must
register the values using this method.getEventValue in interface Chippublic java.lang.String getEventURL(java.lang.String eventID,
java.lang.String value)
getEventURL in interface Chippublic final void render(PageContext context)
throws ServletException,
java.io.IOException
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionprotected void setClipboard(java.lang.Object object)
protected final java.lang.Object getClipboard()
protected final void postErrorMessage(java.lang.String error)
protected final void postInfoMessage(java.lang.String info)
protected java.util.List<java.lang.String> getInfoMessages()
protected void removeInfoMessage(int pos)
throws java.lang.IndexOutOfBoundsException
java.lang.IndexOutOfBoundsExceptionprotected void clearInfoMessages()
protected final boolean isErrorQueueEmpty()
@Deprecated protected final boolean errorQueueEmpty()
isErrorQueueEmpty() instead.protected final void postWindowEvent(WindowEvent event)
public final Chip getParent()
protected final Frame getFrame()
NULL if the chip is not part of a frame.public Window getWindow()
NULL if the chip is not part of a window.public java.lang.String translateFormFieldToEventName(java.lang.String formFieldName)
ChiptranslateFormFieldToEventName in interface Chippublic java.lang.String translateFormFieldToEventValue(java.lang.String formFieldName,
java.lang.String formFieldValue)
ChiptranslateFormFieldToEventValue in interface Chippublic void checkValid()
checkValid in interface Chipprotected final void setValid(boolean valid)
public final boolean isValid()
Chipprotected void refresh()
protected void refreshChild(Chip child)
protected final void setParent(Chip parent)
public void addEventListener(java.lang.String topic,
ChipEventListener listener)
addEventListener in interface Chippublic void removeEventListener(java.lang.String topic,
ChipEventListener listener)
removeEventListener in interface Chipprotected void notifyEventListeners(ChipEvent event)
protected void notifyEventListeners(java.util.Map<java.lang.String,java.util.List<java.lang.String>> events)
protected java.lang.String getSessionIdentifier()
protected void setWindowStatus(java.lang.String status)
public boolean isButtonPushed(java.util.Map<java.lang.String,java.util.List<java.lang.String>> eventValueMap,
java.lang.String buttonName)
public boolean isButtonPushed(java.util.List<java.lang.String> eventValues,
java.lang.String eventName)
public java.lang.String getStringValue(java.util.Map<java.lang.String,java.util.List<java.lang.String>> events,
java.lang.String event)
public Logger getLogger()
public boolean containsDisplayEvent(java.util.Map<java.lang.String,java.util.List<java.lang.String>> events)
public java.lang.String getDisplayParameters()
Null since this feature is not supported by default.getDisplayParameters in interface ChipChip.getDisplayParameters()public void setRequestFocus(boolean focus)
getRequestFocus() will return true. Use that flag for indicating
that at next request the caller of getRequestFocus() has to set the focus.focus - true for setting the request focus, otherwise falsepublic boolean getRequestFocus()
Copyright © 2017 SAP SE. All Rights Reserved.