public class IlvDefaultPopupMenuEncoder extends IlvPopupMenuEncoder
IlvMenu
into a code comprehensible to the client and to write it into
the selected writer.
Note that this encoder only supports the following
ActionListener
subclasses:
Constructor and Description |
---|
IlvDefaultPopupMenuEncoder()
Creates a new
IlvDefaultPopupMenuEncoder instance. |
Modifier and Type | Method and Description |
---|---|
protected String |
encodeImage(String imageURL)
Encodes the menu or menu item image URL.
|
protected void |
writeAction(IlvMenuItem menuItem,
Writer out)
Encodes the action of the current menu item.
|
protected void |
writeJavaScriptAction(JavaScriptActionListener listener,
Writer out)
Encodes the JavaScript action listener and writes it in the specified writer.
|
protected void |
writeJavaScriptString(String s,
Writer out)
Writes a JavaScript string literal that evaluates to the same string as the
given Java string passed as parameter.
|
void |
writeMenu(IlvMenu menu,
Writer out)
Writes the menu passed as parameter using the specified writer.
|
protected void |
writeServerAction(ServletActionListener listener,
Writer out)
Encodes the server side action listener and writes it in the specified writer.
|
getEncodedPath, getMenuItemAt
public IlvDefaultPopupMenuEncoder()
IlvDefaultPopupMenuEncoder
instance.public void writeMenu(IlvMenu menu, Writer out) throws IOException
writeMenu
in class IlvPopupMenuEncoder
menu
- The IlvMenu
that will be encoded in a JavaScript array.out
- The writer used to write the result into.IOException
protected void writeAction(IlvMenuItem menuItem, Writer out) throws IOException
menuItem
- The menu item to encodeout
- The writer.IOException
protected void writeJavaScriptAction(JavaScriptActionListener listener, Writer out) throws IOException
listener
- The JavaScript action listener.out
- The current writer.IOException
protected void writeServerAction(ServletActionListener listener, Writer out) throws IOException
listener
- The server side action listener.out
- The current writer.IOException
protected String encodeImage(String imageURL)
imageURL
- The menu or menu item image URL.protected void writeJavaScriptString(String s, Writer out) throws IOException
s
- The string to write.out
- The writer to write to.IOException
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.