Author: magnuse
Date: 2006-04-25 22:20:00 +0200 (Tue, 25 Apr 2006)
New Revision: 2803
Modified:
trunk/src/java/no/schibstedsok/front/searchportal/configuration/SearchModeFactory.java
trunk/src/java/no/schibstedsok/front/searchportal/result/handler/TvEnrichmentDateFormatHandler.java
trunk/src/webapp/WEB-INF/jsp/decorators/mainDecorator.jsp
Log:
SearchModeFactory now recognizes the source and target parameters for tv date
format handler.
Modified:
trunk/src/java/no/schibstedsok/front/searchportal/configuration/SearchModeFactory.java
===================================================================
---
trunk/src/java/no/schibstedsok/front/searchportal/configuration/SearchModeFactory.java
2006-04-25 15:24:20 UTC (rev 2802)
+++
trunk/src/java/no/schibstedsok/front/searchportal/configuration/SearchModeFactory.java
2006-04-25 20:20:00 UTC (rev 2803)
@@ -611,6 +611,11 @@
sfm.setNavigatorName(rh.getAttribute("navigation"));
sfm.setTargetModifier(rh.getAttribute("target"));
break;
+ case TV:
+ final TvEnrichmentDateFormatHandler dh =
(TvEnrichmentDateFormatHandler) handler;
+ dh.setSourceField(rh.getAttribute("source"));
+ dh.setTargetField(rh.getAttribute("target"));
+ break;
}
return handler;
Modified:
trunk/src/java/no/schibstedsok/front/searchportal/result/handler/TvEnrichmentDateFormatHandler.java
===================================================================
---
trunk/src/java/no/schibstedsok/front/searchportal/result/handler/TvEnrichmentDateFormatHandler.java
2006-04-25 15:24:20 UTC (rev 2802)
+++
trunk/src/java/no/schibstedsok/front/searchportal/result/handler/TvEnrichmentDateFormatHandler.java
2006-04-25 20:20:00 UTC (rev 2803)
@@ -29,8 +29,15 @@
this.targetField = targetField;
}
+ public void setSourceField(final String sourceField) {
+ this.sourceField = sourceField;
+ }
+
+ public String getSourceField() {
+ return sourceField;
+ }
+
public void handleResult(final Context cxt, final Map parameters) {
- // TODO: for performance reasons, is SimpleDateFormat usage avoidable?
final SimpleDateFormat inputDF = new
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
final SimpleDateFormat outputDF = new SimpleDateFormat("HH:mm");
@@ -45,4 +52,5 @@
}
}
}
+
}
Modified: trunk/src/webapp/WEB-INF/jsp/decorators/mainDecorator.jsp
===================================================================
--- trunk/src/webapp/WEB-INF/jsp/decorators/mainDecorator.jsp 2006-04-25
15:24:20 UTC (rev 2802)
+++ trunk/src/webapp/WEB-INF/jsp/decorators/mainDecorator.jsp 2006-04-25
20:20:00 UTC (rev 2803)
@@ -581,6 +581,10 @@
<decorator:getProperty property="page.picture-results"/>
<%}%>
+ <%if (currentC.equals("t")) {%>
+ <decorator:getProperty property="page.tv-results"/>
+ <%}%>
+
</td>
<%if (q.trim().equals("")) {%>
_______________________________________________
Kernel-commits mailing list
[email protected]
http://sesat.no/mailman/listinfo/kernel-commits