| author | Sidharth Singh | 2012-11-05 04:12:06 (EST) |
|---|---|---|
| committer | Sven Rottstock | 2012-11-14 09:20:23 (EST) |
| commit | bd40c52df801462855046f9afed7d8e17fd9c230 (patch) (side-by-side diff) | |
| tree | 9a2a4d18165c048934b52b4c82dc1a0deddb1bed | |
| parent | 7b6c13f61fc8c76c0a961b84c1bef19d7b73970d (diff) | |
| download | org.eclipse.stardust.ui.web-bd40c52df801462855046f9afed7d8e17fd9c230.zip org.eclipse.stardust.ui.web-bd40c52df801462855046f9afed7d8e17fd9c230.tar.gz org.eclipse.stardust.ui.web-bd40c52df801462855046f9afed7d8e17fd9c230.tar.bz2 | |
Jira-ID: CRNT-24693
Added code to cache the title in IppCommonMenuItem
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@60574 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
| -rw-r--r-- | views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/common/spi/menu/impl/IppCommonMenuItem.java | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/common/spi/menu/impl/IppCommonMenuItem.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/common/spi/menu/impl/IppCommonMenuItem.java index 06dee91..883e1ac 100644 --- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/common/spi/menu/impl/IppCommonMenuItem.java +++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/common/spi/menu/impl/IppCommonMenuItem.java @@ -27,6 +27,7 @@ public class IppCommonMenuItem implements CommonMenuItem private String URL;
private String iconPath;
private boolean changed;
+ private String titleCache;
public IppCommonMenuItem()
{
@@ -59,16 +60,34 @@ public class IppCommonMenuItem implements CommonMenuItem */
public String getTitle()
{
- if (title.contains("#"))
+ if (null == titleCache)
{
- String[] parts = title.split("#");
- if (null != parts)
+ try
{
- MessagesViewsCommonBean messBean = (MessagesViewsCommonBean) FacesUtils.getBeanFromContext(parts[0]);
- return messBean.getString(parts[1]);
+ if (title.contains("#"))
+ {
+ String[] parts = title.split("#");
+ if (null != parts)
+ {
+ MessagesViewsCommonBean messBean = (MessagesViewsCommonBean) FacesUtils.getBeanFromContext(parts[0]);
+ String titleStr = messBean.getString(parts[1]);
+ titleCache = titleStr;
+ }
+ }
}
+ catch (Exception e)
+ {
+ }
+ finally
+ {
+ if (null == titleCache)
+ {
+ titleCache = title;
+ }
+ }
+
}
- return title;
+ return titleCache;
}
public String getURL()
|

