You can use a custom URL for an action to redirect a user to a custom page when the user executes the action. These custom actions can lead to insert, update, grid and details views as desired. To set these URLs, add metadata XML to the table as described in this topic. For example, this 'foo' action will override the updateUrl on a DbUserSchema table:

<table tableName="testtable" tableDbType="TABLE">
<updateUrl>/mycontroller/foo.view?rowid=${rowid}</updateUrl>
</table>

Customize URLs for Actions

updateUrls and tableUrls support a substitution syntax that embeds the value of one of the data row's columns into the URL, as shown above. If a column cannot be resolved, the URL will be ignored. For more information, see the documentation for ColumnType.url

Available Options

  • insertUrl - used to control the target of the Insert New (single row) button
  • updateUrl - used to control the target of the update link
  • deleteUrl - used to control the target of the Delete button
  • importUrl - used to control the target of the Import Data (bulk entry) button
  • gridUrl - used to control the default grid view of a table
  • tableUrl - used to control the target of the details link

Turn Off Default URL Actions

insertUrl, updateUrl, tableUrl, deleteUrl, and importUrl may be set to a blank value to turn off the corresponding UI for a table.

For example:

<insertUrl />

This is handy if you wish to disallow edits on a per-record basis, or you wish to enforce additional conditions on where/when/which users can edit records. Developers have found that it is easier to turn off insert/edit/delete privileges by default and only enable editing in particular cases. For example, you might wish to allow updates only if the record is in a particular quality control state, or if the user is part of a particular security group. Note that this only changes the user interface presented to users, it does not actually change a user's ability to submit via the API or go directly to the default URL.

Related Topics

Was this content helpful?

Log in or register an account to provide feedback


previousnext
 
expand allcollapse all