dev@javaserverfaces.java.net

Re: web.xml parameter aliasing

From: Ed Burns <Ed.Burns_at_Sun.COM>
Date: Thu, 20 Nov 2008 07:46:52 -0800

>>>>> On Wed, 19 Nov 2008 13:12:05 -0800, Ryan Lubke <Ryan.Lubke_at_Sun.COM> said:

RL> I'd rather have the alias be passed to the constructor of the enum.

RL> So get option value would look something like:

RL> public String getOptionValue(WebContextInitParameter param) {

RL> String result = contextParameters.get(param);

RL> if (result == null) {
RL> if (param.hasAlias()) {
RL> result = contextParameters.get(param.getAlias());
RL> }
RL> }
        
RL> return result;
RL> }
        
RL> This would eliminate the need for a getAlias() method directly
RL> on WebConfiguration and avoid, potentially, several if else checks.

Ok, I'll use your existing getAlternate facility, which I missed.

Thanks for the catch.

Ed
-- 
| ed.burns_at_sun.com  | office: 408 884 9519 OR x31640
| homepage:         | http://ridingthecrest.com/