OnRender problem in Servoy 7.1

Discuss all problems you have with Servoy here. It might help to mention the Servoy version and Operating System version you are using

OnRender problem in Servoy 7.1

Postby vincentc » Fri Apr 26, 2013 11:26 am

Hello,

We encounter a problem with the onRender event on Servoy 7.1. There was no problem with exactly the same code in Servoy 6.

Code: Select all

function onRender(event) {
      /** @type {JSRecord<db:/udm/companies>}*/
      var rec = event.getRecord()
      
      if (rec.is_active == 0)
      {
         event.getRenderable().fgcolor = '#C0C0C0';
      }

}



When I make a search on a field which have an event "onRender", I have this message :

TypeError: Cannot read property "is_active" from


It's like if the getRecord() method was no more recognized by Servoy.

The interesting thing is that the problem happens only when I press the key "Enter" to run the research.

Thank you in advance for your help.
vincentc
 
Posts: 56
Joined: Thu Aug 25, 2011 11:12 am

Re: OnRender problem in Servoy 7.1

Postby jcompagner » Fri Apr 26, 2013 4:54 pm

where is that onrender attach on? on the form? or just on a field itself?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: OnRender problem in Servoy 7.1

Postby vincentc » Fri Apr 26, 2013 5:54 pm

The onRender is on the field itself. The errors occurs when I am in find mode and I fire the reasearch on this field with the key "Enter".
Thank you.
vincentc
 
Posts: 56
Joined: Thu Aug 25, 2011 11:12 am

Re: OnRender problem in Servoy 7.1

Postby jcompagner » Mon Apr 29, 2013 12:15 pm

In findmode there is not really a db record where you can ask that 'is_active' from
Because that is a FindState which hold the values a users sets that should be used in a search.

You can make a case for this to check this out.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Discuss possible Issues and Bugs

Who is online

Users browsing this forum: No registered users and 14 guests