Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Profound UI alleviates the problem by separating the user interface into a separate Web 2.0 file, called a Rich Display FileFile™.  Rich Display Files are stored as JSON (JavaScript Object Notation) and constructed outside of the PHP script using the Profound UI Visual Designer.  The widgets in the Rich Display File are bound to named fields, which connect the user interface to the PHP script.

...

For example, if a Text Box widget is bound to a field named CUSTOMERCustomer, $_POST['CUSTOMERCustomer'] in your PHP controller can be used to retrieve the customer entered by the user.

...

The only required array element is ‘view’, which provides a path to the Rich Display File to use for displaying a screen.  For example, if you created a simple screen in the Visual Designer, to output this screen, you only need the following line of code in your PHP script.

Code Block
php
php

<?
echo json_encode(array('view' => '/dspf/myscreen.json'));
?>

...

  • view - path to the Rich Display File.
  • screen / screens – since multiple screens or formats can be defined in the Rich Display File, the ‘screen’ option allows you to specify the name of the screen to display. You can also specify an array of screen names that are to be overlaid using the ‘screens’ options.  If ‘screen’ or ‘screens’ is not specified, the first screen within the Rich Display File is displayed.
  • data – an array of simple name/value pairs used to populate the screen with data.  Additional name/value pairs can also be sent.  For example, you can send an entire database record to be displayed on the screen, even if some of the database fields are not defined on the display yet.  If these fields are later added to the display, the they will appear automatically without changes to the PHP script.  For Grid or Subfile data, an array of values must be sent, and each entry in the array should contain an object with name/value pairs corresponding to the cells in the grid.
  • controller – redirects control to another PHP controller.
  • redirect – redirects the browser to another Web site or URL.

...