in one of our projects we have a requirement for a custom input fmask.
One issue with the standard input mask is the order in which the fields show up in the form. I have the impression that in a local database this depends on the order they have been imported in. In the case of projects with data in a remote Oracle database It seems random...I don't see how I can influence it. People usually have a certain logic they use when they create a record, and they would like to follow a certain mental order. Also, some fields are used only seldom, and these should show up at the bottom. Another point is that they would like cascading drop-down lists: in one example, there is a list of buildings and a lists of rooms. They would like to select the building and then in the second drop-down only see the room numbers that are from that building.
Also, if the user is logged in, it would be nice to have the "entered by " field, pre-filled. Same thing for the "entered date".
Judging from some script examples that I have seen, it should be possible to create such a form using Groovy. This would require writing the whole mask from scratch. I have seen some examples using SwingBuilder and it seems doable. The one thing I wouldn't know how to do though is adding Marvin Sketch to the form to allow drawing a structure, and then get the molecule from the sketcher into the Structure field. Do you have any examples of how to do this?
Another idea would be to misuse a regular form to create an input form. This would save a lot of work, in designing the mask but how would I get things like automatic filling the user id into "the entered by" field to work? And how about the cascading drop-down? Would this work at all?
I would appreciate if you could point me in the right direction, and if you could provide some sample Groovy code for adding Marvin to a Frame.