onrecordselection

Questions and answers for designing and implementing forms in Servoy

onrecordselection

Postby Stef » Wed Jan 07, 2004 3:57 pm

When I use a method "onrecordselection" on a form it also executes on all forms of this table when selecting a record. It should only work on the form where I have put this in the properties.

Bug?

Best regards,
Stef
Stef
 
Posts: 208
Joined: Wed May 28, 2003 2:19 pm
Location: Kasterlee, Belgium

Postby Harjo » Wed Jan 07, 2004 4:48 pm

Yeah in my solution too!

when you jump to another form, the onrecordselection stays
when you go to design-mode en back to browse, the onrecordselection is gone.

This is, I think, not right behaviour!
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Postby IT2Be » Wed Jan 07, 2004 7:32 pm

I discussed this with Servoy since I had the same issue but the other way round.

When I select a record in a portal and then open the related form I expected the onRecordSelection to fire and the attached method to execute. Unfortunately it doesn't. Next to that if I close that form after doing a new selection that selection stays intact.

It is not a bug however. The onRecordSelection event is a database trigger. We only select the record once and thus we fire it once. If we attach a method that means we trigger the foremost method and the rest is not triggered (ever if we don't select a new record).

To avoid this we can work with a seperate foundset and hand over the selection...
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Postby jcompagner » Thu Jan 08, 2004 8:53 pm

to give some more points.
We have to to this. Because if someone builds a method that set's some things (enables/disables or visibilty of fields) when a record get's selected then this must be done for that form.. even if it is showing or not.
Because when you do switch to that form. That form must be in a valid state.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Postby Guest » Fri Jan 09, 2004 2:34 pm

OK, got the point.

In some cases it's useful, in others not.
Maybe "onrecordselection on current form" could be an interseting feature.

Stef
Guest
 

Postby IT2Be » Fri Jan 09, 2004 5:04 pm

I guess you can also set a global variable opening and closing forms to use this as a trigger for (part of) a method...
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany


Return to Forms

Who is online

Users browsing this forum: No registered users and 3 guests