new editable summary fields

John Mazzitelli mazz at redhat.com
Sat Dec 11 21:28:49 UTC 2010


I think I solved the "ghost pencil" problem (the editable/read-only 
fields in the summary areas where the pencil was slow to render and then 
when you moved away it stuck around for 5s and then disappeared).

https://bugzilla.redhat.com/show_bug.cgi?id=662337

(note: I got started down this path because I needed an editable 
boolean/checkbox field for the recursive-flag setting - see 
https://bugzilla.redhat.com/show_bug.cgi?id=661887 )

I checked in a new implementation. ToggleableTextItem has gone away, 
EnhancedDynamicForm was altered to no longer use that type and a new 
custom RHQ form item component has been introduced - EditableFormItem, 
with a subclass CheckboxEditableFormItem (the former allows you to edit 
via a text field, the latter allows you to edit a boolean value via a 
checkbox. EditableFormItem is extensible in case we want to add other 
editable fields like radio buttons, text areas, drop down menus, etc.).

In our views that use this today, they are still in 
EnhancedDynamicForms, but this new implementation no longer requires you 
to use that custom enhanced dynamic form type - all you need is some 
DynamicForm and you add an instance of EditableFormItem to it.

I checked viewing and editing users and roles (both as rhqadmin and a 
non-admin user), I checked editing individual resource 
name/description/location, and I checked editing group 
name/description/recursive-flag settings - all work well.

Let me know if you see any problems.

Note that I have two outstanding issues that I document in the BZ - one 
is that the size of the field isn't as wide as it could be and two, I 
don't know what to do in the case of a blur. Here's the comments from 
the  BZ:

1) nothing happens if you lose focus from the edit field. What do we 
want it to do? Cancel or Save? Right now, it does nothing - you have to 
hit "enter", or click the ok or cancel icons to get it to do something.

2) the width of the field isn't entirely correct. It looks like the 
width of the item isn't as wide as the dynamic form column. Need to 
figure out the proper API calls to make so the item expands to fit the 
entire width of the form.


More information about the rhq-devel mailing list