On Wed, Jan 14, 2009 at 9:25 PM, Eiji Kitamura <[email protected]> wrote:

> Hi all,
>
>
> Current shindig implementation on both Java / PHP seems to default
> userp...@datatype to "string".
> This appies to following cases:
>
> 1. When UserPref doesn't have datatype attribute.
> 2. When userp...@datatype is specified empty.
> 3. When userp...@datatype value is not canonical or typo.
>
> I'd like them to throw exception instead of defaulting datatype to
> "string", so that developer won't get confused finding typo on their
> xml.
>
> But I'm concerning one thing:
> Gadgets already working may fail to load after applying this change.
> For example, if a gadget has its userp...@datatype as "strong" (not
> "string"), it had been happened to be working, but will fail.
> This may cause end users confused.
>
>
> I'll post a patch to fix this issue on PHP side.
> Can somebody post Java patch if this suggestion is affordable?


Unknown data types MUST be treated as strings. In reality, all user prefs
are treated as strings, and the "type" attribute exists for the purposes of
input validation and form generation. This is why there's only a single
setPref and not setIntPref, setBoolPref, etc.


>
> Thanks,
> Eiji
>

Reply via email to