|Implementing features on which level? [message #721600]
||Fri, 02 September 2011 09:03
| Christian B
Registered: August 2011
I need some best practice advice on which level to implement features.
An easy example model:
<dialog title="someTitle" message="someMessage">
<button label="Ok" value="0" />
<button label="Cancel" value="1" />
So lets say i Have an Add and a Create feature for a Dialog and the same for buttons. (The graphical representation is just some simple square with text fields for title, message and a List of the button labels)
Some questions to other standard features:
- Direct Edit:
Lets say i want direct editing for both title and message. Do i need a feature for each text field? Or do i have one feature for the dialog and this feature decides which text field is selected for direct editing?
One Update feature for dialog and one for button?
The dialog update feature checks for changes on title, message and then delegates the update check to the update feature of each button?
Thx for your help!
[Updated on: Fri, 02 September 2011 14:00]
Report message to a moderator
|Re: Implementing features on which level? [message #722240 is a reply to message #721600]
||Mon, 05 September 2011 06:48
| Matthias Gorning
Registered: April 2010
You can do this with one direct edit feature. The feature provider should know which text label is affected. You should put this value in the constructor of your feature.
The feature itself must differentiate this text labels. E.g. provide different validation handling.
Your idea is the right one. You should do this via delegation. In the class AbstractFeatureProvider is method which you can use for that purpose:
public IReason updateIfPossible(IUpdateContext context)
Powered by FUDForum
. Page generated in 0.01707 seconds