Thanks Adrian.

Should this be requested as an enhancement to the framework, Ed?


Adrian Klaver wrote:
> On Wednesday 18 March 2009 10:43:12 am Frank Cazabon wrote:
>   
>> Hi Ed,
>>
>> I thought I had answered this, but guess I didn't cause I'm not seeing
>> it in GMail's sent box.
>>
>> Anyhow, what I do is run the form, it gets displayed with a blank record
>> and the dropdown showing the "please select a client" text.  Without
>> touching anything on the screen, I press the Save button.  The record
>> counter increments and the "invalid" record apparently gets added with
>> the invalid client.  I see below that you said it gets called for every
>> *changed* record.  In this case shouldn't it get called?  Or is a new
>> record not considered "changed"?
>>     
>
> Correct. The only way I have gotten this work is to set Default value for the 
> data field in the DropdownList. This way the value is set and the form sees 
> the 
> record as having changed and saves the record.
>
>   
>> The validateRecord() was copied and pasted from the web page directly
>> into the correct bizobj file.
>>
>> Ed Leafe wrote:
>>     
>>> On Mar 16, 2009, at 7:16 AM, Frank Cazabon wrote:
>>>       
>>>> just had a few minutes to look at the changes over the weekend and
>>>> everything looks OK now.  Just one question.  You added in a
>>>> validateRecord method (is that what you call them in Python/Dabo?) but
>>>> didn't see where you call it from so assumed the framework
>>>> automatically
>>>> called it, but that's not happening.  Do I need to put in a manual
>>>> call
>>>> in the "presave" (or whatever it's called) method?
>>>>         
>>>     'validateRecord()' is automatically called for every changed record
>>> as part of the pre-save routine. It is called after 'beforeSave()' but
>>> before the call to write your changes to the database.
>>>
>>>     Are you sure you created that method in the bizobj, and spelled it
>>> correctly? Is the data in the record definitely modified?
>>>
>>>
>>> -- Ed Leafe
>>>       
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to