Last active
August 16, 2016 03:52
-
-
Save xzer/09df1e8ef129267545da390a33064656 to your computer and use it in GitHub Desktop.
some idea of how to add filter mechanism to asta4d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
render.add(".x-num", Filter.formatedNum(121)); | |
interface Filter<S, T> { | |
public T convert(S s); | |
} | |
class NumFilter implements Filter<Integer, String>{ | |
} | |
render.add(".x-num", 213); | |
render.add(".x-num", NumFilter.convert(123)); | |
>> render.add(".x-num", 123, NumFilter.class).add(".x-fff", "xxx"); | |
>> render.add(".x-num", 123, numFilter).add(".x-fff", "xxx"); | |
render.add(".x-num", 123).filter(NumFilter.class).add("xxx", "fff"); | |
render.add(".x-num", 123).addFilter(".x-num", NumFilter.class); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment