com.github.datalking.common.convert.editor.CurrencyEditor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of play-mvc Show documentation
Show all versions of play-mvc Show documentation
simple mvc framework based on java servlet.
The newest version!
package com.github.datalking.common.convert.editor;
import java.beans.PropertyEditorSupport;
import java.util.Currency;
/**
*/
public class CurrencyEditor extends PropertyEditorSupport {
@Override
public void setAsText(String text) throws IllegalArgumentException {
setValue(Currency.getInstance(text));
}
@Override
public String getAsText() {
Currency value = (Currency) getValue();
return (value != null ? value.getCurrencyCode() : "");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy