<viewlink>

You can also add a View Link component to a board in DesignStudio.

Mechanism to navigate to another view; rendered as <a> or <button>. For example, a summary list may have a <viewlink> tag that allows users to open a view showing a single record's detail.

Copy Code
<viewlink name="Detail" type="button">View Detail</viewlink>
<viewlink> attributes
Attribute Allowed Values Requirements Description
board %boardname Optional Name of the board that contains the view to link to.
dialogwidth NUMBER Optional Width of the dialog window that pops up with using the target="dialog" attribute; expressed as a percentage.
name|view %viewname Required Name of the view to link to.
ondialogclose Valid javascript Optional Used with target="dialog." This is the JavaScript to run when the dialog window closes.
refreshid %id Optional Used with target="dialog." This is the ID of the containing element refreshed when the dialog closes.
table %tablename Optional Name of the table that contains the view; overrides the board attribute.
target (%iframeid|parent|self|top|dialog|window|tab)self Implied

How the link is opened--that is, in a new tab, a dialog box, or a new browser window. When not included, the user leaves the existing view and navigates to the named view.

Explanation of allowed values:

  • %iframeid=element id

  • parent=parent view

  • self=current view

  • top=current window

  • dialog=a lightbox

    • ondialogclose – JavaScript function that is executed when the user closes the dialog box; this is used when more complex processing is necessary.

    • refreshid – identifier of an HTML element that should refresh when the user closes the dialog box; only the content of the target is refreshed.

  • window=separate browser window tab=new

  • tab in the current browser window

    Tab is not supported in WebEOC Nexus (10.x), but is supported in WebEOC (9.x).

type (button|link)link Implied How the tag is rendered.
* * Optional Passes any HTML attribute–except onclick and href–through to the rendered tag.

You can also use the target attribute in conjunction with an <embedview> tag to change the view that shows in the <embedview> tag. The view can be from the same or different boards in a view. The embedded view works like any other view, including automatic refresh when new data is added. The <embedview> tag is used to embed one view inside another and is rendered as an <iframe> . The target attribute of the <viewlink> tag specifies which <embedview> tag is to be replaced with the new view by referencing an ID given to the <embedview> tag.

Copy Code
<viewlink name="Input" type="button" target="InPageEdit" >Edit</viewlink>
<embedview name="Blank View" id="InPageEdit" width="800" height="600"/>

Tips

  • The <viewlink> tag is useful for list/detail display views.

  • When possible, include a <returnbutton> tag to take you back to the first view.

  • A view link within the <eocrepeatallrecords> block allows the editing of an existing record. A view link outside of the <eocrepeatallrecords> block creates a new record.

The <viewlink> tag allows view linking to views in other boards and specify the view linking behavior when working with embedded views.