Changeset 1945
- Timestamp:
- 05/21/12 14:23:53 (12 years ago)
- Location:
- vlo/trunk/vlo_webapp/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
vlo/trunk/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/pages/ShowResultPage.html
r1437 r1945 19 19 </ul> 20 20 </div> 21 <div> 22 <a wicket:id="feedback" href=""#">[[Feedback]]</a> 23 </div> 21 24 </div> 22 25 </wicket:extend> -
vlo/trunk/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/pages/ShowResultPage.java
r1786 r1945 1 1 package eu.clarin.cmdi.vlo.pages; 2 2 3 import java.io.UnsupportedEncodingException; 3 4 import java.net.MalformedURLException; 4 5 import java.net.URL; 6 import java.net.URLEncoder; 5 7 import java.util.Collection; 6 8 import java.util.regex.Pattern; … … 9 11 import org.apache.wicket.Component; 10 12 import org.apache.wicket.PageParameters; 13 import org.apache.wicket.RequestCycle; 11 14 import org.apache.wicket.extensions.ajax.markup.html.AjaxLazyLoadPanel; 12 15 import org.apache.wicket.extensions.markup.html.basic.SmartLinkMultiLineLabel; … … 26 29 import org.apache.wicket.model.IModel; 27 30 import org.apache.wicket.model.ResourceModel; 31 import org.apache.wicket.protocol.http.RequestUtils; 28 32 import org.apache.wicket.protocol.http.WicketURLDecoder; 29 33 import org.apache.wicket.protocol.http.WicketURLEncoder; … … 41 45 private final static Logger LOG = LoggerFactory.getLogger(ShowResultPage.class); 42 46 public static final String PARAM_DOC_ID = "docId"; 47 public static final String feedbackfromURL = "http://www.clarin.eu/node/3502?url="; 43 48 44 49 @SuppressWarnings("serial") … … 75 80 setResponsePage(new ResultNotFoundPage(parameters)); 76 81 } 77 82 String thisURL = RequestUtils.toAbsolutePath(RequestCycle.get().urlFor(this).toString()); 83 try { 84 thisURL = URLEncoder.encode(thisURL,"UTF-8"); 85 } catch (UnsupportedEncodingException e) { 86 LOG.error(e.toString()); 87 } 88 add(new ExternalLink("feedback", feedbackfromURL+thisURL, "Give Feedback")); 78 89 } 79 90 … … 124 135 public void populateItem(Item<ICellPopulator<DocumentAttribute>> cellItem, String componentId, IModel<DocumentAttribute> rowModel) { 125 136 DocumentAttribute attribute = rowModel.getObject(); 126 137 127 138 if (attribute.getField().equals(FacetConstants.FIELD_LANGUAGE)) { 128 139 cellItem.add(new SmartLinkMultiLineLabel(componentId, attribute.getValue()) { 129 140 130 141 @Override 131 142 protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) { … … 136 147 } else if(attribute.getField().equals(FacetConstants.FIELD_LANGUAGES)) { 137 148 cellItem.add(new SmartLinkMultiLineLabel(componentId, attribute.getValue()) { 138 149 139 150 @Override 140 151 protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) { -
vlo/trunk/vlo_webapp/src/test/resources/applicationContext.xml
r1938 r1945 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 3 xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> 2 <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> 4 3 5 4 <!--
Note: See TracChangeset
for help on using the changeset viewer.