Jorge Godoy <[EMAIL PROTECTED]> writes:
> Hi,
>
> with the old AutoCompleteField I used to creat an instance as:
>
>
> widgets.AutoCompleteField(attrs = {'size':51},
> label = lazy_gettext(u'Metodologia'),
> name='metodologia',
>
> search_controller="/analises/search_metodologia",
> search_param="metodologia",
> result_name="metodologias",
> css_classes = ['required'],
> validator = validators.UnicodeString(not_empty
> = True)),
>
> But now I have some problems (one of them I solved by passing the value
> returned in a dictionary, since I'm only interested in the "text" part of this
> widget) that are:
>
> - how to validate only the text part? I'll never have an "id".
> - how to define the size of the text field?
> - how can I pass the "css_classes" to the text field, so that it gets
> properly formatted accordingly to my CSS rules?
I've been trying to find a test for this widget, but there seems to be
None...
And other compound widgets all create the validator for their inner widgets at
"definition" time, so I still have no idea of how to say that I *need* an
UnicodeCol for the text field widget that is inside the compound widget
AutoCompleteField.
I also need to say that this text field *can't* be empty in some of the forms
where I have AutoCompleteFields (and this imply in passing a CSS class for
visual feedback to the user).
Has anyone done that? I really wouldn't like to remove this nice facility
that was AutoCompleteField from my forms because of that...
So, the great doubt is: how to work with AutoCompleteFields completely
ignoring the id part and still havin all facilities with just the text part?
Should I contribute a new widget implementing the old behaviour for that?
--
Jorge Godoy <[EMAIL PROTECTED]>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---