on 11-20-2006 1:17 PM
I have a big string - 200 symbols for instance, but i want to display only beginning of it and replace ending by dots, so to have instead of column:
abcsdfdsfsdf
qwesdhfghdfgh
cvhbxcvbcvbc
this one:
abcsdf...
qwesd...
cvhbxc...
Hi Denis
Create calculated attribute 'cuttedDescription' and simple attribute 'cuttedDescription_cache'. Let me suppose 'description' keeps your original value for cutting. Put the following code into a getter:
public java.lang.String getCuttedDescription(IPrivateTableView.ITableItemElement element)
{
//@@begin getCuttedDescription(IPrivateTableView.ITableItemElement)
String value = element.getCuttedDescription_cache();
if (value == null) {
value = element.getDescription();
if (value == null) {
value = "";
}
if (value.length() > DESCRIPTION_LENGTH + 3) {
value = value.substring(0, DESCRIPTION_LENGTH) + "...";
}
element.setCuttedDescription_cache(value);
}
return value;
//@@end
}
BR
Sergei
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I guess you have to do yourself.
ADD an attrbute "shortTEXT", good if calculated VALUE.
and to
something like this
public void setYOUR_NODE_ShortTEXT(.... element, java.lang.String value)
{
//@@begin setColumnSelezionatiShT(IPrivateElencoCampi.IColumnSelezionatiElement, java.lang.String)
element.setShortTEXT = element.getLONGTEXT().substring(0,5) + " .... ";
//@@end
}
And bind it to VIEW TABLE UI.
Message was edited by:
Roberto Tagliento
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.