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 2014/02/17 19:35:34 UTC
svn commit: r1569077 - in /juddi/trunk:
juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/
juddi-gui/src/main/java/org/apache/juddi/webconsole/hub/builders/
juddi-gui/src/main/webapp/ juddi-gui/src/main/webapp/js/
Author: alexoree
Date: Mon Feb 17 18:35:34 2014
New Revision: 1569077
URL: http://svn.apache.org/r1569077
Log:
JUDDI-849 fixing several issues with address entry and rendering.
JUDDI-831 fixing an issue with saving a business without a key defined
Modified:
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/MapUDDIv3Tov2.java
juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/hub/builders/Builders.java
juddi/trunk/juddi-gui/src/main/webapp/businessEditor2.jsp
juddi/trunk/juddi-gui/src/main/webapp/js/businessEditor.js
Modified: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/MapUDDIv3Tov2.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/MapUDDIv3Tov2.java?rev=1569077&r1=1569076&r2=1569077&view=diff
==============================================================================
--- juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/MapUDDIv3Tov2.java (original)
+++ juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/MapUDDIv3Tov2.java Mon Feb 17 18:35:34 2014
@@ -121,6 +121,8 @@ public class MapUDDIv3Tov2 {
}
BusinessEntity item = new org.uddi.api_v2.BusinessEntity();
item.setBusinessKey(be.getBusinessKey());
+ if (item.getBusinessKey()==null)
+ item.setBusinessKey("");
item.setCategoryBag(MapCategoryBag(be.getCategoryBag()));
item.setContacts(MapContacts(be.getContacts()));
item.setDiscoveryURLs(MapDiscoveryURLs(be.getDiscoveryURLs()));
Modified: juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/hub/builders/Builders.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/hub/builders/Builders.java?rev=1569077&r1=1569076&r2=1569077&view=diff
==============================================================================
--- juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/hub/builders/Builders.java (original)
+++ juddi/trunk/juddi-gui/src/main/java/org/apache/juddi/webconsole/hub/builders/Builders.java Mon Feb 17 18:35:34 2014
@@ -329,7 +329,7 @@ public class Builders {
*
* @param map
* @param prefix
- * @param cte
+ * @param cte Localized "Click to edit"
* @return list
*/
public static List<Address> BuildAddress(Map map, String prefix, String cte, String locale) {
@@ -368,7 +368,7 @@ public class Builders {
} else {
pn.setTModelKey(t[0]);
}
- pn.getAddressLine().addAll(BuildAddressLine(MapFilter(map, prefix + index + PostBackConstants.ADDRESSLINE), prefix + index + PostBackConstants.ADDRESSLINE, locale));
+ pn.getAddressLine().addAll(BuildAddressLine(MapFilter(map, prefix + index + PostBackConstants.ADDRESSLINE), prefix + index + PostBackConstants.ADDRESSLINE, cte,locale));
ret.add(pn);
processedIndexes.add(index);
}
@@ -560,9 +560,11 @@ public class Builders {
*
* @param map
* @param prefix
+ * @param cte localized Click to edit
+ * @param locale
* @return list
*/
- public static List<AddressLine> BuildAddressLine(Map map, String prefix, String locale) {
+ public static List<AddressLine> BuildAddressLine(Map map, String prefix, String cte, String locale) {
List<AddressLine> ret = new ArrayList();
Iterator it = map.keySet().iterator();
List<String> processedIndexes = new ArrayList<String>();
@@ -577,9 +579,13 @@ public class Builders {
String[] t = (String[]) map.get(prefix + index + PostBackConstants.VALUE);
pn.setValue(t[0]);
t = (String[]) map.get(prefix + index + PostBackConstants.KEYNAME);
- pn.setKeyName(t[0]);
+ if (t != null && t.length > 0 && !cte.equalsIgnoreCase(t[0])) {
+ pn.setKeyName(t[0]);
+ }
t = (String[]) map.get(prefix + index + PostBackConstants.KEYVALUE);
- pn.setKeyValue(t[0]);
+ if (t != null && t.length > 0 && !cte.equalsIgnoreCase(t[0])) {
+ pn.setKeyValue(t[0]);
+ }
ret.add(pn);
processedIndexes.add(index);
}
Modified: juddi/trunk/juddi-gui/src/main/webapp/businessEditor2.jsp
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-gui/src/main/webapp/businessEditor2.jsp?rev=1569077&r1=1569076&r2=1569077&view=diff
==============================================================================
--- juddi/trunk/juddi-gui/src/main/webapp/businessEditor2.jsp (original)
+++ juddi/trunk/juddi-gui/src/main/webapp/businessEditor2.jsp Mon Feb 17 18:35:34 2014
@@ -89,6 +89,40 @@
var currentcatkeyref =<%=bd.getCategoryBag().getKeyedReference().size()%>;
var currentcatkeyrefgrp =<%=bd.getCategoryBag().getKeyedReferenceGroup().size()%>;
var currentident =<%=bd.getIdentifierBag().getKeyedReference().size()%>;
+ <%
+ int contactnames=0;
+ int contactemails=0;
+ int contactdescriptions=0;
+ int contactphones=0;
+ int contactaddresses=0;
+ int contactaddressLines=0;
+ if (bd.getContacts()!=null){
+ for (int i=0; i < bd.getContacts().getContact().size(); i++){
+ contactnames += bd.getContacts().getContact().get(i).getPersonName().size();
+ contactemails+= bd.getContacts().getContact().get(i).getEmail().size();
+ contactdescriptions +=bd.getContacts().getContact().get(i).getDescription().size();
+ contactphones+=bd.getContacts().getContact().get(i).getPhone().size();
+ contactaddresses+=bd.getContacts().getContact().get(i).getAddress().size();
+ for (int k=0; k < bd.getContacts().getContact().get(i).getAddress().size(); k++){
+ contactaddressLines +=bd.getContacts().getContact().get(i).getAddress().get(k).getAddressLine().size();
+ }
+ }
+ }
+ int currentcatkeyrefgrpitems=0;
+ if (bd.getCategoryBag()!=null){
+ for (int i=0; i < bd.getCategoryBag().getKeyedReferenceGroup().size(); i++){
+ currentcatkeyrefgrpitems+=bd.getCategoryBag().getKeyedReferenceGroup().get(i).getKeyedReference().size();
+ }
+ }
+ %>
+ var contactname=<%=contactnames%>;
+ var contactemail=<%=contactemails%>;
+ var contactdescription=<%=contactdescriptions%>;
+ var contactphone=<%=contactphones%>;
+ var contactaddress=<%=contactaddresses%>;
+ var contactaddresslines=<%=contactaddressLines%>;
+ var currentcatkeyrefgrpitems=<%=currentcatkeyrefgrpitems%>;
+
</script>
<ul class="nav nav-tabs" id="myTab">
@@ -230,7 +264,7 @@
+ "');\"><i class=\"icon-trash icon-large\"></i></a></div>"
+ "<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.contact.type") + ": </div>"
+ "<div class=\"edit\" id=\"" + PostBackConstants.CONTACT_PREFIX + i + PostBackConstants.TYPE + "\">"
- + StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getUseType())
+ + (bd.getContacts().getContact().get(i).getUseType()!=null?StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getUseType()):"")
+ "</div>"
+ "<a href=\"javascript:AddContactName('" + i + "');\"><i class=\"icon-plus-sign icon-large\"></i></a>" + ResourceLoader.GetResource(session, "items.name") + "  "
+ "<a href=\"javascript:AddContactEmail('" + i + "');\"><i class=\"icon-plus-sign icon-large\"></i></a>" + ResourceLoader.GetResource(session, "items.email") + "  "
@@ -247,7 +281,8 @@
+ "');\"><i class=\"icon-trash icon-large\"></i></a></div>"
+ "<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.name") + ": </div>"
+ "<div class=\"edit\" id=\"" + PostBackConstants.CONTACT_PREFIX + contactid + PostBackConstants.NAME + contactname + PostBackConstants.VALUE + "\">"
- + StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getPersonName().get(k).getValue()) + "</div>"
+ + (bd.getContacts().getContact().get(i).getPersonName().get(k).getValue()!=null?StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getPersonName().get(k).getValue()) :"")
+ + "</div>"
+ "<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.lang") + ": </div>"
+ "<div class=\"edit\" id=\"" + PostBackConstants.CONTACT_PREFIX + contactid + PostBackConstants.NAME + contactname + PostBackConstants.LANG + "\">"
+ (bd.getContacts().getContact().get(i).getPersonName().get(k).getLang() == null ? ""
@@ -263,11 +298,12 @@
+ "');\"><i class=\"icon-trash icon-large\"></i></a></div>"
+ "<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.type") + ": </div>"
+ "<div class=\"edit\" id=\"" + PostBackConstants.CONTACT_PREFIX + contactid + PostBackConstants.EMAIL + contactemail + PostBackConstants.TYPE + "\">"
- + StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getEmail().get(k).getUseType())
+ + (bd.getContacts().getContact().get(i).getEmail().get(k).getUseType()!=null?StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getEmail().get(k).getUseType()):"")
+ "</div>"
+ "<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.value") + ": </div>"
+ "<div class=\"edit\" id=\"" + PostBackConstants.CONTACT_PREFIX + contactid + PostBackConstants.EMAIL + contactemail + PostBackConstants.VALUE + "\">"
- + StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getEmail().get(k).getValue()) + "</div>"
+ + (bd.getContacts().getContact().get(i).getEmail().get(k).getValue()!=null?StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getEmail().get(k).getValue()) :"")
+ + "</div>"
+ "</div>");
}
//out.write("</div>");
@@ -279,11 +315,11 @@
+ "');\"><i class=\"icon-trash icon-large\"></i></a></div>"
+ "<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.description") + ": </div>"
+ "<div class=\"edit\" id=\"" + PostBackConstants.CONTACT_PREFIX + contactid + PostBackConstants.DESCRIPTION + contactdescription + PostBackConstants.VALUE + "\">"
- + StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getDescription().get(k).getValue())
+ + (bd.getContacts().getContact().get(i).getDescription().get(k).getValue()!=null?StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getDescription().get(k).getValue()):"")
+ "</div>"
+ "<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.lang") + ": </div>"
+ "<div class=\"edit\" id=\"" + PostBackConstants.CONTACT_PREFIX + contactid + PostBackConstants.DESCRIPTION + contactdescription + PostBackConstants.LANG + "\">"
- + StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getDescription().get(k).getLang())
+ + (bd.getContacts().getContact().get(i).getDescription().get(k).getLang()!=null?StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getDescription().get(k).getLang()):"")
+ "</div>" //keep it
+ "</div>");
}
@@ -301,11 +337,11 @@
+ "');\"><i class=\"icon-trash icon-large\"></i></a></div>"
+ "<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.phone") + ": </div>"
+ "<div class=\"edit\" id=\"" + PostBackConstants.CONTACT_PREFIX + contactid + PostBackConstants.PHONE + contactphone + PostBackConstants.VALUE + "\">"
- + StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getPhone().get(k).getValue())
+ + (bd.getContacts().getContact().get(i).getPhone().get(k).getValue()!=null?StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getPhone().get(k).getValue()):"")
+ "</div>"
+ "<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.type") + ": </div>"
+ "<div class=\"edit\" id=\"" + PostBackConstants.CONTACT_PREFIX + contactid + PostBackConstants.PHONE + contactphone + PostBackConstants.TYPE + "\">"
- + StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getPhone().get(k).getUseType())
+ + (bd.getContacts().getContact().get(i).getPhone().get(k).getUseType()!=null?StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getPhone().get(k).getUseType()):"")
+ "</div>"
+ "</div>");
@@ -319,19 +355,19 @@
+ "');\"><i class=\"icon-trash icon-large\"></i></a>" + ResourceLoader.GetResource(session, "items.address") + "</div><br>"
+ "<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.lang") + ": </div>"
+ "<div class=\"edit\" id=\"" + PostBackConstants.CONTACT_PREFIX + contactid + PostBackConstants.ADDRESS + contactaddress + PostBackConstants.LANG + "\">"
- + StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getAddress().get(k).getLang())
+ + (bd.getContacts().getContact().get(i).getAddress().get(k).getLang()!=null ? StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getAddress().get(k).getLang()):"")
+ "</div>"
+ "<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.sortcode") + ": </div>"
+ "<div class=\"edit\" id=\"" + PostBackConstants.CONTACT_PREFIX + contactid + PostBackConstants.ADDRESS + contactaddress + PostBackConstants.SORTCODE + "\">"
- + StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getAddress().get(k).getSortCode())
+ + (bd.getContacts().getContact().get(i).getAddress().get(k).getSortCode()!=null ? StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getAddress().get(k).getSortCode()) : "" )
+ "</div>"
+ "<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.type") + ": </div>"
+ "<div class=\"edit\" id=\"" + PostBackConstants.CONTACT_PREFIX + contactid + PostBackConstants.ADDRESS + contactaddress + PostBackConstants.TYPE + "\">"
- + StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getAddress().get(k).getUseType())
+ + (bd.getContacts().getContact().get(i).getAddress().get(k).getUseType()!=null ? StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getAddress().get(k).getUseType()) : "")
+ "</div>"
+ "<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.tmodel.key") + " (<a href=\"javascript:tModelModal('" + PostBackConstants.CONTACT_PREFIX + contactid + PostBackConstants.ADDRESS + contactaddress + PostBackConstants.KEYNAME + "')\" >" + "<i class=\"icon-list-alt icon-large\"></i>" + ResourceLoader.GetResource(session, "items.picker") + "</a>): </div>"
+ "<div class=\"edit\" id=\"" + PostBackConstants.CONTACT_PREFIX + contactid + PostBackConstants.ADDRESS + contactaddress + PostBackConstants.KEYNAME + "\">"
- + StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getAddress().get(k).getTModelKey())
+ + (bd.getContacts().getContact().get(i).getAddress().get(k).getTModelKey()!=null ? StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getAddress().get(k).getTModelKey()) : "" )
+ "</div>"
+ "<div><br><a href=\"javascript:AddContactAddressLine('" + contactid + PostBackConstants.ADDRESS + contactaddress + "');\">"
+ "<i class=\"icon-plus-sign icon-large\"></i></a> " + ResourceLoader.GetResource(session, "items.addressline.add") + "</div>");
@@ -340,19 +376,19 @@
int contactaddresslines = j;
out.write("<div id=\"" + PostBackConstants.CONTACT_PREFIX + contactid + PostBackConstants.ADDRESS + k + PostBackConstants.ADDRESSLINE + contactaddresslines
+ "\" style=\"border-width:1px; border-style:solid\" >"
- + "<div style=\"float:left;height:100%\"><a href=\"javascript:Remove('" + PostBackConstants.CONTACT_PREFIX + contactid + PostBackConstants.ADDRESSLINE + contactaddresslines
+ + "<div style=\"float:left;height:100%\"><a href=\"javascript:Remove('" + PostBackConstants.CONTACT_PREFIX + contactid + PostBackConstants.ADDRESS + k + PostBackConstants.ADDRESSLINE + contactaddresslines
+ "');\"><i class=\"icon-trash icon-large\"></i></a></div>"
+ "<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.addressvalue") + ": </div>"
+ "<div class=\"edit\" id=\"" + PostBackConstants.CONTACT_PREFIX + contactid + PostBackConstants.ADDRESS + k + PostBackConstants.ADDRESSLINE + contactaddresslines + PostBackConstants.VALUE + "\">"
- + StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getAddress().get(k).getAddressLine().get(k).getValue())
+ + (bd.getContacts().getContact().get(i).getAddress().get(k).getAddressLine().get(j).getValue()!=null ? StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getAddress().get(k).getAddressLine().get(j).getValue()):"")
+ "</div>"
+ "<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.keyname.optional") + ": </div>"
+ "<div class=\"edit\" id=\"" + PostBackConstants.CONTACT_PREFIX + contactid + PostBackConstants.ADDRESS + k + PostBackConstants.ADDRESSLINE + contactaddresslines + PostBackConstants.KEYNAME + "\">"
- + StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getAddress().get(k).getAddressLine().get(k).getKeyName())
+ + (bd.getContacts().getContact().get(i).getAddress().get(k).getAddressLine().get(j).getKeyName()!=null ? StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getAddress().get(k).getAddressLine().get(j).getKeyName()) : "")
+ "</div>"
+ "<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.keyvalue.optional") + ": </div>"
+ "<div class=\"edit\" id=\"" + PostBackConstants.CONTACT_PREFIX + contactid + PostBackConstants.ADDRESS + k + PostBackConstants.ADDRESSLINE + contactaddresslines + PostBackConstants.KEYVALUE + "\">"
- + StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getAddress().get(k).getAddressLine().get(k).getKeyValue())
+ + (bd.getContacts().getContact().get(i).getAddress().get(k).getAddressLine().get(j).getKeyValue()!=null ? StringEscapeUtils.escapeHtml(bd.getContacts().getContact().get(i).getAddress().get(k).getAddressLine().get(j).getKeyValue()) :"")
+ "</div>"
+ "</div>");
} //address line loop
@@ -391,11 +427,17 @@
+ "<i class=\"icon-list-alt icon-large\"></i>" + ResourceLoader.GetResource(session, "items.picker") + "</a>) "
+ "<a href=\"tmodelEditor.jsp?id=" + URLEncoder.encode(bd.getCategoryBag().getKeyedReference().get(i).getTModelKey(), "UTF8") + "\"><i class=\"icon-zoom-in icon-large\"></i></a>"
+ ": </div>"
- + "<div class=\"edit\" id=\"" + PostBackConstants.CATBAG_KEY_REF + i + PostBackConstants.VALUE + "\">" + StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReference().get(i).getTModelKey()) + "</div>");
+ + "<div class=\"edit\" id=\"" + PostBackConstants.CATBAG_KEY_REF + i + PostBackConstants.VALUE + "\">" +
+ (bd.getCategoryBag().getKeyedReference().get(i).getTModelKey()!=null?StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReference().get(i).getTModelKey()):"")
+ + "</div>");
out.write("<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.name") + ": </div>"
- + "<div class=\"edit\" id=\"" + PostBackConstants.CATBAG_KEY_REF + i + PostBackConstants.KEYNAME + "\">" + StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReference().get(i).getKeyName()) + "</div>");
+ + "<div class=\"edit\" id=\"" + PostBackConstants.CATBAG_KEY_REF + i + PostBackConstants.KEYNAME + "\">" +
+ (bd.getCategoryBag().getKeyedReference().get(i).getKeyName()!=null?StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReference().get(i).getKeyName()):"")
+ + "</div>");
out.write("<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.value") + ": </div>"
- + "<div class=\"edit\" id=\"" + PostBackConstants.CATBAG_KEY_REF + i + PostBackConstants.KEYVALUE + "\">" + StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReference().get(i).getKeyValue()) + "</div>");
+ + "<div class=\"edit\" id=\"" + PostBackConstants.CATBAG_KEY_REF + i + PostBackConstants.KEYVALUE + "\">" +
+ (bd.getCategoryBag().getKeyedReference().get(i).getKeyValue()!=null?StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReference().get(i).getKeyValue()) :"")
+ + "</div>");
out.write("</div>");
}
%>
@@ -429,11 +471,17 @@
out.write("<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.key") + " (<a href=\"javascript:tModelModal('" + PostBackConstants.CATBAG_KEY_REF_GRP + i + PostBackConstants.KEY_REF + k + PostBackConstants.VALUE + "')\" >" + "<i class=\"icon-list-alt icon-large\"></i>" + ResourceLoader.GetResource(session, "items.picker") + "</a>) "
+ "<a href=\"tmodelEditor.jsp?id=" + URLEncoder.encode(bd.getCategoryBag().getKeyedReferenceGroup().get(i).getKeyedReference().get(k).getTModelKey(), "UTF8") + "\"><i class=\"icon-zoom-in icon-large\"></i></a>"
+ ": </div>"
- + "<div class=\"edit\" id=\"" + PostBackConstants.CATBAG_KEY_REF_GRP + i + PostBackConstants.KEY_REF + k + PostBackConstants.VALUE + "\">" + StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReferenceGroup().get(i).getKeyedReference().get(k).getTModelKey()) + "</div>");
+ + "<div class=\"edit\" id=\"" + PostBackConstants.CATBAG_KEY_REF_GRP + i + PostBackConstants.KEY_REF + k + PostBackConstants.VALUE + "\">" +
+ (bd.getCategoryBag().getKeyedReferenceGroup().get(i).getKeyedReference().get(k).getTModelKey()!=null?StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReferenceGroup().get(i).getKeyedReference().get(k).getTModelKey()):"")
+ + "</div>");
out.write("<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.name") + ": </div>"
- + "<div class=\"edit\" id=\"" + PostBackConstants.CATBAG_KEY_REF_GRP + i + PostBackConstants.KEY_REF + k + PostBackConstants.KEYNAME + "\">" + StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReferenceGroup().get(i).getKeyedReference().get(k).getKeyName()) + "</div>");
+ + "<div class=\"edit\" id=\"" + PostBackConstants.CATBAG_KEY_REF_GRP + i + PostBackConstants.KEY_REF + k + PostBackConstants.KEYNAME + "\">" +
+ (bd.getCategoryBag().getKeyedReferenceGroup().get(i).getKeyedReference().get(k).getKeyName()!=null?StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReferenceGroup().get(i).getKeyedReference().get(k).getKeyName()):"")
+ + "</div>");
out.write("<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.value") + ": </div>"
- + "<div class=\"edit\" id=\"" + PostBackConstants.CATBAG_KEY_REF_GRP + i + PostBackConstants.KEY_REF + k + PostBackConstants.KEYVALUE + "\">" + StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReferenceGroup().get(i).getKeyedReference().get(k).getKeyValue()) + "</div>");
+ + "<div class=\"edit\" id=\"" + PostBackConstants.CATBAG_KEY_REF_GRP + i + PostBackConstants.KEY_REF + k + PostBackConstants.KEYVALUE + "\">" +
+ (bd.getCategoryBag().getKeyedReferenceGroup().get(i).getKeyedReference().get(k).getKeyValue()!=null?StringEscapeUtils.escapeHtml(bd.getCategoryBag().getKeyedReferenceGroup().get(i).getKeyedReference().get(k).getKeyValue()):"")
+ + "</div>");
out.write("</div>");
}
@@ -459,11 +507,18 @@
out.write("<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.key") + " (<a href=\"javascript:tModelModal('" + PostBackConstants.IDENT_KEY_REF + i + PostBackConstants.VALUE + "')\" >" + "<i class=\"icon-list-alt icon-large\"></i> " + ResourceLoader.GetResource(session, "items.picker") + "</a>) "
+ "<a href=\"tmodelEditor.jsp?id=" + URLEncoder.encode(bd.getIdentifierBag().getKeyedReference().get(i).getTModelKey(), "UTF8") + "\"><i class=\"icon-zoom-in icon-large\"></i></a>"
+ ": </div>"
- + "<div class=\"edit\" id=\"" + PostBackConstants.IDENT_KEY_REF + i + PostBackConstants.VALUE + "\">" + StringEscapeUtils.escapeHtml(bd.getIdentifierBag().getKeyedReference().get(i).getTModelKey()) + "</div>");
+ + "<div class=\"edit\" id=\"" + PostBackConstants.IDENT_KEY_REF + i + PostBackConstants.VALUE + "\">" +
+ (bd.getIdentifierBag().getKeyedReference().get(i).getTModelKey()!=null?
+ StringEscapeUtils.escapeHtml(bd.getIdentifierBag().getKeyedReference().get(i).getTModelKey()):"")
+ + "</div>");
out.write("<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.name") + ": </div>"
- + "<div class=\"edit\" id=\"" + PostBackConstants.IDENT_KEY_REF + i + PostBackConstants.KEYNAME + "\">" + StringEscapeUtils.escapeHtml(bd.getIdentifierBag().getKeyedReference().get(i).getKeyName()) + "</div>");
+ + "<div class=\"edit\" id=\"" + PostBackConstants.IDENT_KEY_REF + i + PostBackConstants.KEYNAME + "\">" +
+ (bd.getIdentifierBag().getKeyedReference().get(i).getKeyName()!=null?StringEscapeUtils.escapeHtml(bd.getIdentifierBag().getKeyedReference().get(i).getKeyName()) :"")
+ + "</div>");
out.write("<div style=\"float:left\">" + ResourceLoader.GetResource(session, "items.value") + ": </div>"
- + "<div class=\"edit\" id=\"" + PostBackConstants.IDENT_KEY_REF + i + PostBackConstants.KEYVALUE + "\">" + StringEscapeUtils.escapeHtml(bd.getIdentifierBag().getKeyedReference().get(i).getKeyValue()) + "</div>");
+ + "<div class=\"edit\" id=\"" + PostBackConstants.IDENT_KEY_REF + i + PostBackConstants.KEYVALUE + "\">" +
+ (bd.getIdentifierBag().getKeyedReference().get(i).getKeyValue()!=null?StringEscapeUtils.escapeHtml(bd.getIdentifierBag().getKeyedReference().get(i).getKeyValue()):"")
+ + "</div>");
out.write("</div>");
}
%>
@@ -495,12 +550,12 @@
%><tr>
<td><%
if (!bd.getBusinessServices().getBusinessService().get(i).getName().isEmpty()) {
- out.write(bd.getBusinessServices().getBusinessService().get(i).getName().get(0).getValue());
+ out.write(StringEscapeUtils.escapeHtml(bd.getBusinessServices().getBusinessService().get(i).getName().get(0).getValue()));
}
%>
- </td><td><a href="serviceEditor.jsp?id=<%=StringEscapeUtils.escapeHtml(bd.getBusinessServices().getBusinessService().get(i).getServiceKey())%>">
+ </td><td><a href="serviceEditor.jsp?id=<%=URLEncoder.encode(bd.getBusinessServices().getBusinessService().get(i).getServiceKey(),"UTF8")%>">
<%
- out.write(bd.getBusinessServices().getBusinessService().get(i).getServiceKey());
+ out.write(StringEscapeUtils.escapeHtml(bd.getBusinessServices().getBusinessService().get(i).getServiceKey()));
%>
<i class="icon-edit icon-large"></i></a>
</td><td>
Modified: juddi/trunk/juddi-gui/src/main/webapp/js/businessEditor.js
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-gui/src/main/webapp/js/businessEditor.js?rev=1569077&r1=1569076&r2=1569077&view=diff
==============================================================================
--- juddi/trunk/juddi-gui/src/main/webapp/js/businessEditor.js (original)
+++ juddi/trunk/juddi-gui/src/main/webapp/js/businessEditor.js Mon Feb 17 18:35:34 2014
@@ -143,7 +143,7 @@ function AddContact()
Reedit();
}
-var contactname=0;
+
function AddContactName(contactid)
{
$("<div id=\"contact" + contactid + "Name" + contactname + "\" style=\"border-width:1px; border-style:solid\" >"
@@ -158,7 +158,6 @@ function AddContactName(contactid)
contactname++;
}
-var contactemail=0;
function AddContactEmail(contactid)
{
$("<div id=\"contact" + contactid + "Email" + contactemail + "\" style=\"border-width:1px; border-style:solid\" >"
@@ -172,8 +171,6 @@ function AddContactEmail(contactid)
Reedit();
contactemail++;
}
-
-var contactdescription=0;
function AddContactDescription(contactid)
{
$("<div id=\"contact" + contactid + "Description" + contactdescription + "\" style=\"border-width:1px; border-style:solid\" >"
@@ -187,7 +184,7 @@ function AddContactDescription(contactid
Reedit();
contactdescription++;
}
-var contactphone=0;
+
function AddContactPhone(contactid)
{
$("<div id=\"contact" + contactid + "Phone" + contactphone + "\" style=\"border-width:1px; border-style:solid\" >"
@@ -202,7 +199,6 @@ function AddContactPhone(contactid)
contactphone++;
}
-var contactaddress=0;
function AddContactAddress(contactid)
{
$("<div id=\"contact" + contactid + "Address" + contactaddress + "\" style=\"border-width:1px; border-style:solid\" >"
@@ -225,9 +221,9 @@ function AddContactAddress(contactid)
contactaddress++;
}
-var contactaddresslines=0;
function AddContactAddressLine(contactid)
{
+ contactaddresslines++;
$("<div id=\"contact" + contactid + "addressLine" +contactaddresslines +
"\" style=\"border-width:1px; border-style:solid\" >"
@@ -242,7 +238,7 @@ function AddContactAddressLine(contactid
+"</div>").appendTo("#contact" + contactid);
Reedit();
- contactaddress++;
+
}
@@ -344,8 +340,6 @@ function AddISO3166UNSPSC(){
}
-
-var currentcatkeyrefgrpitems=0;
function AddCategoryKeyReferenceGroupKeyRef(div)
{
var i=currentcatkeyrefgrp;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@juddi.apache.org
For additional commands, e-mail: commits-help@juddi.apache.org