středa 7. dubna 2010

ZK and Very Long Strings

When I was working with ZK Web Framework, I have needed to display just a beginning of a very long String in a listbox. I have created a new type converter StringTrimConverter, which trims a string to the specified length. Hope, someone else may find it useful, see

3 komentáře:

Ricky řekl(a)...


in my zk developing i had the same Converter, without the maxLength initialization via zul. Very Nice.

Could you please explain how are you passing the parameters to the Converter via the self="@{maxLength(60)}"?

Ondrej Medek řekl(a)...

Hi, check the source code, method getMaxLength() perform a lazy initialisation of the maxLength. Not very convenient, though. I have already submitted a feature request 2962571.

Ondrej Medek řekl(a)...

I have simplified the way, how to pass maxLength parameter to the converter. Check the new version.