struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil Erdwien <n...@k-state.edu>
Subject Re: How to implement OR functionality in STRUTS
Date Wed, 05 Jan 2005 10:35:04 GMT
I agree that if the "..." is long, or if there are lots of them, then 
simply repeating the code is less than ideal.

On the other hand, if there are only, say, three conditions, and the 
code is three lines, then duplication isn't horrendous.  We've all done 
uglier things in the push to get the job done.

Assuming JSTL is available, it provides a better solution.


Guillaume Cottenceau wrote:
> Neil Erdwien <neil 'at' k-state.edu> writes:
> 
> 
>>How about:
>>
>>    <logic:equal ...>
>>       ...
>>    </logic:equal>
>>    <logic:equal ...>
>>       ...
>>    </logic:equal>
> 
> 
> Are you serious? When "..." is longer than say 1 or 2 lines, this
> leads to duplicated source-code, one of the thing I think
> programmers should avoid with the most energy.
> 

-- 
Neil Erdwien, neil@k-state.edu, Web Technologies Manager
Computing and Network Services, Kansas State University

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message