Where could Ruby Script be inserted in UI Designer
(1) In Event operation with type “Script”
if ($data.UIState.ViewSwitchSelectedItem == "Collections")
(2) In Operation configure tab:
(3) Dynamical manipulation on the value of control attribute via Script Take “Visible” for example:
Then you can write script here:
How to debug Script in the runtime
Still take the Script above as example, if you just would like to know the actual value of $System.ClientType in the runtime, it is not necessary to figure it out via debugging. Instead, append the url fragment “debugMode=true”, and then launch application again.
Press control key and click page, the client Inspector will be opened. Switch to tab “Data Model”, search by keyword “ClientType”, and then you can get its runtime value “NEW_HTML”.
来自 “ ITPUB博客 ” ，链接：http://blog.itpub.net/24475491/viewspace-2716786/，如需转载，请注明出处，否则将追究法律责任。