Am 2006-01-24 um 20:57 schrieb Paul McNett:

What do you think about that solution? If a field is designated as a 'list' type, the developer would have to be responsible for writing method code that would accept the field name as a parameter, and return a list to be used to populate the list. We could even specify two types of list: 'list' and 'ddlist', with the former creating a ListBox and the latter creating a dropdown list.

I've not yet an overview over dabo, so I can't really judge if this approach is good. I guess you/we will need some more types, like checkbox for yes/no fields, radiobuttons or tri-state checkbox for small sets and I don't know what else.

I guess the form xml file can't handle complicated stuff like e.g. a picture selector, so there should be some possibility to define some custom types easily.
I didn't yet look up how you handle the existing field types.

Currently, datanav.form defines three methods that could be of interest:

getEditClassForField(self, fld) --> class to use on edit page
getSelectControlClassForField(self, fld) --> class to use on select page getSelectOptionsForField()(self, fld) --> options for use in the select options dropdown

I've used getEditClassForField() to return dropdown lists and radio groups, set with their Choices filled in from a lookup bizobj and their DataSource and DataField set to the master bizobj. Pick an item from the dropdown, and the key value propagates to the master bizobj.

Similarly, I've used getSelectControlClassForField() to put a radio box of choices to select from in the select page.

This isn't exactly what you are talking about here, but I just wanted to point out what already exists.

Thank you for these hints!
I guess there's a lot possible with the existing dabo, but I imagined I could just enhance AppWizard's creation, because it's near to my goal.
But it looks like I must choose another approach.
I didn't find the right access to dabo's code yet. While trying to help with freeNotes, I reckognized that there's just too much essential information not in the API docs or the wiki. I guess I'll have to read and understand dabo's code myself, but at a first glance it's 'indirect' in a way that I don't understand yet.

Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net
http://www.cacert.org (I'm an assurer)



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Reply via email to