AnsweredAssumed Answered

Problems with accents in metadata values

Question asked by agey on Dec 30, 2009
Hi all,

I changed the page document-details.jsp of Alfresco to display the document (with a template) and metadata editable form. The problem is that when I introduce a metadata value that contains an accent or the character ñ, save it with other symbols. For example, I introduce ÁRBORE but is saved Ã?RBORE. Can anyone tell me what can be the problem? How do I fix this?

This is my document-details.jsp:



<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a"%>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r"%>

<%@ page buffer="64kb" contentType="text/html;charset=UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ page import="org.alfresco.web.ui.common.PanelGenerator"%>
<%@ page import="org.alfresco.web.app.Application"%>
<%@ page import="javax.faces.context.FacesContext"%>

<script type="text/javascript">
  
   window.onload = pageLoaded;
  
   function pageLoaded()
   {
      document.getElementById("dialog:finish-button").disabled = true;
     
   }
   </script>
  
  
<f:loadBundle basename="alfresco.extension.webclient" var="mensajes"/>
<f:verbatim>
   <table cellspacing="0" cellpadding="3" border="0" width="100%">
      <tr>
         <td width="100%" valign="top">
</f:verbatim>

<!– PLANTILLA DOCUMENTO –>

<h:panelGroup id="dashboard-panel-facets">
   <f:facet name="title">
      <r:permissionEvaluator value="#{DialogManager.bean.document}" allow="Write" id="evalChange">

            <a:actionLink id="actModify" value="#{msg.modify}" action="dialog:applyDocTemplate" showLink="false" image="/images/icons/preview.gif" style="padding-right:8px" />
            <a:actionLink id="actRemove" value="#{msg.remove}" actionListener="#{DialogManager.bean.removeTemplate}" showLink="false" image="/images/icons/delete.gif" />

      </r:permissionEvaluator>
   </f:facet>
</h:panelGroup>
<a:panel label="#{msg.custom_view}" id="dashboard-panel" progressive="true" facetsId="dialog:dialog-body:dashboard-panel-facets" border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white"
   expanded='#{DialogManager.bean.panels["dashboard-panel"]}' expandedActionListener="#{DialogManager.bean.expandPanel}">
   <f:verbatim>
      <table width=100% cellspacing=0 cellpadding=0 border=0>
         <tr>
            <td align=left></f:verbatim>
               <r:permissionEvaluator value="#{DialogManager.bean.document}" allow="Write" id="evalApply">
                  <a:actionLink id="actDashboard" value="#{msg.apply_template}" rendered="#{!DialogManager.bean.hasCustomView}" action="dialog:applyDocTemplate" />
               </r:permissionEvaluator>
               <a:panel id="template-panel" rendered="#{DialogManager.bean.hasCustomView}">
                  <f:verbatim><div style="padding: 4px; border: 1px dashed #cccccc"></f:verbatim>
                  <r:webScript id="webscript" scriptUrl="#{DialogManager.bean.webscriptUrl}" context="#{DialogManager.bean.document.nodeRef}" rendered="#{DialogManager.bean.hasWebscriptView}" />
                  <r:template id="dashboard" template="#{DialogManager.bean.templateRef}" model="#{DialogManager.bean.templateModel}" rendered="#{!DialogManager.bean.hasWebscriptView && DialogManager.bean.hasTemplateView}" />
                  <f:verbatim></div></f:verbatim>
               </a:panel><f:verbatim></td>
         </tr>
      </table>
   </f:verbatim>
</a:panel>

<!– —————————————-  –>
<f:verbatim>
   </td>

   <td valign="top">
  
</f:verbatim>

<!– METADATOS DOCUMENTO –>
<a:panel label="Acciones" id="dashboard-panel-acciones" progressive="false" border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white">

    <h:outputText value=" | "/>

    <a:actionLink id="titleLink1" value="#{mensajes.aceptar}" showLink="true" image="/images/icons/aceptar_Factura.gif" action="#{DialogManager.bean.aceptar}" />

   <h:outputText value=" | "/>

   <a:actionLink id="titleLink2" value="#{mensajes.rechazar}" showLink="true" image="/images/icons/rechazar_Factura.gif" action="#{DialogManager.bean.rechazar}" />
   
   <h:outputText value=" | "/>

   <a:actionLink id="titleLink3" value="#{mensajes.guardar}" showLink="true" image="/images/icons/guardar.gif" action="#{DialogManager.bean.guardar}" />       

   <h:outputText value=" | "/>

</a:panel>

<f:verbatim>
   <div style="padding: 4px"></div>
</f:verbatim>


<a:panel label="#{msg.properties}" id="properties-panel" facetsId="dialog:dialog-body:props-panel-facets" progressive="true" border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white"
   rendered="#{DialogManager.bean.locked == false}" expanded='#{DialogManager.bean.panels["properties-panel"]}' expandedActionListener="#{DialogManager.bean.expandPanel}">
  
   <r:propertySheetGrid id="content-props" value="#{DialogManager.bean.editableNode}"
                     var="editContentProps" columns="1" externalConfig="true" />
</a:panel>

<f:verbatim>
   </td>
   </tr>
   </table>
</f:verbatim>

Outcomes