Ticket #1397 (closed enhancement: fixed)

Opened 9 months ago

Last modified 2 months ago

PopupView component

Reported by: Joonas Lehtinen Owned by: Joonas Lehtinen
Priority: major Milestone: User Interface Library 5.3.0 RC
Component: Server-side framework Version: trunk
Keywords: Cc:
Known Issue description:
Hours estimate: Deadline (dd.mm.yyyy):
Known Issue version (since): Known Issue title:
Hours done: Depends to:
Affects documentation: no
Known Issue workaround:
Affects release notes: yes Contract:

Description

We should have simple wrapper component for editing a property value in such way that the value is shown as plain text normally and when a user clicks the text, an more advanced editor pops up. This would be really nice for example in tables.

(dummy draft-level) API proposal:

editor = new PopupEditor(Property thatIsShownOrEdited, Property.Editor thatIsShownInEditorMode)

By default the property value is shown using toString. if this is not ok, one could define better formatter for the value.

editor.setPropertyValueFormatter(new PopupEditor.PropertyValueFormatter() {
   String getPropertyValueAsHTML(Object value)
});

Change History

Changed 9 months ago by Joonas Lehtinen

  • milestone changed from Product Backlog to User Interface Library 5.2 enhancement candidates

Changed 7 months ago by Joonas Lehtinen

  • milestone changed from User Interface Library 5.2.0 to IT Mill Sponsored Backlog

Changed 6 months ago by Joonas Lehtinen

  • summary changed from PopupEditor component to PopupPanel component

New API use example design created together with Risto

final ObjectProperty prop = new ObjectProperty("foo");

PopupPanel.Content content = new PopupPanel.Content() {
	String getMinimizedValueAsHTML() {
		return prop.toString();
	}
	
	Component getPopupComponent() {
		return new TextField(prop);
	}	
};

PopupPanel pe = new PopupEditor(content);

window.addComponent(pe);

PopupPanel pe2 = new PopupEditor("foo", new Label("Foooooooooo"));

window.addComponent(pe2);

Changed 6 months ago by Joonas Lehtinen

  • priority changed from undefined to major
  • component changed from undefined to Server-side framework
  • milestone changed from IT Mill Sponsored Backlog to User Interface Library 5.3.0 RC1

Changed 6 months ago by Risto Yrjana

  • owner changed from Joonas Lehtinen to Risto Yrjana
  • status changed from new to accepted

Changed 6 months ago by Risto Yrjana

  • owner changed from Risto Yrjana to Joonas Lehtinen
  • status changed from accepted to assigned

Committed implementation in [4750] Moving ticket to Joonas for review.

Changed 3 months ago by Joonas Lehtinen

  • milestone changed from User Interface Library 5.3.0 RC to IT Mill Sponsored Backlog

Changed 3 months ago by Joonas Lehtinen

  • owner changed from Joonas Lehtinen to Risto Yrjana
  • summary changed from PopupPanel component to PopupView component
  • version set to trunk
  • milestone changed from IT Mill Sponsored Backlog to User Interface Library 5.3.0 RC

Reviewed. Name change. Risto, please move this to trunk for final review.

Component seems ready to be included in 5.3.0, with "experimental" status.

Changed 3 months ago by Risto Yrjana

Copied to trunk in [5240]

Changed 2 months ago by Risto Yrjana

  • owner changed from Risto Yrjana to Joonas Lehtinen

All the required features seem to be there (since #1791 is fixed), moving ticket to Joonas for final review.

Changed 2 months ago by Joonas Lehtinen

  • status changed from assigned to accepted

Changed 2 months ago by Joonas Lehtinen

  • status changed from accepted to closed
  • resolution set to fixed

Reviewed in [5501]

Note: See TracTickets for help on using tickets.