src/org/tiefaces/components/websheet/dataobjects/TieSheetNumberConverter.java
@Override
	public final Object getAsObject(final FacesContext context,
			final UIComponent component, final String value) {
		Double doubleValue = 0.0;
		String symbol = "";
		String strValue = value;
		try {
			symbol = (String) component.getAttributes()
					.get(TieConstants.CELL_DATA_SYMBOL);

			if ((symbol != null) && (symbol
					.equals(TieConstants.CELL_FORMAT_PERCENTAGE_SYMBOL)
					&& strValue != null)) {
				strValue = strValue.trim();
				if (strValue.endsWith(
						TieConstants.CELL_FORMAT_PERCENTAGE_SYMBOL)) {
					doubleValue = Double.valueOf(
							strValue.substring(0, strValue.length() - 1))
							/ TieConstants.CELL_FORMAT_PERCENTAGE_VALUE;
					strValue = doubleValue.toString();
				}
			}
		} catch (Exception ex) {
			LOG.log(Level.SEVERE,
					"error in getAsObject of TieSheetNumberConverter : "
							+ ex.getLocalizedMessage(),
					ex);
		}
		return strValue;

	}
@Override
	public final Object getAsObject(final FacesContext context,
			final UIComponent component, final String value) {
		Double doubleValue = 0.0;
		String symbol = "";
		String strValue = value;
		try {
			symbol = (String) component.getAttributes()
					.get(TieConstants.CELL_DATA_SYMBOL);

			if ((symbol != null) && (symbol
					.equals(TieConstants.CELL_FORMAT_PERCENTAGE_SYMBOL)
					&& strValue != null)) {
				strValue = strValue.trim();
				if (strValue.endsWith(
						TieConstants.CELL_FORMAT_PERCENTAGE_SYMBOL)) {
					doubleValue = Double.valueOf(
							strValue.substring(0, strValue.length() - 1))
							/ TieConstants.CELL_FORMAT_PERCENTAGE_VALUE;
					strValue = doubleValue.toString();
				}
			}
		} catch (Exception ex) {
			LOG.log(Level.SEVERE,
					"error in getAsObject of TieSheetNumberConverter : "
							+ ex.getLocalizedMessage(),
					ex);
		}
		return strValue;

	}
@ Override public final Object getAsObject ( final FacesContext context , final UIComponent component , final String value ) { Double doubleValue = 0.0 ; String symbol = "" ; String strValue = value ; try { symbol = ( String ) component . getAttributes ( ) . get ( TieConstants . CELL_DATA_SYMBOL ) ; if ( ( symbol != null ) && ( symbol . equals ( TieConstants . CELL_FORMAT_PERCENTAGE_SYMBOL ) && strValue != null ) ) { strValue = strValue . trim ( ) ; if ( strValue . endsWith ( TieConstants . CELL_FORMAT_PERCENTAGE_SYMBOL ) ) { doubleValue = Double . valueOf ( strValue . substring ( 0 , strValue . length ( ) - 1 ) ) / TieConstants . CELL_FORMAT_PERCENTAGE_VALUE ; strValue = doubleValue . toString ( ) ; } } } catch ( Exception ex ) { LOG . log ( Level . SEVERE , "error in getAsObject of TieSheetNumberConverter : " + ex . getLocalizedMessage ( ) , ex ) ; } return strValue ; }
/*
(non-Javadoc)

@see javax.faces.convert.Converter#getAsObject(javax.faces.context.
FacesContext, javax.faces.component.UIComponent, java.lang.String)
/ * ( non - Javadoc )