My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 160: GroupCellEditor does not call SupportUtils methods for the decorated editor
1 person starred this issue and may be notified of changes. Back to list
Status:  Accepted
Owner:  ----


 
Reported by bgo...@e1b.org, Oct 30, 2008
Example:

EditLinkCellEditor assign = new EditLinkCellEditor("assign", "employeeId");
assign.setImageFile(EditLinkCellEditor.ADD_ICON);
assign.setCaption("Assign a Cell Phone to this Employee");
GroupCellEditor group = new GroupCellEditor(assign);           

throws a NullPointerException if I try to use getWebContext().get**, etc.
in EditLinkCellEditor's getValue() method

Obviously, there are numerous workarounds, but a cleaner approach might be
to have GroupCellEditor chain the calls to setCoreContext(),
setWebContext() etc to the decorated cell editor.  This should probably
even be put into a more generic CellEditorDecorator class that chains all
of its method calls into the decorated cell editor and can serve as a base
class for future decorators.
Oct 30, 2008
Project Member #2 jeff.johnston.mn@gmail.com
I see what you are saying. Once you put decorate your cell editor with a group on the
SupportUtils does not set any of the values for you.

I agree with you about the decorators. For the next release I want to be able to send
in an array of cell editors and have it do the decoration automatically. The
decorator pattern works very well with JMesa's cell editors and I want to exploit
that further. There is an issue ticket about that and is something I am looking
forward to having.

https://code.google.com/p/jmesa/issues/detail?id=153

Status: Accepted
Labels: -Type-Defect Type-Enhancement

Powered by Google Project Hosting