com.redijedi.tapestry.internal.LongValueEncoder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redijedi-t5-components
Show all versions of redijedi-t5-components
A collection of components built specifically for Tapestry 5.
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;
}
}
}