Hi,
This is a "disgression" of something I thought/implement last week and
I want to put into consideration, in order to know if is a valuable
contribution or just another stupid idea :)
First let mu put some context information: I'm using magritte for some
production applications, who has two major requirements: L&F and L17N.
For major of my needs, magritte fits quite well, but it still have some
restrictions:
1) No L17N in labels and buttons.
2) Buttons are texts and usually clients ask for images, images/texts, etc.
There are some other restrictions, but achievable by simply extending
magritte system (such as image report columns, etc.)
How do I solved this problems?
Well, first I simply added a "localized" method on String who asks for
a property (language) in session and follow "translated" path to
translate the string, and then I modified each method in magritte who
outputs a label (they are not many, just 3 or 4).
That solves my L17N problem.
Now, I want to make my buttons more fashionable... this is harder
because of the places where I have to change things... but again,
extending MAFormDecoration and MACommandColumn... and aplying that to
every component who uses a report... problem solved.
But, what if I what my buttons different, or even configurable?
This is my approach: instead having buttons and links displayed in
columns or forms, I created a Command, and then I whant to add that
commands by visiting different renderers, magritte style visitors. So,
if I want to change the displaying style, I just add a new renderer...
And as an "extra bonus" there I can handle L17N stuff.
What do you think? is this good approach?