I stand partially corrected… ![Very Happy :D]()
You can, sort of get, the type, the following way:
plugins.dialogs.showInfoDialog('ElementType',forms[form].elements['name'],'OK')
For Beans you seem to get the Java Object as a string.
I also noticed that something I took for granted doesn’t work for Beans:
forms[form].elements[j].getName();
I assume this doesn’t work on beans, unless itimplements the getName method on the highest level (which is not the case for the PDFEncoder, on which I tested).
So, besides a getType function I’d also like a getName function, which returns the name which you can set on each element in the Servoy Property Editor.
With these functions, you can then loop through all elements on a form, getting their name and type and build your own security, based on named elements. The reason I would need the getType is because per element type you can implement different security features, like: enables, visible, readonly etc…
Tnx in advance again..
Paul
PS: I noticed that adding a portal to a form makes all the selected columns in the portal show up as elements on the form on which the portal is placed on in the Servoy Editor. This way you get acces to functions that shouldn’t be available/do nothing anyway. Is this correct?
PS2: when a Protal is placed on a form, the elements.length function seems to give an incorrect lenght. In my case, with 6 named elements on the form, the function only gives a length of 8, while there are 14 elements shown in the Servoy Editor (8 of them columns in the portal). Doesn’t soudns right to me…