Re: Added *lightweight* user meta data
Franck Routier <[email protected]>
| Newsgroups | gmane.comp.java.orm.simpleorm |
|---|---|
| Message-ID | <1216970362.5544.12.camel@franck-laptop> |
Hi Anthony,
right now, I tend to use column name as a conventional link between my
UI layer (labels, html tag id or name, ...) and my records (or
eventually qualified column name, but in fact I have schema-wide unique
column names). So I didn't have the need for this.
That said, it could be useful to carry other display information for
example... I had to extend some SFielMetas just to trigger a special
display based on type (password, big deciaml as percentage, ...)...
So yes, will be useful to carry on display information that is
independant of data itself.
The "DISPLAY_LABEL" example is nice because anybody will understand it,
be it will also brings localization questions and so on.
What about these other examples :
new SFieldBigDecimal(meta, columnName, precission, scale,
pvals).putUserPorperty("DISPLAY_MODE", "Percent");
or new SFieldString(meta, columnName,
20).putUserPorperty("DISPLAY_MODE", "Password");
In fact I like it :)
Thanks,
Franck
Le vendredi 25 juillet 2008 à 12:08 +1000, Anthony Berglas a écrit :
> From the examples:-
>
> public static final SFieldString EMPEE_ID
> = (SFieldString) new SFieldString(meta, "Empee*Id", 20,
> SScalarFlags.PRIMARY).setQuoted(true)
> .putUserProperty("DISPLAY_LABEL", "Employee Nr");
>
> String label = Employee.EMPEE_ID.getUserProperty("DISPLAY_LABEL");
> ses.getLogger().message("Employee " + label + ": " +
> e100a.getString(e100a.EMPEE_ID) );
> TestUte.assertEqual("Employee Nr", label);
>
> Just a simple hash map. Much better than my earlier attempt which
> Franck had deleted.
>
> Franck, would this be useful to you in practice?
>
> Anthony
>
> Dr Anthony Berglas, [email protected] Mobile: +61 4 4838 8874
> Just because it is possible to push twigs along the ground with ones
> nose
> does not necessarily mean that is the best way to collect firewood.
>
>
>
>
>
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/SimpleORM/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/SimpleORM/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[email protected]
mailto:[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/