Subversion Repositories SmartDukaan

Rev

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

Rev 2652 Rev 2867
Line 34... Line 34...
34
import org.apache.velocity.exception.ResourceNotFoundException;
34
import org.apache.velocity.exception.ResourceNotFoundException;
35
 
35
 
36
 
36
 
37
public class PageLoaderHandler {
37
public class PageLoaderHandler {
38
 
38
 
39
 
-
 
40
	public String getMainBannerHtml() {
-
 
41
		String htmlString = "";
-
 
42
		VelocityContext context = new VelocityContext();
-
 
43
		String templateFile = "templates/mainbanner.vm";
-
 
44
		htmlString = getHtmlFromVelocity(templateFile, context);
-
 
45
		return htmlString;
-
 
46
	}
-
 
47
 
-
 
48
	public String getFooterHtml() {
-
 
49
		String htmlString = "";
-
 
50
		VelocityContext context = new VelocityContext();
-
 
51
		String templateFile = "templates/footer.vm";
-
 
52
		htmlString = getHtmlFromVelocity(templateFile, context);
-
 
53
		return htmlString;
-
 
54
	}
-
 
55
 
-
 
56
 
-
 
57
	public String getMyResearchHtml() {
-
 
58
	    String htmlString = "";
-
 
59
        VelocityContext context = new VelocityContext();
-
 
60
        String templateFile = "templates/myresearch.vm";
-
 
61
        htmlString = getHtmlFromVelocity(templateFile, context);
-
 
62
        return htmlString;
-
 
63
	}
-
 
64
 
-
 
65
	public String getAccessoriesHtml() {
-
 
66
	    String htmlString = "";
-
 
67
        VelocityContext context = new VelocityContext();
-
 
68
        String templateFile = "templates/accessories.vm";
-
 
69
        htmlString = getHtmlFromVelocity(templateFile, context);
-
 
70
        return htmlString;
-
 
71
	}
-
 
72
	
-
 
73
	public String getBrowseHistoryHtml() {
-
 
74
	    String htmlString = "";
-
 
75
        VelocityContext context = new VelocityContext();
-
 
76
        String templateFile = "templates/browsehistory.vm";
-
 
77
        htmlString = getHtmlFromVelocity(templateFile, context);
-
 
78
        return htmlString;
-
 
79
	}
-
 
80
 
-
 
81
	public String getCustomerServiceHtml() {
-
 
82
		String htmlString = "";
-
 
83
		VelocityContext context = new VelocityContext();
-
 
84
		String templateFile = "templates/customerservice.vm";
-
 
85
		htmlString = getHtmlFromVelocity(templateFile, context);
-
 
86
		return htmlString;
-
 
87
	}
-
 
88
 
-
 
89
 
-
 
90
	public String getSlideGuideHtml(long productId) {
39
	public String getSlideGuideHtml(long productId) {
91
		StringBuilder htmlString = new StringBuilder();
40
		StringBuilder htmlString = new StringBuilder();
92
		String filename = Utils.EXPORT_ENTITIES_PATH + productId + File.separator + "SlideGuide.html";
41
		String filename = Utils.EXPORT_ENTITIES_PATH + productId + File.separator + "SlideGuide.html";
93
		File f = new File(filename);
42
		File f = new File(filename);
94
		
43
		
Line 190... Line 139...
190
		}
139
		}
191
		
140
		
192
		return htmlString.toString();
141
		return htmlString.toString();
193
	}
142
	}
194
	
143
	
195
	public String getMainMenuHtml() {
-
 
196
		String htmlString = "";
-
 
197
		VelocityContext context = new VelocityContext();
-
 
198
		String templateFile = "templates/mainmenu.vm";
-
 
199
		htmlString = getHtmlFromVelocity(templateFile, context);
-
 
200
		return htmlString;
-
 
201
	}
-
 
202
 
-
 
203
	
-
 
204
	public String getSearchBarHtml(long itemCounts, long categoryId) {
144
	public String getSearchBarHtml(long itemCounts, long categoryId) {
205
		String htmlString = "";
145
		String htmlString = "";
206
		VelocityContext context = new VelocityContext();
146
		VelocityContext context = new VelocityContext();
207
		String templateFile = "templates/searchbar.vm";
147
		String templateFile = "templates/searchbar.vm";
208
		
148