All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.redijedi.tapestry.internal.LongValueEncoder Maven / Gradle / Ivy

The newest version!
package com.redijedi.tapestry.internal;

import org.apache.tapestry.ValueEncoder;

/**
 * @author torr
 * 
 */
public class LongValueEncoder implements ValueEncoder {

	public String toClient(Long value) {
		return value == null ? "" : value.toString();
	}

	public Long toValue(String clientValue) {
		try {
			return new Long(clientValue);
		} catch (NumberFormatException e) {
			return null;
		}
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy