[jboss-svn-commits] JBL Code SVN: r29384 - in labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor: server/files and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Sep 16 21:40:06 EDT 2009
Author: jervisliu
Date: 2009-09-16 21:40:06 -0400 (Wed, 16 Sep 2009)
New Revision: 29384
Modified:
labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/client/explorer/ExplorerLayoutManager.java
labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/server/files/FeedServlet.java
Log:
Merged fix for https://jira.jboss.org/jira/browse/guvnor-285 from BRMS 5.0.1 branch to trunk.
Modified: labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/client/explorer/ExplorerLayoutManager.java
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/client/explorer/ExplorerLayoutManager.java 2009-09-16 23:04:58 UTC (rev 29383)
+++ labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/client/explorer/ExplorerLayoutManager.java 2009-09-17 01:40:06 UTC (rev 29384)
@@ -213,7 +213,13 @@
if (tok == null) return new BookmarkInfo();
BookmarkInfo bi = new BookmarkInfo();
if (tok.startsWith("asset=")) { //NON-NLS
- String uuid = tok.substring(6).split("&nochrome")[0]; //NON-NLS
+ String uuid = null;
+ //URLDecoder is not supported in GWT. We decode ampersand (&) here by ourself.
+ if(tok.indexOf("%26nochrome") >= 0) {
+ uuid = tok.substring(6).split("%26nochrome")[0]; //NON-NLS
+ } else {
+ uuid = tok.substring(6).split("&nochrome")[0]; //NON-NLS
+ }
bi.loadAsset = true;
bi.assetId = uuid;
}
Modified: labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/server/files/FeedServlet.java
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/server/files/FeedServlet.java 2009-09-16 23:04:58 UTC (rev 29383)
+++ labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/server/files/FeedServlet.java 2009-09-17 01:40:06 UTC (rev 29384)
@@ -212,8 +212,12 @@
public AtomEntry(HttpServletRequest req, AssetItem asset) {
this.name = asset.getName();
this.format = asset.getFormat();
- this.webURL = req.getParameter(VIEW_URL) + "#asset=" + asset.getUUID() + "&nochrome";
- this.id = asset.getUUID() + "&version=" + asset.getVersionNumber();
+ //Escape & with %26 to make generated XML safe.
+ this.webURL = req.getParameter(VIEW_URL) + "#asset=" + asset.getUUID() + "%26nochrome";
+ //Each history version of asset has its unique UUID. &version is not needed here. Plus &version
+ //is not being parsed on the server side
+ //this.id = asset.getUUID() + "&version=" + asset.getVersionNumber();
+ this.id = asset.getUUID();
this.updated = ISO8601.format(asset.getLastModified());
this.published = ISO8601.format(asset.getCreatedDate());
this.author = asset.getCreator();
@@ -226,7 +230,7 @@
public AtomEntry(HttpServletRequest req, AssetItem asset, DiscussionRecord discussionRec) {
this.name = asset.getName();
this.format = asset.getFormat();
- this.webURL = req.getParameter(VIEW_URL) + "#asset=" + asset.getUUID() + "&nochrome";
+ this.webURL = req.getParameter(VIEW_URL) + "#asset=" + asset.getUUID() + "%26nochrome";
this.id = asset.getUUID() + "&discussion=" + discussionRec.timestamp + "&author=" + discussionRec.author;
Calendar c = Calendar.getInstance();
c.setTime(new Date(discussionRec.timestamp));
More information about the jboss-svn-commits
mailing list