Skip to main content
PREV CLASS NEXT CLASS FRAMES NO FRAMES

 

Class IlvPopupMenuFactory

IlvObject
   |
   +--IlvPopupMenuFactory

Category:
Common component
JavaScript File:
IlvAbstractPopupMenu.js
Description:

This class manages the pop-up menu communication between a thin client and the servlet.

The pop-up menu trigger event is the right-click.

See also:
IlvAbstractPopupMenu#isPopupTrigger
IlvAbstractPopupMenu#displayPopupMenu

Constructor Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
 
Second part of the displayPopupMenu method.
 
create(data)
Creates the pop-up menu by decoding the data sent by the servlet.
 
displayPopupMenu(view, event, modelId)
Sends a request to display a pop-up menu in a thin client.
 
Returns the string used as the request type when the thin client requests a pop-up menu from the servlet.
 
onload(context)
Stores/retrieves IlvPopupMenuFactory instances in a static variable, and manages the onload event.
 
readAction(item, array)
Override this method to handle more action types.
 
readMenu(array, path)
Decodes the array to create a IlvMenu.
 
readMenuItem(array)
Decodes the array to create a IlvMenuItem.
 
setRequestType(requestType)
Sets the string used as the request type when the thin client requests a pop-up menu from the servlet.
Methods inherited from class IlvObject
dispose, getClassName, hashCode, instanceOf, invoke, registerDispose, registerDisposeByClientId, removeHTML, setClassName, superConstructor, superInvoke, toString, updateVisibility
Constructor Detail
IlvPopupMenuFactory
IlvPopupMenuFactory()
Method Detail
asyncDisplayPopupMenu
asyncDisplayPopupMenu(data)
Second part of the displayPopupMenu method. As some tasks are synchronous and other are not displayPopupMenu contains the synchronous part, whereas asyncDisplayPopupMenu contains the asynchronous part.
Parameters:
data

create
create(data)
Creates the pop-up menu by decoding the data sent by the servlet.

The servlet response to the thin client request is in HTML format. If the response contains JavaScript variables, these can be accessed via data.variableName.

For example, if the servlet response is something like:

<html>
  <body>
    <script>
      myString = "hello world";
    </script>
  </body>
</html>
then the variable myString can be retrieved via data.myString.

This method should not be called directly as its implementation is synchronous and does not display any menu. You should always call displayPopupMenu instead of this method to display a pop-up menu.

This method only creates the pop-up menu by decoding the servlet response in HTML format.

Parameters:
data
Returns:
Nothing.
See also:
#displayPopupMenu
#getRequestType

displayPopupMenu
displayPopupMenu(view, event, modelId)
Sends a request to display a pop-up menu in a thin client.

This method returns immediately. It returns true if the event is not a pop-up menu trigger event; otherwise, it returnsfalse.

It performs the following tasks asynchronously:

Parameters:
view - The view with which the pop-up menu is associated.
event - The pop-up menu trigger event. An alert is shown if this event is not a pop-up menu trigger.
modelId - The id of the model.
See also:
#create
IlvAbstractPopup#isPopupTrigger

getRequestType
getRequestType()
Returns the string used as the request type when the thin client requests a pop-up menu from the servlet.

The request type is sent to the server so that the servlet knows the kind of content it should send back to the client. This request type is used each time a pop-up menu is requested.

The default value is popupmenurequested.

See also:
#create

onload
onload(context)
Stores/retrieves IlvPopupMenuFactory instances in a static variable, and manages the onload event.
Parameters:
context

readAction
readAction(item, array)
Override this method to handle more action types. Supported types by this factory :
Parameters:
item
array

readMenu
readMenu(array, path)
Decodes the array to create a IlvMenu.
Parameters:
array
path

readMenuItem
readMenuItem(array)
Decodes the array to create a IlvMenuItem.
Parameters:
array

setRequestType
setRequestType(requestType)
Sets the string used as the request type when the thin client requests a pop-up menu from the servlet. The request type is sent to the server so that the servlet knows the kind of content it should send back to the client. This request type is used each time a pop-up menu is requested.

The default value is popupmenurequested.

Parameters:
requestType
See also:
#create

©Copyright Rogue Wave Software Inc. 1997, 2018. All Rights Reserved.