You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by sc...@apache.org on 2010/01/29 13:15:26 UTC
svn commit: r904481 - in /incubator/wookie/trunk:
WebContent/shared/js/wookie-wrapper.js
src/org/apache/wookie/ajaxmodel/impl/WidgetAPIImpl.java
src/org/apache/wookie/beans/Widget.java
Author: scottbw
Date: Fri Jan 29 12:15:24 2010
New Revision: 904481
URL: http://svn.apache.org/viewvc?rev=904481&view=rev
Log:
Added the shortName property to the widget runtime metadata; this enables us to pass TWI test "ak". See also WOOKIE-20
Modified:
incubator/wookie/trunk/WebContent/shared/js/wookie-wrapper.js
incubator/wookie/trunk/src/org/apache/wookie/ajaxmodel/impl/WidgetAPIImpl.java
incubator/wookie/trunk/src/org/apache/wookie/beans/Widget.java
Modified: incubator/wookie/trunk/WebContent/shared/js/wookie-wrapper.js
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/WebContent/shared/js/wookie-wrapper.js?rev=904481&r1=904480&r2=904481&view=diff
==============================================================================
--- incubator/wookie/trunk/WebContent/shared/js/wookie-wrapper.js (original)
+++ incubator/wookie/trunk/WebContent/shared/js/wookie-wrapper.js Fri Jan 29 12:15:24 2010
@@ -142,6 +142,7 @@
Widget.authorEmail = map["authorEmail"];
Widget.authorHref = map["authorHref"];
Widget.name = map["name"];
+ Widget.shortName = map["shortName"];
Widget.description = map["description"];
Widget.version = map["version"];
Widget.height = parseInt(map["height"]);
Modified: incubator/wookie/trunk/src/org/apache/wookie/ajaxmodel/impl/WidgetAPIImpl.java
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/src/org/apache/wookie/ajaxmodel/impl/WidgetAPIImpl.java?rev=904481&r1=904480&r2=904481&view=diff
==============================================================================
--- incubator/wookie/trunk/src/org/apache/wookie/ajaxmodel/impl/WidgetAPIImpl.java (original)
+++ incubator/wookie/trunk/src/org/apache/wookie/ajaxmodel/impl/WidgetAPIImpl.java Fri Jan 29 12:15:24 2010
@@ -98,6 +98,7 @@
map.put("authorHref", String.valueOf(widget.getWidgetAuthorHref()));//$NON-NLS-1$
map.put("name", String.valueOf(widget.getWidgetTitle()));//$NON-NLS-1$
map.put("description", String.valueOf(widget.getWidgetDescription()));//$NON-NLS-1$
+ map.put("shortName", String.valueOf(widget.getWidgetShortName())); //$NON-NLS-1$
map.put("version", widget.getVersion());//$NON-NLS-1$
map.put("width", String.valueOf(widget.getWidth()));//$NON-NLS-1$
map.put("height", String.valueOf(widget.getHeight()));//$NON-NLS-1$
Modified: incubator/wookie/trunk/src/org/apache/wookie/beans/Widget.java
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/src/org/apache/wookie/beans/Widget.java?rev=904481&r1=904480&r2=904481&view=diff
==============================================================================
--- incubator/wookie/trunk/src/org/apache/wookie/beans/Widget.java (original)
+++ incubator/wookie/trunk/src/org/apache/wookie/beans/Widget.java Fri Jan 29 12:15:24 2010
@@ -177,6 +177,18 @@
}
/**
+ * Temporary convenience method for getting a widget short name; calls to this
+ * method should be replaced with calls to retrieve the localized Name object for the Widget
+ */
+ @Deprecated
+ public String getWidgetShortName(){
+ String title = IW3CXMLConfiguration.UNKNOWN;
+ Name name = (Name) LocalizationUtils.getLocalizedElement(Name.findByValue("widget", this),new String[]{"en"});
+ if (name != null) title = name.getShortName();
+ return title;
+ }
+
+ /**
* Temporary convenience method for getting a widget description; calls to this
* method should be replaced with calls to getWidgetDescription(locale)
*/