How to see/access fields under the feature name on console

20 views
Skip to first unread message

William Fujioka

unread,
May 16, 2017, 9:43:20 AM5/16/17
to togglz-dev
Hi Christian,

I'm wondering how to show / access the fields under the feature name (Owner and Issue fields, see attachment).  How does this work and is there a protocol I can follow to create our own fields we can associate with a particular feature.

Thank you!

Will


togglz-console-pic-from-togglz-site.png

Christian Kaltepoth

unread,
May 16, 2017, 11:20:07 AM5/16/17
to toggl...@googlegroups.com
Hey William,

these fields are called "custom feature attributes". They are statically defined on the feature enum using annotations. Have a look at the "Owner" attribute for a simple example how to define your own attributes.


Christian

William Fujioka

unread,
Jun 5, 2017, 2:21:09 PM6/5/17
to togglz-dev
Thanks for the 411, Christian!  

Now, i'm wondering if there's a easy way of making my custom fields viewable (not editable) on the console.  Is there anything I can override to do this?  

I thought maybe I could use custom annotation to do it but unfortunately, java 8's default methods doesn't apply for annotations.

Any thoughts or insights would be greatly appreciated!

Many thanks!

Will

Christian Kaltepoth

unread,
Jun 6, 2017, 1:35:13 AM6/6/17
to toggl...@googlegroups.com
Will,

if you define new attributes using the API referenced above, they should automatically show up in the console.

Christian

William Fujioka

unread,
Jun 6, 2017, 3:07:07 PM6/6/17
to togglz-dev
I guess I'm wondering if there's a way of seeing my new fields I've created for the Togglz table on the admin console?

Thanks!

Will

Christian Kaltepoth

unread,
Jun 7, 2017, 8:08:26 AM6/7/17
to toggl...@googlegroups.com
AFAIK they should appear automatically...

William Fujioka

unread,
Jun 7, 2017, 11:31:49 AM6/7/17
to togglz-dev
I apologize, I should have been clearer.  

I'm describing the new fields in the database that I've implemented when overriding JDBCStateRepository.

I've added two new fields (MODIFIED_BY and MODIFIED_DATE) and had overridden the setFeatureState, getFeatureState, and afterSchemaMigration methods to add these new fields.  It seems to be working properly, now I see these fields in the database but was curious if its possible to make these fields visible on the admin console.

Thanks again!

Will

Christian Kaltepoth

unread,
Jun 7, 2017, 11:36:13 AM6/7/17
to toggl...@googlegroups.com
Ah, ok. Now I understand.

No, there is currently no simple way to do it. However, please note that in such situations it usually makes sense to create your own admin console. This is really straight forward. It is simple CRUD and all the backend methods already exists. :-)

Christian

William Fujioka

unread,
Jun 13, 2017, 9:15:43 AM6/13/17
to togglz-dev
I see.  appreciate the insight.

Thanks!

Will
Reply all
Reply to author
Forward
0 new messages