I created a tagfile and I want to have an either/or required parameter. In other words, you must specific 1 of 2 parameters. Any suggestions on how best to approach this? Right now I've just made them all optional and rely on myself to know that I need to specify one or the other.
Thanks
Bear Bibeault
Author and opinionated walrus
Marshal
Tag files are great and I use them a lot, but they don't give you a lot of computational capabilities. If possible, I'd rejigger things such that there is one required parameter.
If that's not possible you could consider one of:
Make them both required, but allow one to be empty. [Yuck]
Leave them optional, and provide a reasonable default for when neither is specified.
Use a helper bean within the tag to do some validation (what I fancifully call a "Valet").
Revert to using a SimpleTag implementation instead of a tag file.
This message was edited 2 times. Last update was at by Bear Bibeault