You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juddi.apache.org by al...@apache.org on 2020/07/19 22:43:19 UTC
[juddi] branch master updated: JUDDI-1014 adds a field to display
the display name of tmodels when adding tmodel instance info,
tmodel instance params
This is an automated email from the ASF dual-hosted git repository.
alexoree pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juddi.git
The following commit(s) were added to refs/heads/master by this push:
new 1c7db5d JUDDI-1014 adds a field to display the display name of tmodels when adding tmodel instance info, tmodel instance params
1c7db5d is described below
commit 1c7db5d2e0f9863614bd16e5ff4f627c63426a18
Author: Alex O'Ree <al...@apache.org>
AuthorDate: Sun Jul 19 18:43:20 2020 -0400
JUDDI-1014 adds a field to display the display name of tmodels when adding tmodel instance info, tmodel instance params
---
.../org/apache/juddi/webconsole/PostBackConstants.java | 1 +
.../java/org/apache/juddi/webconsole/hub/UddiHub.java | 10 ++++++++++
.../apache/juddi/webconsole/hub/builders/Printers.java | 6 +++++-
juddi-gui/src/main/webapp/bindingChooser.jsp | 3 ---
juddi-gui/src/main/webapp/bindingEditor.jsp | 10 ++++++++--
juddi-gui/src/main/webapp/js/bindingeditor.js | 1 -
juddi-gui/src/main/webapp/js/serviceEditor.js | 4 +++-
juddi-gui/src/main/webapp/js/tmodelChooser.js | 16 +++++++++++++---
8 files changed, 40 insertions(+), 11 deletions(-)
diff --git a/juddi-gui/src/main/java/org/apache/juddi/webconsole/PostBackConstants.java b/juddi-gui/src/main/java/org/apache/juddi/webconsole/PostBackConstants.java
index ee5afd7..5438f71 100644
--- a/juddi-gui/src/main/java/org/apache/juddi/webconsole/PostBackConstants.java
+++ b/juddi-gui/src/main/java/org/apache/juddi/webconsole/PostBackConstants.java
@@ -51,6 +51,7 @@ public interface PostBackConstants {
public static final String EMAIL = "Email";
public static final String SORTCODE = "Sortcode";
public static final String KEYNAME = "KeyName";
+ public static final String DISPLAYNAME = "DisplayName";
public static final String KEYVALUE = "KeyValue";
public static final String CATBAG_KEY_REF = "catbagkeyref";
public static final String IDENT_KEY_REF = "identbagkeyref";
diff --git a/juddi-gui/src/main/java/org/apache/juddi/webconsole/hub/UddiHub.java b/juddi-gui/src/main/java/org/apache/juddi/webconsole/hub/UddiHub.java
index 19ace92..36451dd 100644
--- a/juddi-gui/src/main/java/org/apache/juddi/webconsole/hub/UddiHub.java
+++ b/juddi-gui/src/main/java/org/apache/juddi/webconsole/hub/UddiHub.java
@@ -3957,4 +3957,14 @@ public class UddiHub implements Serializable {
x.add(id.trim());
return deleteBinding(x);
}
+
+ public String getTmodelDisplayName(String id) {
+ TModel tmodel = GettModelDetailsAsObject(id);
+ if (tmodel!=null &&
+ tmodel.getName()!=null &&
+ tmodel.getName().getValue()!=null) {
+ return tmodel.getName().getValue();
+ }
+ return "";
+ }
}
diff --git a/juddi-gui/src/main/java/org/apache/juddi/webconsole/hub/builders/Printers.java b/juddi-gui/src/main/java/org/apache/juddi/webconsole/hub/builders/Printers.java
index 0700351..317b932 100644
--- a/juddi-gui/src/main/java/org/apache/juddi/webconsole/hub/builders/Printers.java
+++ b/juddi-gui/src/main/java/org/apache/juddi/webconsole/hub/builders/Printers.java
@@ -173,6 +173,7 @@ public class Printers {
sb.append("<table class=\"table table-hover\"><tr><th>");
if (isChooser) {
+ //for the input checkbox
sb.append("</th><th>");
}
sb.append(ResourceLoader.GetResource(session, "items.key"))
@@ -186,7 +187,10 @@ public class Printers {
if (isChooser) {
sb.append("<input class=\"modalableTmodel\" type=checkbox id=\"")
.append(StringEscapeUtils.escapeHtml(findTModel.getTModelInfos().getTModelInfo().get(i).getTModelKey()))
- .append("\"></td><td>");
+ .append("\" value=\"" +
+ StringEscapeUtils.escapeHtml(trunc(findTModel.getTModelInfos().getTModelInfo().get(i).getName().getValue()))
+ +
+ "\"></td><td>");
}
if (!isChooser) {
sb.append("<a href=\"tmodelEditor.jsp?id=")
diff --git a/juddi-gui/src/main/webapp/bindingChooser.jsp b/juddi-gui/src/main/webapp/bindingChooser.jsp
index f448675..2532175 100644
--- a/juddi-gui/src/main/webapp/bindingChooser.jsp
+++ b/juddi-gui/src/main/webapp/bindingChooser.jsp
@@ -82,9 +82,6 @@ this page is meant to be included via jsp:include
</div>
</div>
<%
-//<a href="javascript:tModelCancel();" class="close" class="btn btn-danger">Cancel</a>
-//<a href="javascript:tModelModal();" class="btn" >Pick a tModel</a>
-//<a href="javascript:$('#bindingChooser').modal();" class="btn btn-primary" data-dismiss="modal">< %=ResourceLoader.GetResource(session, "actions.select")% ></a>
%>
diff --git a/juddi-gui/src/main/webapp/bindingEditor.jsp b/juddi-gui/src/main/webapp/bindingEditor.jsp
index 6811887..c678493 100644
--- a/juddi-gui/src/main/webapp/bindingEditor.jsp
+++ b/juddi-gui/src/main/webapp/bindingEditor.jsp
@@ -254,7 +254,7 @@
if (bd.getCategoryBag() == null) {
bd.setCategoryBag(new CategoryBag());
}
- // out.write("Keyed Reference Categories:");
+
for (int i = 0; i < bd.getCategoryBag().getKeyedReference().size(); i++) {
out.write("<div id=\"" + PostBackConstants.CATBAG_KEY_REF + i + "\" style=\"border-width:2px; border-style:solid\">");
@@ -366,10 +366,16 @@
out.write("<div style=\"float:left;height:100%\">"
+ "<a href=\"javascript:Remove('" + PostBackConstants.TMODELINSTANCE + k + "');\"><i class=\"icon-trash icon-large\"></i> </a></div>");
- out.write("<div style=\"float:left\"><b>" + ResourceLoader.GetResource(session, "items.tmodel.key") + " </b> (<a href=\"javascript:tModelModal('" + PostBackConstants.TMODELINSTANCE + k + PostBackConstants.KEYNAME + "')\" ><i class=\"icon-list-alt icon-large\"></i>" + ResourceLoader.GetResource(session, "items.picker") + "</a>) "
+ out.write("<div style=\"float:left\"><b>" + ResourceLoader.GetResource(session, "items.tmodel.key") + " </b> "
+ + "(<a href=\"javascript:tModelModal('" + PostBackConstants.TMODELINSTANCE + k + PostBackConstants.KEYNAME + "','"
+ +PostBackConstants.TMODELINSTANCE + k + PostBackConstants.DISPLAYNAME + "')\" ><i class=\"icon-list-alt icon-large\"></i>" + ResourceLoader.GetResource(session, "items.picker") + "</a>) "
+ "<a href=\"tmodelEditor.jsp?id=" + URLEncoder.encode(bd.getTModelInstanceDetails().getTModelInstanceInfo().get(k).getTModelKey(), "UTF8") + "\"><i class=\"icon-zoom-in icon-large\"></i></a>"
+ ": </div>"
+ "<div class=\"edit\" id=\"" + PostBackConstants.TMODELINSTANCE + k + PostBackConstants.KEYNAME + "\">" + StringEscapeUtils.escapeHtml(bd.getTModelInstanceDetails().getTModelInstanceInfo().get(k).getTModelKey()) + "</div>");
+ out.write("<div id=\"" + PostBackConstants.TMODELINSTANCE + k + PostBackConstants.DISPLAYNAME +"\">" +
+
+ StringEscapeUtils.escapeHtml(x.getTmodelDisplayName(bd.getTModelInstanceDetails().getTModelInstanceInfo().get(k).getTModelKey()))
+ +"</div>");
// out.write("<div style=\"float:left\"><span title=\"Instance Params\">Value</span>: </div>"
// + "<div class=\"edit\" id=\"" + PostBackConstants.TMODELINSTANCE + k + PostBackConstants.VALUE + "\">" + ((bd.getTModelInstanceDetails().getTModelInstanceInfo().get(k).getInstanceDetails() != null) ? StringEscapeUtils.escapeHtml(bd.getTModelInstanceDetails().getTModelInstanceInfo().get(k).getInstanceDetails().getInstanceParms()) : "") + "</div>");
%>
diff --git a/juddi-gui/src/main/webapp/js/bindingeditor.js b/juddi-gui/src/main/webapp/js/bindingeditor.js
index 7ddc822..329a8e0 100644
--- a/juddi-gui/src/main/webapp/js/bindingeditor.js
+++ b/juddi-gui/src/main/webapp/js/bindingeditor.js
@@ -56,7 +56,6 @@ function AddTmodelInstanceParam(key)
+"<a href=\"javascript:AddDescriptionSpecific('" + div + i + "instanceDescription');\"><i class=\"icon-plus-sign icon-large\"></i></a> "
+i18n_tmodelInstanceDescriptionAdd+"<br>"
+"<div id=\"" + div + i + "instanceDescription\" style=\"border-width: 1px; border-style: groove;\">"
- //issue
+"<div><br><b>" + i18n_overviewdoc + "</b> - " + i18n_overviewdocDescription + "<br>"
+"<a href=\"javascript:AddOverviewDocumentSpecific('" + div + i +
diff --git a/juddi-gui/src/main/webapp/js/serviceEditor.js b/juddi-gui/src/main/webapp/js/serviceEditor.js
index 0446a39..ec5cf84 100644
--- a/juddi-gui/src/main/webapp/js/serviceEditor.js
+++ b/juddi-gui/src/main/webapp/js/serviceEditor.js
@@ -132,7 +132,9 @@ function AddTmodelInstance(div)
var k = currentOverviewDocs;
$("<div id=\"" + div + i + "\" style=\"border-width: 2px; border-style: dashed; border-color: red\">"
+"<div style=\"float:left;height:100%\"><a href=\"javascript:Remove('" + div + i + "');\"><i class=\"icon-trash icon-large\"></i></a></div><div style=\"float:left\">"
- +"<b>" + i18n_tmodelkey + "</b> (<a href=\"javascript:tModelModal('"+div + i + "KeyName\')\" ><i class=\"icon-list-alt icon-large\"></i>" + il8n_picker + "</a>): </div><div class=\"edit\" id=\"" + div + i + "KeyName\"></div>"
+ +"<b>" + i18n_tmodelkey + "</b> (<a href=\"javascript:tModelModal('"+div + i + "KeyName\','"+div + i + "DisplayName\')\" >\n\
+ <i class=\"icon-list-alt icon-large\"></i>" + il8n_picker + "</a>): </div><div class=\"edit\" id=\"" + div + i + "KeyName\"></div>"
+ +"<div id=\"" + div + i + "DisplayName\"></div>"
+"<br><div style=\"float:left\"><b>" + i18n_tmodelInstanceParams + ":</b> </div><div class=\"edit\" id=\"" + div + i + "instanceValue\"></div>"
+"<br><b>" + i18n_tmodelInstanceDescription + "</b> - " + i18n_tmodelInstanceDescription2 + "<br>"
+"<a href=\"javascript:AddDescriptionSpecific('" + div + i + "instanceDescription');\"><i class=\"icon-plus-sign icon-large\"></i></a> "
diff --git a/juddi-gui/src/main/webapp/js/tmodelChooser.js b/juddi-gui/src/main/webapp/js/tmodelChooser.js
index 055a3b3..6f8c107 100644
--- a/juddi-gui/src/main/webapp/js/tmodelChooser.js
+++ b/juddi-gui/src/main/webapp/js/tmodelChooser.js
@@ -29,9 +29,11 @@ function reloadTmodelModal()
/**
*This launches the tModel model div, upon return (and if not abprted), the contents of the div parameter will be replaced with the
- *first selected tModel
+ *first selected tModel key
+ *divDisplayName if defined, is the display name for the tModel
+ *
*/
-function tModelModal(div){
+function tModelModal(div, divDisplayName){
$(div).focus();
//reset the form in case it was lanucheed more than once per page view
reloadTmodelModal();
@@ -45,7 +47,10 @@ function tModelModal(div){
else{
//alert('Result: ' + result.join());
- $("#" + div).html(result[0]);
+ $("#" + div).text(result[0]);
+ if (divDisplayName) {
+ $("#" + divDisplayName).text(result[1]);
+ }
}
// return false;
}
@@ -86,10 +91,15 @@ $.dialogTmodel = {
$(".modalableTmodel").each(function()
{
var id=$(this).attr("id");
+ var displayName=$(this).attr("value");
if ($(this).is(':checked')) {
selectedtmodels.push(
id
);
+ selectedtmodels.push(
+ displayName
+ );
+
}
});
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@juddi.apache.org
For additional commands, e-mail: commits-help@juddi.apache.org