Changeset 1945


Ignore:
Timestamp:
05/21/12 14:23:53 (12 years ago)
Author:
herste
Message:

attempt at ticket numer 86

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  
    1919                </ul>
    2020            </div>
     21            <div>
     22                <a wicket:id="feedback" href=""#">[[Feedback]]</a>
     23            </div>
    2124        </div>
    2225    </wicket:extend>
  • vlo/trunk/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/pages/ShowResultPage.java

    r1786 r1945  
    11package eu.clarin.cmdi.vlo.pages;
    22
     3import java.io.UnsupportedEncodingException;
    34import java.net.MalformedURLException;
    45import java.net.URL;
     6import java.net.URLEncoder;
    57import java.util.Collection;
    68import java.util.regex.Pattern;
     
    911import org.apache.wicket.Component;
    1012import org.apache.wicket.PageParameters;
     13import org.apache.wicket.RequestCycle;
    1114import org.apache.wicket.extensions.ajax.markup.html.AjaxLazyLoadPanel;
    1215import org.apache.wicket.extensions.markup.html.basic.SmartLinkMultiLineLabel;
     
    2629import org.apache.wicket.model.IModel;
    2730import org.apache.wicket.model.ResourceModel;
     31import org.apache.wicket.protocol.http.RequestUtils;
    2832import org.apache.wicket.protocol.http.WicketURLDecoder;
    2933import org.apache.wicket.protocol.http.WicketURLEncoder;
     
    4145    private final static Logger LOG = LoggerFactory.getLogger(ShowResultPage.class);
    4246    public static final String PARAM_DOC_ID = "docId";
     47    public static final String feedbackfromURL = "http://www.clarin.eu/node/3502?url=";
    4348
    4449    @SuppressWarnings("serial")
     
    7580            setResponsePage(new ResultNotFoundPage(parameters));
    7681        }
    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"));
    7889    }
    7990
     
    124135            public void populateItem(Item<ICellPopulator<DocumentAttribute>> cellItem, String componentId, IModel<DocumentAttribute> rowModel) {
    125136                DocumentAttribute attribute = rowModel.getObject();
    126                
     137
    127138                if (attribute.getField().equals(FacetConstants.FIELD_LANGUAGE)) {
    128139                    cellItem.add(new SmartLinkMultiLineLabel(componentId, attribute.getValue()) {
    129                        
     140
    130141                        @Override
    131142                        protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) {
     
    136147                } else if(attribute.getField().equals(FacetConstants.FIELD_LANGUAGES)) {
    137148                    cellItem.add(new SmartLinkMultiLineLabel(componentId, attribute.getValue()) {
    138                        
     149
    139150                        @Override
    140151                        protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) {
  • vlo/trunk/vlo_webapp/src/test/resources/applicationContext.xml

    r1938 r1945  
    11<?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">
    43
    54    <!--
Note: See TracChangeset for help on using the changeset viewer.