Re: Inherit/Share query-params

Splash Forums PrettyFaces Users Inherit/Share query-params Re: Inherit/Share query-params




I would think it possible to implement equals/hashCode on LazyExpression using the beanClass + component. It would be up to you guys whether it is also necessary to test the equality of the embedded LazyBeanNameFinder.

@lincoln: I don’t really want to C&P code I wrote on my employer’s dime; however, briefly:

void process(PrettyConfig config) {
HashSet<String> processed = new HashSet<String>();
for (UrlMapping mapping : config.getMappings()) {
process(config, processed);

void process(UrlMapping mapping, PrettyConfig config, Set<String> processed) {
if (processed.contains(mapping)) {
UrlMapping parent = config.getMappingById(mapping.getParentId());
if (parent != null) {
process(parent, config, processed);
for (QueryParameter parentParam : parent.getQueryParams()) {
//exercise for the reader, comparing name/expression string
if (!containsSimilar(mapping.getQueryParams(), parentParam)) {