have a IMapKeyEditor { Panel getEditorForKey(String key, Map map); }
then you iterate over keys and create links that when clicked use the provided impl of IMapKeyEditor to create a new panel that has the formcomponents to edit that key, and then make it visible.
so hierarchy like
form -> listview for keys -> editor panel
look at tabbedview in extensions it should be a good starting point
-Igor
For my current application I need to write a component that will edit a Map.
I've tried a dozen of different approaches and all of them end up becoming ugly hacks.
Would anyone help me write a proper component for editing Map objects?
My scenario is:
The map: Map<Network, NetworkSetting> settingsMap ;
Key value list: List<Network> networkList ;
Value object form: Form("id", new CompoundPropertyModel(NetworkSetting setting) containing:
- Form fields
- Delete link
Add object form: A dropdown box with possible key values without an existing NetworkSetting and an "Add" button
This sounds like the ideal scenario for a MapView component:
new MapView("mapViewId", List<Network> keys, new Model((Serializable) map ) ;
Could anyone please help me with creating this?
Kind regards,
Michiel Trimpe
Michiel Trimpe | Java Developer| TomTom | [EMAIL PROTECTED] | +31 (0)6 41482341mobile
This e-mail message contains information which is confidential and may be privileged. It is intended for use by the addressee only. If you are not the intended addressee, we request that you notify the sender immediately and delete or destroy this e-mail message and any attachment(s), without copying, saving, forwarding, disclosing or using its contents in any other way. TomTom N.V., TomTom International BV or any other company belonging to the TomTom group of companies will not be liable for damage relating to the communication by e-mail of data, documents or any other information.
