Subversion Repositories SmartDukaan

Rev

Rev 1923 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1923 Rev 1930
Line 66... Line 66...
66
	 */
66
	 */
67
	@Actions({
67
	@Actions({
68
	    @Action("/nokia"),
68
	    @Action("/nokia"),
69
	    @Action("/samsung"),
69
	    @Action("/samsung"),
70
		@Action("/spice"),
70
		@Action("/spice"),
71
		@Action("/blackBerry"),
71
		@Action("/blackberry"),
72
		@Action("/sony-ericsson"),
72
		@Action("/sony-ericsson"),
73
		@Action("/micromax"),
73
		@Action("/micromax"),
74
		@Action("/lg"),
74
		@Action("/lg"),
75
		@Action("/htc"),
75
		@Action("/htc"),
76
		@Action("/motorola"),
76
		@Action("/motorola"),
Line 81... Line 81...
81
	 
81
	 
82
    public String index() throws SecurityException, IOException {
82
    public String index() throws SecurityException, IOException {
83
    	
83
    	
84
	    String uri = request.getRequestURI();
84
	    String uri = request.getRequestURI();
85
	    this.brandName = uri.replace("/", "");
85
	    this.brandName = uri.replace("/", "");
-
 
86
	    if(this.brandName.equals("blackberry")){
-
 
87
            this.brandName = "BlackBerry";
-
 
88
        }else if(this.brandName.equals("lg")){
-
 
89
            this.brandName = "LG";
-
 
90
        }else if(this.brandName.equals("htc")){
-
 
91
            this.brandName = "HTC";
86
    	
92
        }else{
87
    	String[] parts = this.brandName.split("-");
93
        	String[] parts = this.brandName.split("-");
88
    	StringBuffer brand = new StringBuffer(); 
94
        	StringBuffer brand = new StringBuffer(); 
89
    	for(int i=0; i < parts.length; i++){
95
        	for(int i=0; i < parts.length; i++){
90
    	    if(i>0)
96
        	    if(i>0)
91
    	    brand.append(" ");
97
        	    brand.append(" ");
92
    	    brand.append(Character.toUpperCase(parts[i].charAt(0)));
98
        	    brand.append(Character.toUpperCase(parts[i].charAt(0)));
93
    	    brand.append(parts[i].substring(1)); 
99
        	    brand.append(parts[i].substring(1)); 
94
    	}
100
        	}
95
    	this.brandName = brand.toString();
101
        	this.brandName = brand.toString();
-
 
102
        }
-
 
103
	    
96
    	this.brandTitle = this.brandName + " Mobile Price List India" ;
104
    	this.brandTitle = this.brandName + " Mobile Price List India" ;
97
    	
105
    	
98
 
106
 
99
    	String[] facetDefIDs = new String[] {"F_50010","F_50011","F_50002","F_50001",  "F_50006", "F_50007" };
107
    	String[] facetDefIDs = new String[] {"F_50010","F_50011","F_50002","F_50001",  "F_50006", "F_50007" };
100
        String[] facetLabels = new String[] {"Category","Sub Category","Price", "Brand", "Data Connectivity", "Camera Resolution" };
108
        String[] facetLabels = new String[] {"Category","Sub Category","Price", "Brand", "Data Connectivity", "Camera Resolution" };