|
Property "Hyperlink | Value" <value> |
|
|
You can link to a target using the "Hyperlink | Value" property. The target can be a page or a command on the server. If the target is a page that is in the project, it is enough to give only the name of the page as the value without any extension (e.g. "Page1"). To link to a page that does not exist in the project , the full URL must be entered (e.g. "http://www.othersite.com/PageX.html"). A value is NOT accepted as a page name if:
Relative Linking When defining links to the pages in the project the links can be relative. When referring pages on different levels use "\" character not "/".
Displaying Pages When defining a link to another page it is enough just to give the name of the page e.g. "Page1". The Application Studio will expand it to "display.doms?pg=Page1". See MoreMotion AF Display Page Service. But sometimes we need to send additional parameters to the Display Service other than the page name. If that is the case we should write the full definition as follows display.doms?pg=Page1&parm1=somevalue&parm2=someothervalue
"pg=" treatment When a link value to a page is conditional through with a $vof() function, the value will not obviously be accepted as a page name. For example the following definition is INVALID. display.doms?pg=$vof(usertype = 'admin' ? 'AdminPage' ; 'UserPage') Because the Application Studio cannot recognize "AdminPage" or "UserPage" as page names. But Application Studio can recognize "pg=" definitions existing in a link value. So you can make a dynamic definition as follows knowing that Application Studio will be able to extract page names and report them as broken links in case they are unmatched. display.doms?$vof(usertype = 'admin'? 'pg=AdminPage' ; 'pg=UserPage')
How to overcome the refresh problem of browsers Depending on the browser settings and the header information of the HTML pages, the browsers may cash the pages to improve the performance. So, if an URL was used before, instead of making a call to the server the browser brings the page from local cash. This behaviour of browsers is not always suitable as it is the case in the below example: display.doms?pg=Products
If we want that each time ShowProduct is called to list the latest products the above definition may not work well since browsers will bring the page generated with this link from the local cash. You can overcome this problem as follows display.doms?pg=products_rand= "_rand=" is a special definition that you can use at the end of your link value (before the bookmark if available). The Application Studio will generate necessary Javascript codes to make sure that the link is unique each time it is clicked and therefore the browser will have to make a call to the server. Another alternative is using the "Avoid Browser Caching" property of the Page element. With this property you can instruct MoreMotion AF to insert necessary definitions in the response header to force the browsers not to cache the HTML page sent. See "Avoid Browser Caching" Property of Page element. See Hyperlink.
|