groupID - where is it?

Questions and answers for designing and implementing forms in Servoy

groupID - where is it?

Postby steve1376656734 » Thu Nov 05, 2015 4:13 pm

In the wiki all the solution model form elements have a property called groupId which can be used to group elements together and allows you to enable/disable and make visible/invisible all the elements in the same group with a single line of code as in the following example:

Code: Select all
var form = solutionModel.newForm('someForm', 'db:/example_data/parent_table', null, false, 400, 300);
var label = form.newLabel('Green', 10, 10, 100, 20);
var field = form.newField('parent_table_text', JSField.TEXT_FIELD, 10, 40, 100, 20);
label.groupID = 'someGroup';
field.groupID = 'someGroup';
forms['someForm'].elements.someGroup.enabled = false;

Does anyone know how I can set the groupId in the form designer as the only way I can currently see to set it is by using the solution model and it would be far easier to do this at design time. Either it is not possible or I am staring straight at the solution and not seeing it!

Thanks
Steve
Steve
SAN Developer
There are 10 types of people in the world - those that understand binary and those that don't
steve1376656734
 
Posts: 189
Joined: Fri Aug 16, 2013 2:38 pm
Location: Lanzarote

Re: groupID - where is it?

Postby ROCLASI » Thu Nov 05, 2015 4:23 pm

Hi Steve,

In the form editor you select the elements you want to group together. Then hit the group button at the top of the form editor.
Now you have a new group element that you can name in the properties pane. This name is your group ID.

Hope this helps.
Robert Ivens
ROCLASI Software Solutions / JBS Group, Partner
SAN Developer / Servoy Valued Professional / Servoy Certified Developer
Twitter: @roclasi / @servoyforge
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5230
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: groupID - where is it?

Postby steve1376656734 » Thu Nov 05, 2015 4:48 pm

As I said - staring right at it and not seeing it :D :D :D :D

My wife calls this "boy-looking" as boys are incapable of finding anything, even when it is in plain sight.

Thanks Robert - you're a star.
Steve
SAN Developer
There are 10 types of people in the world - those that understand binary and those that don't
steve1376656734
 
Posts: 189
Joined: Fri Aug 16, 2013 2:38 pm
Location: Lanzarote

Re: groupID - where is it?

Postby steve1376656734 » Thu Nov 05, 2015 5:41 pm

Unfortunately I am now getting all sorts of problems when using the group feature. I have a form with 10 overlapping elements and have tried to create two groups with five elements in each group. Selecting the elements and clicking the group icon works fine and the group is created but as soon as I try to give it a name my Servoy Developer gives a NullPointerException and then hangs. Killing of the application and restarting it has allowed me to give a name to one of the groups but the other now constantly hangs the developer with the NullPointerException as soon as I try to name it.

Has anyone experienced this sort of issue and is there a way around it?

Thanks
Steve
Steve
SAN Developer
There are 10 types of people in the world - those that understand binary and those that don't
steve1376656734
 
Posts: 189
Joined: Fri Aug 16, 2013 2:38 pm
Location: Lanzarote

Re: groupID - where is it?

Postby ROCLASI » Thu Nov 05, 2015 5:59 pm

Are you on a Mac?
My workaround is to select the elements, group them. HIT SAVE (even deselect and select for good measure after save) and then set the name.

Hope this helps.
Robert Ivens
ROCLASI Software Solutions / JBS Group, Partner
SAN Developer / Servoy Valued Professional / Servoy Certified Developer
Twitter: @roclasi / @servoyforge
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5230
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: groupID - where is it?

Postby steve1376656734 » Thu Nov 05, 2015 6:04 pm

I am on a Mac - I'll try your workaround.

Has this bug been reported to Servoy?
Steve
SAN Developer
There are 10 types of people in the world - those that understand binary and those that don't
steve1376656734
 
Posts: 189
Joined: Fri Aug 16, 2013 2:38 pm
Location: Lanzarote

Re: groupID - where is it?

Postby ROCLASI » Thu Nov 05, 2015 6:11 pm

Hi Steve,

I thought I reported it but I checked the tracker and it's not there. So I guess I didn't and a quick search for group or grouped doesn't show it either.
So you are welcome to file this bug in the tracker. Post the case ID here and I will vote for it.
Robert Ivens
ROCLASI Software Solutions / JBS Group, Partner
SAN Developer / Servoy Valued Professional / Servoy Certified Developer
Twitter: @roclasi / @servoyforge
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5230
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: groupID - where is it?

Postby steve1376656734 » Thu Nov 05, 2015 6:27 pm

I have reported the "undocumented feature" as SVY-9052.

Do you know if this is only a Mac feature? If it is then I could create a windows virtual machine to get around it for now.
Steve
SAN Developer
There are 10 types of people in the world - those that understand binary and those that don't
steve1376656734
 
Posts: 189
Joined: Fri Aug 16, 2013 2:38 pm
Location: Lanzarote


Return to Forms

Who is online

Users browsing this forum: No registered users and 4 guests

cron