Edit mode: showing the field "didascalia" instead of "titolo" in case of
immaginibackup_master_concessioni r5.5.0
parent
17f2c9093d
commit
eb8dceb8ff
@ -1,5 +1,5 @@
|
|||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
jarsExcludedFromWebInfLib=
|
jarsExcludedFromWebInfLib=
|
||||||
lastWarOutDir=/home/francescomangiacrapa/git/geoportal-data-entry-app/target/geoportal-data-entry-app-2.0.0-SNAPSHOT
|
lastWarOutDir=/home/francescomangiacrapa/git/geoportal-data-entry-app/target/geoportal-data-entry-app-2.0.0
|
||||||
warSrcDir=src/main/webapp
|
warSrcDir=src/main/webapp
|
||||||
warSrcDirIsOutput=false
|
warSrcDirIsOutput=false
|
||||||
|
@ -0,0 +1,34 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package org.gcube.portlets.user.geoportaldataentry.client.ui.utils;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class StringUtil.
|
||||||
|
*
|
||||||
|
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||||||
|
*
|
||||||
|
* Oct 12, 2021
|
||||||
|
*/
|
||||||
|
public class StringUtil {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ellipsize.
|
||||||
|
*
|
||||||
|
* @param input the input string that may be subjected to shortening
|
||||||
|
* @param maxCharacters the maximum characters that must be returned for the
|
||||||
|
* input string
|
||||||
|
* @return the string
|
||||||
|
*/
|
||||||
|
public static String ellipsize(String input, int maxCharacters) {
|
||||||
|
|
||||||
|
if (input == null)
|
||||||
|
return "";
|
||||||
|
|
||||||
|
if (input.length() < maxCharacters)
|
||||||
|
return input;
|
||||||
|
|
||||||
|
return input.substring(0, maxCharacters) + "...";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue