You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Ian MacLarty <ia...@gmail.com> on 2009/06/09 03:12:14 UTC

question about IChoiceRenderer#getIdValue

Hello,

I wonder if someone could clarify when it is safe to use the index as
the value for IChoiceRenderer#getIdValue.  The documentation says that
you can use the index if the list is stable.  However I have a list
that is sorted differently depending on the current locale and the
user may change their locale at any time (the list is sorted in
onBeforeRender).  I tried using the index for getIdValue and it all
seemed to work fine.  If the user changed their locale the drop down
list would update correctly.  Is this safe to do?  I would prefer to
use the index if possible, since the real "primary key" would be quite
long and would increase the size of the post data significantly.

Cheers,
Ian.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: question about IChoiceRenderer#getIdValue

Posted by Ian MacLarty <ia...@gmail.com>.
On Tue, Jun 9, 2009 at 11:23 AM, Igor Vaynberg<ig...@gmail.com> wrote:
> no its not really safe if the changes to locale resort the list.
>

Okay, thanks.

Ian.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: question about IChoiceRenderer#getIdValue

Posted by Igor Vaynberg <ig...@gmail.com>.
no its not really safe if the changes to locale resort the list.

-igor

On Mon, Jun 8, 2009 at 6:12 PM, Ian MacLarty<ia...@gmail.com> wrote:
> Hello,
>
> I wonder if someone could clarify when it is safe to use the index as
> the value for IChoiceRenderer#getIdValue.  The documentation says that
> you can use the index if the list is stable.  However I have a list
> that is sorted differently depending on the current locale and the
> user may change their locale at any time (the list is sorted in
> onBeforeRender).  I tried using the index for getIdValue and it all
> seemed to work fine.  If the user changed their locale the drop down
> list would update correctly.  Is this safe to do?  I would prefer to
> use the index if possible, since the real "primary key" would be quite
> long and would increase the size of the post data significantly.
>
> Cheers,
> Ian.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org