Subversion Repositories SmartDukaan

Rev

Rev 4453 | Rev 5182 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4453 Rev 5064
Line 143... Line 143...
143
    	for(int i=1; i<length; i++) {
143
    	for(int i=1; i<length; i++) {
144
    		newfqrys[i] = fqrys[i-1];
144
    		newfqrys[i] = fqrys[i-1];
145
    		urlCrumb += "&fq=" + URLEncoder.encode(fqrys[i-1], "UTF-8");
145
    		urlCrumb += "&fq=" + URLEncoder.encode(fqrys[i-1], "UTF-8");
146
    		priceUrl += "&fq=" + URLEncoder.encode(fqrys[i-1], "UTF-8");
146
    		priceUrl += "&fq=" + URLEncoder.encode(fqrys[i-1], "UTF-8");
147
    		StringBuilder filterUrl = new StringBuilder(url);
147
    		StringBuilder filterUrl = new StringBuilder(url);
-
 
148
 
148
    		String facetName = StringUtils.split(fqrys[i-1], ":")[0];
149
    		String facetName = StringUtils.split(fqrys[i-1], ":")[0];
149
    		String facetValue = StringUtils.split(fqrys[i-1], ":")[1];
150
    		String facetValue = StringUtils.split(fqrys[i-1], ":")[1];
-
 
151
    		
-
 
152
    		try {
150
    		String facetLabel = facetLabels[arrList.indexOf(facetName)];
153
        		String facetLabel = facetLabels[arrList.indexOf(facetName)];
151
    		this.categoryTitle += " | " + facetLabel + " " + facetValue;
154
        		this.categoryTitle += " | " + facetLabel + " " + facetValue;
152
    		this.facetSelection += facetValue + " ";
155
        		this.facetSelection += facetValue + " ";
153
    		for(int j=1; j<length; j++) {
156
        		for(int j=1; j<length; j++) {
154
    			if(i==j){
157
        			if(i==j){
155
    				continue;
158
        				continue;
156
    			}
159
        			}
157
    			filterUrl.append("&fq=" + URLEncoder.encode(fqrys[j-1], "UTF-8"));
160
        			filterUrl.append("&fq=" + URLEncoder.encode(fqrys[j-1], "UTF-8"));
158
	    	}
161
    	    	}
159
    		String[] acrumb = new String[] { facetLabel, facetValue, filterUrl.toString() };
162
        		String[] acrumb = new String[] { facetLabel, facetValue, filterUrl.toString() };
160
    		log.info("acrumb=" + Arrays.toString(acrumb));
163
        		log.info("acrumb=" + Arrays.toString(acrumb));
161
    		this.crumbs.add(acrumb);
164
        		this.crumbs.add(acrumb);
-
 
165
				
-
 
166
			} catch (ArrayIndexOutOfBoundsException e) {
-
 
167
				log.error("CategoryControllerArrayIndexOutOfBoundsException " + arrList + " " + facetName + " " + facetLabels);
162
 
168
			}
163
    	}
169
    	}
164
		url = urlCrumb;
170
		url = urlCrumb;
165
    	    	
171
    	    	
166
    	if(this.request.getParameter("page") != null){
172
    	if(this.request.getParameter("page") != null){
167
    		this.page = Long.parseLong(this.request.getParameter("page"));
173
    		this.page = Long.parseLong(this.request.getParameter("page"));