public abstract class AbstractChip extends Object implements Chip
| Modifier and Type | Field and Description |
|---|---|
static String |
CHIP_KEY |
static String |
FALSE |
static String |
FRAME_KEY |
static String |
SHOW_JSP_COMMENTS
Deprecated.
use
ConfigConstants.DEBUG_SHOWJSPCOMMENTS directly |
static String |
TRUE |
static String |
USE_SOCKET_NAMING |
DISPLAY_EVENT, FILTERED_PREFIX| Constructor and Description |
|---|
AbstractChip(DisplayState displayState,
Chip parent) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEventListener(String topic,
ChipEventListener listener) |
void |
checkValid()
Gives the chip the possibility to check if its objects are still valid.
|
protected void |
clearInfoMessages() |
Object |
clone() |
boolean |
containsDisplayEvent(Map<String,List<String>> events) |
String |
createMenuEntriesForJS(List<MenuEntry> menuEntries) |
void |
dispose()
called when its display state is unbound from its http session.
|
protected boolean |
errorQueueEmpty()
Deprecated.
Please use
isErrorQueueEmpty() instead. |
protected Object |
getClipboard()
Gets an Object from the WebChips-clipboard
|
String |
getCommandID(String eventID)
Convenience method.
|
String |
getDisplayParameters()
The default implementation returns
Null since this feature is not supported by default. |
DisplayState |
getDisplayState()
Returns the current DisplayState.
|
String |
getEventID(String eventID)
Convenience method.
|
String |
getEventURL(String eventID,
String value) |
String |
getEventValue(String eventID,
String value)
Chips that translate event values (i.e.
|
protected Frame |
getFrame()
Tries to find the surrounding frame.
|
String |
getID() |
protected List<String> |
getInfoMessages() |
JaloSession |
getJaloSession()
Returns the current JaloSession.
|
static String |
getLocalizedString(String strKey)
Returns a localized string for the given key or the key itself if no localized string was found.
|
static String |
getLocalizedString(String pattern,
Object... arguments) |
Logger |
getLogger() |
List<MenuEntry> |
getMenuEntries()
Here you can specify what Actions you are able to perform at the moment.
|
String |
getNameSpace() |
static String |
getNameSpaceFor(Chip chip) |
Chip |
getParent()
Returns the parent if there is one
|
protected String |
getProposedUniqueName() |
protected static 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 String |
getSessionIdentifier() |
String |
getStringValue(Map<String,List<String>> events,
String event) |
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(List<String> eventValues,
String eventName) |
boolean |
isButtonPushed(Map<String,List<String>> eventValueMap,
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(Map<String,List<String>> events)
All events contained in the given map will be dispatched to their appropriate event listeners.
|
protected void |
postErrorMessage(String error)
Posts error messages to the error handler Usually these error messages will be displayed as popup windows.
|
protected void |
postInfoMessage(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) |
String |
registerUniqueName(String proposedName,
Chip chip) |
void |
removeEventListener(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(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(String status) |
String |
translateFormFieldToEventName(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!!!
|
String |
translateFormFieldToEventValue(String formFieldName,
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 String USE_SOCKET_NAMING
public static final String CHIP_KEY
public static final String FRAME_KEY
@Deprecated public static final String SHOW_JSP_COMMENTS
ConfigConstants.DEBUG_SHOWJSPCOMMENTS directlypublic static final String TRUE
public static final String FALSE
public AbstractChip(DisplayState displayState, Chip parent)
public void dispose()
Chipprotected static final String getProposedUniqueNameFor(Chip chip)
protected String getProposedUniqueName()
public final String getUniqueName()
getUniqueName in interface Chippublic final String registerUniqueName(String proposedName, Chip chip)
registerUniqueName in interface Chippublic final String getNameSpace()
public List<MenuEntry> getMenuEntries()
getMenuEntries in interface Chippublic boolean hasVisibleContextMenuEntries()
public final String createMenuEntriesForJS(List<MenuEntry> menuEntries)
menuEntries - public final DisplayState getDisplayState()
getDisplayState in interface Chippublic static String getLocalizedString(String strKey)
DisplayState.getLocalizedString(String) on the current DisplayState.strKey - the key to get a localized representation for.public static String getLocalizedString(String pattern, 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,
IOException
ServletExceptionIOExceptionpublic final String getEventID(String eventID)
getEventID in interface Chippublic final String getCommandID(String eventID)
getCommandID in interface Chippublic final String getEventValue(String eventID, String value)
translateFormFieldToEventValue(String,String)) must
register the values using this method.getEventValue in interface Chippublic String getEventURL(String eventID, String value)
getEventURL in interface Chippublic final void render(PageContext context)
throws ServletException,
IOException
render in interface ChipServletExceptionIOExceptionpublic Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionprotected void setClipboard(Object object)
protected final Object getClipboard()
protected final void postErrorMessage(String error)
protected final void postInfoMessage(String info)
protected List<String> getInfoMessages()
protected void removeInfoMessage(int pos)
throws IndexOutOfBoundsException
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 String translateFormFieldToEventName(String formFieldName)
ChiptranslateFormFieldToEventName in interface Chippublic String translateFormFieldToEventValue(String formFieldName, 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(String topic, ChipEventListener listener)
addEventListener in interface Chippublic void removeEventListener(String topic, ChipEventListener listener)
removeEventListener in interface Chipprotected void notifyEventListeners(ChipEvent event)
protected void notifyEventListeners(Map<String,List<String>> events)
protected String getSessionIdentifier()
protected void setWindowStatus(String status)
public boolean isButtonPushed(Map<String,List<String>> eventValueMap, String buttonName)
public Logger getLogger()
public 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.