- protected void updatePartName() {
- // String name = CommonsJcrUtils.get(entity, Property.JCR_TITLE);
- // if (CommonsJcrUtils.checkNotEmptyString(name)) {
- // if (name.length() > SHORT_NAME_LENGHT)
- // name = name.substring(0, SHORT_NAME_LENGHT - 1) + "...";
- // setPartName(name);
- // }
+ protected void updatePartNameAndToolTip() {
+ String name = JcrUtils.get(akbNode, Property.JCR_TITLE);
+
+ // Name
+ if (AkbJcrUtils.checkNotEmptyString(name)) {
+ if (name.length() > SHORT_NAME_LENGHT)
+ name = name.substring(0, SHORT_NAME_LENGHT - 1) + "...";
+ setPartName(name);
+ }
+
+ // Tooltip
+ if (AkbJcrUtils.isEmptyString(name))
+ name = "current item";
+ setTitleToolTip("Display and edit " + name);