Hi everyone, Hi Erik,

   I am sorry for so late post. But am going to go back to our
DropDownChoice discussion.
   If you suggest me to create a list of integers and use a special
renderer implementation to retrieve a displayable value you should
take into account that in case if we have a list of indices we can
easily look up in an array or a list using an index. But if we have a
list of unordered integers for example to do such a lookup we need to
create a map and search this map every time we render a single option.
That comes from the fact that a relationship between a value and its
displayable equivalent is not obvious for a renderer. So I would ask
to add an index of an options being rendered to the getDisplayValue
method.

   Vitaly

On Fri, Mar 7, 2008 at 10:33 PM, Erik van Oosten <[EMAIL PROTECTED]> wrote:
> Hello Vitaly,
>
>  That is not true, you are thinking to complicated (I did in the past as
>  well).
>
>  If you want to set an integer on the model, then the choices must be a
>  list of integers. In addition you set an IChoiceRenderer that can
>  display the integer as a sensible string.
>
>  Regards,
>     Erik.
>
>
>
>
>
>  Vitaly Tsaplin wrote:
>  >    The DropDownBox component is in fact well designed in theory. But I
>  > think the way it works is a bit inconvenient in practice. Normally the
>  > main purpose of this component in to supply some value or an index for
>  > a model but a label is needed only for to be presented to a user.
>  > Unfortunately we are supposed  to use either the same value (a string
>  > representation) for both pupposes or to use some kind of a wrapper and
>  > to pollute the model by some strange "SelectOption" object even though
>  > that the model would normally accept an integer.
>  >
>  >    Vitaly
>  >
>
>
> > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  > For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to