05-26-2008 04:51 AM
05-27-2008 05:33 PM
02-24-2010 07:01 AM
11:54:20,476 ERROR [org.alfresco.web.ui.common.Utils] A system error happened during the operation: Property type not recognised:
type: {http://www.binovo.es/model/content/1.0}decimal
org.alfresco.error.AlfrescoRuntimeException: Property type not recognised:
type: {http://www.binovo.es/model/content/1.0}decimal
at org.alfresco.repo.domain.NodePropertyValue.makeValueType(NodePropertyValue.java:620)
at org.alfresco.repo.domain.NodePropertyValue.<init>(NodePropertyValue.java:683)
at org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl.makeNodePropertyValue(HibernateNodeDaoServiceImpl.java:3905)
at org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl.addValueToPersistedProperties(HibernateNodeDaoServiceImpl.java:3866)
at org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl.addNodePropertyImpl(HibernateNodeDaoServiceImpl.java:1122)
at org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl.addNodeProperties(HibernateNodeDaoServiceImpl.java:1176)
at sun.reflect.GeneratedMethodAccessor700.invoke(Unknown Source)
(…)
02-24-2010 07:17 AM
02-24-2010 07:47 AM
02-24-2010 11:01 AM
<property name="ac:resursPris">
<type>d:long</type>
<mandatory>false</mandatory>
</property>
<show-property name="ac:resursPris" display-label-id="ac_smotModel.typ.ac_resurs.ac_resursPris" converter="PriceConverter"/>
package com.acando.alfresco.web.resurs;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
import javax.faces.convert.ConverterException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
public class PriceConverter implements Converter {
private static Log log = LogFactory.getLog(PriceConverter.class);
/**
* <p>The standard converter id for this converter.</p>
*/
public static final String CONVERTER_ID = "PriceConverter";
public Object getAsObject(FacesContext context, UIComponent component,
String value) throws ConverterException {
if (value == null){
return value;
}
value = value.trim();
Long convertedValue = new Long(value);
if (log.isDebugEnabled()){
log.debug("multiplicerar "+value+" kronor med 100 för att få priset i ören, returnerar sedan för lagring");
}
return convertedValue*100;
}
public String getAsString(FacesContext context, UIComponent component,
Object value) throws ConverterException {
Long longValue = (Long)value;
if (log.isDebugEnabled()){
log.debug("dividerar "+value+" öre med 100 för att få priset i kronor, formaterar sedan och returnerar till gui.");
}
if (value == null){
return "";
}
// first lets divide the cents with 100 to get the amount in SEK with decimals
double convertedValue = longValue / 100;
// decimals should not be visible in gui, lets remove them.
int intMoney = (int)convertedValue;
return String.valueOf(intMoney);
}
}
<converter>
<converter-id>PriceConverter</converter-id>
<converter-class>com.acando.alfresco.web.resurs.PriceConverter</converter-class>
</converter>
02-24-2010 12:23 PM
02-25-2010 03:55 AM
<converter>
<converter-id>numberConverter</converter-id>
<converter-class>br.com.softcomex.components.gui.presentation.converters.NumberConverter</converter-class>
<property>
<property-name>maxFractionDigitsMask</property-name>
<property-class>java.lang.Integer</property-class>
</property>
</converter>
02-25-2010 03:55 AM
<converter>
<converter-id>numberConverter</converter-id>
<converter-class>br.com.softcomex.components.gui.presentation.converters.NumberConverter</converter-class>
<property>
<property-name>maxFractionDigitsMask</property-name>
<property-class>java.lang.Integer</property-class>
</property>
</converter>
02-25-2010 05:17 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.