For instance, often these models have data that needs to be shown onscreen to update the ui. The fields are simple there – whoa, available! So much easier than Java – to iterate through:
Once we can iterate through the fields, then we can throw them out onto the page. One way that I like to do this is by careful naming of page elements to correspond to field names in the object.
So, here’s a full-length demo (using jquery):
1 2 3 4 5 6 7 8 9 10 11 12 13
1 2 3 4
Now can I have my Christmas anagrams and go home?
Now, while this post is still young and tender, I want to make a final point of recording how to execute a function within an object. Let’s say that pojso became a little less plain and simple:
1 2 3 4 5 6 7
Now, in order to execute the new action function with the name (this would probably come in handy if you only had the name in some sort of programmatic instance, like executing all/a set of functions on the object in a loop, try this: