Web pages to modify securities, positions


Is their an easy way to add or enable edits for securities and positions for the different asset classes that are supported?



You can modify positions/trades via the ‘Booking’ tab on the UI. if you right-click on a trade on the far left (once you’ve chosen a view), you can edit/add etc and form will pop up. You can’t directly edit securities definitions outside of exporting to a file, editing and re-importing.


Thanks Jim, that worked.

If we need to modify the pages themselves, do we go and change the .ftl files or the .html files also seen in the project workspace?


We have two versions of editing screens. For trades, the html files are likely to be the ones to change, although there is a fair bit of complex JavaScript around them.

Other things can be edited using a lower level set of web pages, accessed at http://your-server-and-port/jax . For those pages, the tfl files are the source files.

Bear in mind that if you make any changes, then upgrading to a future version of OpenGamma will be harder, as any changes we make to the files would oevrwrite your changes. You might want to consider forking the OpenGamma GitHub repository and making your changes there, so when you pick up a later version you get sensible diffs.


From the ‘Booking’ tab we can modify the positions/trades, do you have UI to modify securities?


Unfortunately no, not currently. The thinking was that most of the security definitions are loaded from a data provider, but we can now see there are times you would want to edit or add new security definitions manually so it’s on our roadmap for inclusion at some point.


I see, if we want to customize the “position” entity, so let’s say add more fields to it, what’s the best way of doing this?


You can add arbitrary named string ‘attributes’ to a position, although these aren’t editable in the UI presently, they should be displayed.


That worked thanks since I do some aggregation based on that field on demand, but I don’t see the attribute field when I click on ‘Edit Position’ or when I just view the position?


Also I am trying to update some .html files and .ftl files but the changes are not getting reflected when I build and run the server within eclipse?


This might be caused by the DEV vs PROD mode setting for the GUI (the “DeplyMode” enum class).

In the INI file that starts up your system you will find a reference to “WebsiteBundleComponentFactory”. That will have a “deployMode” parameter (which may be a property reference). Setting it to “DEV” will pickup changes immediately.


By default the mode is “DEV” only and I am running the examples simulated implementation. Still I made the change in the .INI file and don’t see the web pages getting refreshed. For e.g. I modified following files:


Also it’s difficult to identify if the page I am modifying is the one I am seeing on the web site, any guidelines on how to do that?


If we have to add new columns to the table/view/blotter that shows up when the user clicks on “Booking” tab, how do we implement it?



To add a new column in the blotter, have a look at ‘buildBlotterColumns’ in OG-Web/src/main/java/com/opengamma/web/analytics/BlotterGridStructure.java. The pattern there should be easily extended.

The templates are quite easily cached by the browser, I have found Chrome is particularly ‘good’ at caching these. So clear out your cache, not just a ‘Ctrl + F5’, to see if this fixes the problem.

The files found in OG-Web/web-engine/prototype/modules/views/securities are the pages you will see rendered at /jax/bundles/fm/prototype/admin.ftl#/securities/DbSec~12345 while the blotter forms are found in OG-Web/web-engine/prototype/modules/blotter/forms