[wise-commits] wise SVN: r569 - in webgui/trunk/src/main: webapp and 1 other directory.

wise-commits at lists.jboss.org wise-commits at lists.jboss.org
Wed Jul 3 03:57:37 EDT 2013


Author: alessio.soldano at jboss.com
Date: 2013-07-03 03:57:36 -0400 (Wed, 03 Jul 2013)
New Revision: 569

Modified:
   webgui/trunk/src/main/java/org/jboss/wise/gui/ClientConversationBean.java
   webgui/trunk/src/main/java/org/jboss/wise/gui/ClientHelper.java
   webgui/trunk/src/main/webapp/step2.xhtml
   webgui/trunk/src/main/webapp/step3.xhtml
Log:
[WSIE-203] Further improvements


Modified: webgui/trunk/src/main/java/org/jboss/wise/gui/ClientConversationBean.java
===================================================================
--- webgui/trunk/src/main/java/org/jboss/wise/gui/ClientConversationBean.java	2013-07-02 14:31:07 UTC (rev 568)
+++ webgui/trunk/src/main/java/org/jboss/wise/gui/ClientConversationBean.java	2013-07-03 07:57:36 UTC (rev 569)
@@ -119,6 +119,7 @@
 	responseMessage = null;
 	error = null;
 	try {
+	    currentOperationFullName = ClientHelper.getOperationFullName(currentOperation, services);
 	    inputTree = ClientHelper.convertOperationParametersToGui(ClientHelper.getWSMethod(currentOperation, client), client);
 	} catch (Exception e) {
 	    error = ClientHelper.toErrorMessage(e);
@@ -335,7 +336,6 @@
 
     public void setCurrentOperation(String currentOperation) {
         this.currentOperation = currentOperation;
-        this.currentOperationFullName = ClientHelper.getOperationFullName(currentOperation, services);
     }
 
     public UITree getInTree() {

Modified: webgui/trunk/src/main/java/org/jboss/wise/gui/ClientHelper.java
===================================================================
--- webgui/trunk/src/main/java/org/jboss/wise/gui/ClientHelper.java	2013-07-02 14:31:07 UTC (rev 568)
+++ webgui/trunk/src/main/java/org/jboss/wise/gui/ClientHelper.java	2013-07-03 07:57:36 UTC (rev 569)
@@ -137,27 +137,23 @@
     }
     
     public static String getFirstGuiOperation(List<Service> services) {
-	if (services == null || services.isEmpty()) {
+	if (services == null) {
 	    return null;
 	}
-	Service s = services.iterator().next();
-	List<Port> ports = s.getPorts();
-	if (ports == null || ports.isEmpty()) {
-	    return null;
+	for (Service s : services) {
+	    for (Port p : s.getPorts()) {
+		for (Operation o : p.getOperations()) {
+		    StringBuilder sb = new StringBuilder();
+		    sb.append(s.getName());
+		    sb.append(";");
+		    sb.append(p.getName());
+		    sb.append(";");
+		    sb.append(o.getName());
+		    return sb.toString();
+		}
+	    }
 	}
-	Port p = ports.iterator().next();
-	List<Operation> operations = p.getOperations();
-	if (operations == null || operations.isEmpty()) {
-	    return null;
-	}
-	Operation o = operations.iterator().next();
-	StringBuilder sb = new StringBuilder();
-	sb.append(s.getName());
-	sb.append(";");
-	sb.append(p.getName());
-	sb.append(";");
-	sb.append(o.getName());
-	return sb.toString();
+	return null;
     }
     
     public static String getOperationFullName(String currentGuiOperation, List<Service> services) {

Modified: webgui/trunk/src/main/webapp/step2.xhtml
===================================================================
--- webgui/trunk/src/main/webapp/step2.xhtml	2013-07-02 14:31:07 UTC (rev 568)
+++ webgui/trunk/src/main/webapp/step2.xhtml	2013-07-03 07:57:36 UTC (rev 569)
@@ -25,11 +25,14 @@
                 </c:forEach>
             </rich:panelMenu>
         </rich:panel>
+        <rich:panel header="Error" rendered="#{not empty clientConversationBean.error}">
+            <h:outputText value="#{clientConversationBean.error}" />
+        </rich:panel>
         <div class="navPanel" style="width: 100%;">
             <a4j:commandButton value="&lt;&lt; Back" style="float:left">
                 <rich:toggleControl targetItem="@prev" event="click" />
             </a4j:commandButton>
-            <a4j:commandButton value="Select &gt;&gt;" style="float:right" rendered="#{not empty clientConversationBean.currentOperation}">
+            <a4j:commandButton value="Select &gt;&gt;" style="float:right" rendered="#{empty clientConversationBean.error}">
                 <rich:toggleControl targetItem="@next" event="click" />
             </a4j:commandButton>
         </div>

Modified: webgui/trunk/src/main/webapp/step3.xhtml
===================================================================
--- webgui/trunk/src/main/webapp/step3.xhtml	2013-07-02 14:31:07 UTC (rev 568)
+++ webgui/trunk/src/main/webapp/step3.xhtml	2013-07-03 07:57:36 UTC (rev 569)
@@ -160,14 +160,17 @@
         </a4j:outputPanel>
         
         </rich:panel>
+        <rich:panel header="Error" rendered="#{not empty clientConversationBean.error}">
+            <h:outputText value="#{clientConversationBean.error}" />
+        </rich:panel>
         <div class="navPanel" style="width: 100%;">
             <a4j:commandButton value="&lt;&lt; Back" style="float:left">
                 <rich:toggleControl targetItem="@prev" event="click" />
             </a4j:commandButton>
-            <a4j:commandButton value="Invoke &gt;&gt;" style="float:right">
+            <a4j:commandButton value="Invoke &gt;&gt;" style="float:right" rendered="#{empty clientConversationBean.error}">
                 <rich:toggleControl targetItem="@next" event="click" />
             </a4j:commandButton>
-            <a4j:commandButton value="Preview message" render="popupPreview" action="#{clientConversationBean.generateRequestPreview}" style="float:right"
+            <a4j:commandButton value="Preview message" render="popupPreview" rendered="#{empty clientConversationBean.error}" action="#{clientConversationBean.generateRequestPreview}" style="float:right"
                 id="previewButton" oncomplete="#{rich:component('popupPreview')}.show();">
             </a4j:commandButton>
         </div>



More information about the wise-commits mailing list