On Jan 22, 2009, at 1:29 PM, Thomas Mortagne wrote: > On Thu, Jan 22, 2009 at 1:27 PM, Thomas Mortagne > <[email protected]> wrote: >> On Thu, Jan 22, 2009 at 1:25 PM, Vincent Massol >> <[email protected]> wrote: >>> Hi Dan, >>> >>> On Jan 22, 2009, at 12:49 PM, Dan Miron wrote: >>> >>>> Hi folks, >>>> >>>> Regarding the XWIKI-2968 <http://jira.xwiki.org/jira/browse/ >>>> XWIKI-2968> >>>> issue, this is what i've been suggested: >>>> >>>> You should put warning, error and info macro in the same project >>>> based on the same AbstractMessageMacro or something like that >>>> because theses 3 macro have almost exactly the same code. You could >>>> even have only one java macro implementation and use the macro name >>>> to find the class name. >>>> >>>> Personally, I'm +1 for the second approach, >>> >>> What are the 1st and 2nd approaches? I see only one. >>> >>>> creating a single java class for all the three macros, and >>>> dynamically check for the macro name and deciding what exactly >>>> macro >>>> type is to be rendered at runtime. Reason: It's simple, it's light, >>>> it's an easy to track approach. >>> >>> One class is fine but you still need to have macro aliases so that >>> people can use {{info}}, {{error}} and {{warning}} instead of the >>> generic {{message type="info|error|warning"}} macro. >> >> Yes I just suggested it quickly but obviously you would have 3 >> entries >> in component.xml. > > I fact I don't even though of a generic message macro from user point > of view because I don't think it could be really usable. At least not > if the only option is type="info|error|warning"
ok great I don't think we need it either. -Vincent >>>> >>>> If you have a different opinion, please let me know. >>>> >>>> Tnx, Dan >>> >>> Thanks >>> -Vincent >>> http://xwiki.com >>> http://xwiki.org >>> http://massol.net _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

