--- On Fri, 4/23/10, Adam Heath <[email protected]> wrote:
> Adrian Crum wrote:
> > --- On Fri, 4/23/10, Robert Morley <[email protected]>
> wrote:
> >> +1 - I think properly modeling the
> >> field using the required-field attribute makes
> perfect
> >> sense. I would think our html form renderer
> >> implementation should probably just apply a class
> "required"
> >> at render time and the visual should be handled by
> css.
> >
> > I believe I was the one who introduced the required
> CSS class and that was my reasoning - have the style sheet
> determine what a required field looks like.
> >
> > At the time, the asterisk was being used to indicate a
> required field. The problem was, most forms didn't have an
> explanation as to what the asterisk meant. So the result
> looked odd.
> >
> > No "best practice" was discussed or decided upon. I
> just put the new CSS class in the style sheet and I left it
> to the community to decide by using it or not.
> >
> > I like the idea of service definitions driving the
> required fields.
>
> Sure, that would be nice. However, what happens when
> service A calls
> service B, and service C sometimes dependening on the
> situation. How
> would you chain the validations, so that no processing code
> was run in
> A until both B and C were satisified that the data was
> correct?
The model widget could crawl service definitions and service code, following
each execution branch. It would collect all required parameters along the way.
Which branch the program flow will take could be predicted by extrapolating
user intent from a histogram of previous user activity. The resulting service
code branch could then be examined for parameter validation (not empty, upper
case, digits only, etc) and that information can be fed back to the user as
well.
Just kidding.
Twine and duct tape?
>
> >
> > -Adrian
> >
> >> On Apr 23, 2010, at 2:35 PM, Bilgin Ibryam wrote:
> >>
> >>> Here is what I propose:
> >>> Remove all the ${uiLabelMap.CommonRequired}
> tooltips
> >> from form definitions. The tooltip should be used
> to provide
> >> other information as it is for not required fields
> (the
> >> purpose of the field, the format)
> >>> Remove all the widget-style="required" from
> form
> >> definitions.
> >>> If a field is required, (on form widget) set
> only its
> >> attribute required-field="true". In cases when the
> form is
> >> based on service definition (auto-fields-service)
> it is not
> >> neccessary to set this attribute. Then no
> need to add
> >> tooltip="${uiLabelMap.CommonRequired} or
> >> widget-style="required" attibutes on the form
> definition.
> >> The renderer should decide how to indicate the
> required
> >> field.
> >>> Change form renderer, so if a field is
> required it is
> >> indicated by asterix plus required style ( same
> as
> >> widget-style="required")
> >
> >
> >
>
>