« [Tip] Calculate Age | Main | [Tip] inline Servoy Sample Code »
September 29, 2004
[Tutorial] Forms, Elements and Methods Overview
by Marcel Trapmanwww.it2be.com
Ok, here you are, you are developing your very first Servoy (test) application and you get stuck because of those tiny little things you don't know of.
With this little article I take a shot at helping you to understand some things about forms, elements and methods. Not a complete tutorial and not a complete reference at all. My only goal here is to help you developing your solutions with Servoy.
- are the basis for your solutions window
- are based on one table of your database(s)
- can contain all kinds of elements
- can contain methods
- titleText: can be used to set the title of a window, combined with tags %%tag%% and i18n very powerfull
- onXXX: these properties can be set to attach a method to the named event or 'menu' choice. In case you attach a method to a 'menu' choice you replace the 'standard' functionality with your custom functionality
- view: there are 3 possible views, record-, list- and table-view. The first two can be viewed in normal mode, giving the user the possibility to switch between views. Little downside of these views is a 'margin' on the left, needed to show the location of the record in the table. However, when you lock the view, user-switching of the view is not possible anymore and the 'margins' are gone.
- a reference to a form could look like forms.formname
- in some environments known as objects
- field elements can be chosen when creating a new form
- all elements can be chosen from the menu and placed everywhere on the form
- fields can be changed into comboboxes, htmlfields etc (holding a reference to the dataprovider (column/field) of the table of the form or a related dataprovider) via the displayType property
- the tab sequence of elements can be set via the tabSeq property
- can be labels, graphical elements, beans etc.
- the name property: by setting the name property of an element you are able to individually set the properties of the element via a method
- element properties and functions can be set/called from within a form like 'elements.elementname.property' or from other forms or global methods in the following manner: 'forms.formname.elements.elementname.property' (there are more dynamic methods but again these go beyond the scope of this article)
- readOnly: elements can, individually, be set to be 'read only'. However there is also a form/controller property named controller.readOnly. By using this property you set all elements that have the readOnly property. Please bare in mind that by using this controller property you also set this property for possible tabpanels/forms on the form you call the controller from
- enabled: see the above
- aka scripts or maybe classes
- contain code (javascript) that has to be executed
- can be global, attached to (events of a) form or attached to (events of) elements
Marcel
| Posted by IT2Be on September 29, 2004 at 12:23 PM in Tutorials | Permalink
TrackBack
TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d8341c8d8153ef00d8344e915c53ef
Listed below are links to weblogs that reference [Tutorial] Forms, Elements and Methods Overview:
Comments
Great site, well done.
I enjoy beeing here and i´ll come back soon.
You do a great job. Many greetings.
Posted by: Tammy | Jun 15, 2005 10:10:57 AM