pnForm
[ class tree: pnForm ] [ index: pnForm ] [ all elements ]

Class: pnFormContextMenuItem

Source Location: /system/pnForm/plugins/function.pnformcontextmenuitem.php

Class Overview

pnFormPlugin
   |
   --pnFormContextMenuItem

Context menu item


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods

Class: pnFormPlugin

pnFormPlugin::pnFormPlugin()
Constructor
pnFormPlugin::create()
Create event handler
pnFormPlugin::dataBound()
DataBound event handler
pnFormPlugin::decode()
Decode event handler
pnFormPlugin::decodePostBackEvent()
Decode event handler for actions that generate a postback event
pnFormPlugin::getIdHtml()
Utility function to generate HTML for ID attribute
pnFormPlugin::initialize()
Initialize event handler
pnFormPlugin::load()
Load event handler
pnFormPlugin::postRender()
PostRender event handler
pnFormPlugin::readParameters()
Read Smarty plugin parameters
pnFormPlugin::registerPlugin()
pnFormPlugin::render()
Render event handler
pnFormPlugin::renderAttributes()
pnFormPlugin::renderBegin()
RenderBegin event handler
pnFormPlugin::renderContent()
RenderContent event handler
pnFormPlugin::renderEnd()
RenderEnd event handler

Class Details

[line 25]
Context menu item

This plugin represents a menu item.




Tags:



[ Top ]


Class Variables

$commandName =

[line 44]

Command name passed to the event handler


Type:   string


[ Top ]

$commandRedirect =

[line 77]

URL to redirect to when menu item is selected

You can place {commandArgument} (including the braces) in your URL. This will get substituted with the command argument value of the pnformcontextmenureference plugin. In this way you can redirect to something depending on data.



Type:   string


[ Top ]

$commandScript =

[line 66]

JavaScript code to execute when menu item is selected

Your script will be wrapped in a function that passes a parameter "commandArgument". This parameter contains the command argument of the pnformcontextmenureference plugin. In this way your script can work with the menu item data you clicked. Example:

  1.  <!--[pnformcontextmenuitem title=Preview imageURL="preview.gif" commandScript="popupPreview(commandArgument)"]-->
  2.  
  3.  <script type="text/javascript">
  4.  function popupPreview(commandArgument)
  5.  {
  6.    alert(commandArgument);
  7.  }
  8.  </script>



Type:   string


[ Top ]

$confirmMessage =

[line 89]

Confirmation message

If you set a confirmation message then a ok/cancel dialog box pops and asks the user to confirm the menu item click - very usefull for menu selections that deletes items. You can use _XXX language defines directly as the message, no need to call <!--[pnml]--> for translation.



Type:   string


[ Top ]

$imageURL =

[line 37]


Type:   mixed


[ Top ]

$title =

[line 34]

Menu title

Language constants can be used here.



Type:   string


[ Top ]



Class Methods


method create [line 98]

void create( &$render, &$params)



Overrides pnFormPlugin::create() (Create event handler)

Parameters:

   &$render  
   &$params  

[ Top ]

method getFilename [line 92]

void getFilename( )



[ Top ]

method getParentContextMenu [line 174]

void &getParentContextMenu( )



[ Top ]

method raisePostBackEvent [line 162]

void raisePostBackEvent( &$render, $eventArgument)



Parameters:

   &$render  
   $eventArgument  

[ Top ]

method render [line 103]

void render( &$render)



Overrides pnFormPlugin::render() (Render event handler)

Parameters:

   &$render  

[ Top ]

method renderConfirm [line 149]

void renderConfirm( &$render, $script)



Parameters:

   &$render  
   $script  

[ Top ]


Documentation generated on Fri, 18 Jul 2008 21:45:46 +0200 by phpDocumentor 1.4.1