This page last changed on Apr 29, 2007 by scytacki.

This is similar to Object Templates. The idea here is that some views which are currently implemented as java classes, could be implemented with otrunk objects instead.

For example there is an ot object that represents a Data Logger setup configuration (OTDataLoggingRequest). One view for this object is a button that sends the request to the current logger when pressed. This view could be implemented with OTrunk objects instead a java class.

The view would be something like


This can be implemented by copying the object inside of the template element and inserting the object being viewed at the at the insertPoint. Doing the inseration is tricky, because an id can't be used because it will not be the same after the OTSetupLogger has been copied. However the concepts of templates could be used, so the id of the "template" can be used and it will just be overridden. Fo example if you think of the template as an authored object, and the instance of the template is the user object. Then just the same way a user can set a value in a particular place, the instance of the template can have its object set in a particular place.

A further extension of this is to be able to choose arbitrary parts of the object being viewed to insert. This is more like a mapping. So in the simple example it would say put the root object at this point. The more complex case would say put this attribute of the root object in place 1, and this attribute of root in place 2.

Because viewEntries are implemented on top of the core OTrunk framework, then if the OTrunk frame suppoted the basic concept of these types of templates, then this facility could be used here. So no special code is needed.

The difficult part of this is with user data. If a particular view can create user data. Because the view was created dynamically, there is prexisting location to store the user data. However a new area can be created that stores the data in a way that is specific to the dynamic view, but it contains references to the original objects that created the dynamic view.

So if a report needs to find the information about a particular orginal object it will need to search for references to this object or its sub objects in the dynamic view user state area.

Document generated by Confluence on Jan 27, 2014 16:52