|
Strandz Features |
| Home.About Strandz.Example.Strandz Features |
|
|
|
|
Application Source Code Here we take a look behind the scenes at some of the more interesting headings from Rostering Application Help and see how they were implemented using Strandz. Goto a Worker by the first letter of his surname
To take a look at the source code for this you reason that there must be some sort of controller that receives events from an 'alphabet bar' widget: that listens to a letter button press and does something about it. Thus one place to start looking would be in the controller package,
Two things are interesting about
A user being able to construct a query by 'filling in a form' is part of the fundamental behaviour of any node. Thus you can switch this functionality on or off on a per-node basis. Of course you can do this dynamically in response to some kind of state change, in which case you would be able to find the actual code as part of the controller, and thus in the package
A node is just a JavaBean and the relevant boolean 'allowed' properties are
To make sure that nothing special is going on with 'enter query' and 'search' functionality, we take a look at the constructor for RosterWorkersTriggers, and see that it sets up all the expected triggers. It calls
A valid question to ask with regard to this kind of searching would be: Can you do wildcard searches? To be consistent with the design of Strandz we could provide this functionality via a Node's callback trigger whose job is was to return whether a match had occurred or not. Thus the Strandz programmer could define for himself what went on here, what regular expressions were recognised etc. This has not been implemented for Wombat Rescue. If this functionality was available the setup for it would be expected to be found in
Taking a look inside
Record validation occurs in response to different events than field validation, and would normally access more than one attribute. Apart from these facts the two types of triggers are pretty similar. Because Strandz has various concepts of a group of items, whether they be all in the same node, all on the same pane or all within the same strand, then it is able to copy all these values away to a buffer. Thus copying and pasting are able to be implemented with just a few API calls. No matter what type of application-housing a Strandz application uses, it will always have an ActualNodeControllerI that can have abilities addes to it. In this case we are adding the abilities Copy and Paste. Note that you could use any kind of other Strandz or non-Strandz way (or combinations of ways) of activating these events. Conversely ActualNodeControllerI abilities can be used to activate any kind of event. Thus while copying and pasting to a buffer is a feature of Strandz, and so are ActualNodeControllerI abilities, these two concepts have no other relationship to one another, even though we happen to be using them together here.
The actual calls themselves could not be simpler. To copy away to a buffer |