Eelco and other Devs, Eelco Hillenius wrote: > Would that really help much? It would introduce unclarity too: > > public static final Action ENABLE_STRING = "ENABLE"; > public static final Action ENABLE = new Action(ENABLE_STRING); > > And then my initial idea where I wanted to use just simple strings... > that has some advantages as we can see now. > > I think we should just document what strings are available by default > and leave it with that. > > Eelco
Documentation would certainly go a long way. I still like the idea of using constants if I *must* use strings. It cuts down on errors due to case or just simple typographical mistakes. Perhaps Component.ACTION_NAME_ENABLE and Component.ACTION_NAME_RENDER. Yes, the names are longer but a) Having the same starting prefix tells me that they are related. b) The names give me some idea of how they differ from the actual Action constants. Honestly, if you don't give me constants, I'll end up making my own. It'd sure be nice to have them in wicket though. That way I don't have to create them again for every project. Also, if you decide to change the strings or add more (or even remove some), it's done in the wicket project where it belongs. Thanks, -- Philip A. Chapman Application Development: Java, Visual Basic (MCP), PostgreSQL, MySQL, MSSQL Linux, Windows 9x, Windows NT, Windows 2000, Windows XP
signature.asc
Description: OpenPGP digital signature