OnclickNewWindow

From Plex-XML
Jump to: navigation, search

The onClickNewWindow template generates all the code you need to call a Plex-XML function and to display the response in a new window.

In addition it prepares a XML-Http request if you like to open an AJAX-Window and it prepares the opening function FindBrowse to refresh when the window is closed.

Contents

Properties

<formName>

Name of the web request that should be executed.

<formName>MyWebRequest</formName>

<param>

Parameter that should be passed to the request.

  • Parameter with a fix value:
<param value="FixValue">FooParameterNameinRequest</param>
  • Parameter with a variable value from the XML response:
<param value="{$vActID}">FooParameterNameinRequest</param>
  • Parameter with a variable value current HTML-Form (get current value by id):
<param form="ActMainUDHelp" field="ATOfAT">FooParameterNameinRequest</param>

<realWin>

With realWin you can force a function to open in a new browser window or in an AJAX-Window. If you omit this property the user parameter or the system parameter RealWin is used.

  • true or false
<realWin>false</realWin>

<options>

A list of options that can be passed as parameter to an AJAX-Window (<realWin>false</realWin> ).

  • modal:true: For a modal window.
  • progress:true: Shows a loading image + text while the request is processed. Could be used for longer lasting requests.

Processing.png

Example:

<width>400</width>
<height>200</height>
<realWin>false</realWin>
<options>{modal:true, progress:true}</options>

<width>

Width of the new window in px.

<width>1300</width>

<height>

Height of the new window in px.

<height>1000</height>

<cancelBubble/>

Generates a "event.cancelBubble=true;". It stops the event subsequently call on every ancestor (containers of containers of etc.) of the DisplayObject that originally dispatched the event.

Useful e.g. for a link in a grid row with a GridRowOnClick.

<cancelBubble/>

Example

Opens a modal AJAX-Window (300x500px).

<xsl:call-template name="onClickNewWindow">
  <xsl:with-param name="param">
    <formName>FooRequest</formName>
    <param value="{$varPar1}">Parm1</param>
    <param value="{$varPar2}">Parm2</param>
    <action>P</action>
    <realWin>false</realWin>
    <options>{modal:true}</options>
    <height>300</height>
    <width>500</width>
  </xsl:with-param>
</xsl:call-template>
Personal tools