wise SVN: r487 - in webgui: branches and 1 other directory.
by wise-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-02-04 17:40:41 -0500 (Mon, 04 Feb 2013)
New Revision: 487
Added:
webgui/branches/fdg/
Removed:
webgui/trunk/
Log:
Moving current "dead" trunk into fdg branch
12 years, 1 month
wise SVN: r486 - in webgui/branches/cdi-jsf/src/main: webapp and 1 other directories.
by wise-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-02-02 05:00:03 -0500 (Sat, 02 Feb 2013)
New Revision: 486
Modified:
webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/ClientConversationBean.java
webgui/branches/cdi-jsf/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
webgui/branches/cdi-jsf/src/main/webapp/index.xhtml
Log:
Initial support for BASIC auth
Modified: webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/ClientConversationBean.java
===================================================================
--- webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/ClientConversationBean.java 2013-02-02 09:06:03 UTC (rev 485)
+++ webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/ClientConversationBean.java 2013-02-02 10:00:03 UTC (rev 486)
@@ -42,6 +42,7 @@
import org.jboss.wise.core.client.WSMethod;
import org.jboss.wise.core.client.WSService;
import org.jboss.wise.core.client.WebParameter;
+import org.jboss.wise.core.client.builder.WSDynamicClientBuilder;
import org.jboss.wise.core.client.impl.reflection.builder.ReflectionBasedWSDynamicClientBuilder;
import org.jboss.wise.core.exception.InvocationException;
import org.jboss.wise.core.exception.WiseRuntimeException;
@@ -68,6 +69,8 @@
@Inject Conversation conversation;
private WSDynamicClient client;
private String wsdlUrl;
+ private String wsdlUser;
+ private String wsdlPwd;
private List<Service> services;
private String currentOperation;
private TreeNodeImpl inputTree;
@@ -88,7 +91,14 @@
conversation.end();
conversation.begin();
try {
- client = new ReflectionBasedWSDynamicClientBuilder().verbose(true).messageStream(ps).keepSource(true).maxThreadPoolSize(1).wsdlURL(getWsdlUrl()).build();
+ WSDynamicClientBuilder builder = new ReflectionBasedWSDynamicClientBuilder().verbose(true).messageStream(ps).keepSource(true).maxThreadPoolSize(1);
+ if (wsdlUser != null && wsdlUser.length() > 0) {
+ builder.userName(wsdlUser);
+ }
+ if (wsdlPwd != null && wsdlPwd.length() > 0) {
+ builder.password(wsdlPwd);
+ }
+ client = builder.wsdlURL(getWsdlUrl()).build();
cleanupTask.addRef(client, System.currentTimeMillis() + CONVERSATION_TIMEOUT, new CleanupTask.CleanupCallback<WSDynamicClient>() {
@Override
public void cleanup(WSDynamicClient data) {
@@ -286,6 +296,22 @@
this.wsdlUrl = wsdlUrl;
}
+ public String getWsdlUser() {
+ return wsdlUser;
+ }
+
+ public void setWsdlUser(String wsdlUser) {
+ this.wsdlUser = wsdlUser;
+ }
+
+ public String getWsdlPwd() {
+ return wsdlPwd;
+ }
+
+ public void setWsdlPwd(String wsdlPwd) {
+ this.wsdlPwd = wsdlPwd;
+ }
+
public List<Service> getServices() {
return services;
}
Modified: webgui/branches/cdi-jsf/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
===================================================================
--- webgui/branches/cdi-jsf/src/main/webapp/WEB-INF/jboss-deployment-structure.xml 2013-02-02 09:06:03 UTC (rev 485)
+++ webgui/branches/cdi-jsf/src/main/webapp/WEB-INF/jboss-deployment-structure.xml 2013-02-02 10:00:03 UTC (rev 486)
@@ -2,6 +2,8 @@
<deployment>
<dependencies>
<module name="org.jboss.ws.cxf.jbossws-cxf-client" services="true" export="true"/>
+ <module name="org.jboss.ws.common"/>
+ <module name="org.jboss.common-core"/>
<module name="org.apache.cxf.impl"/> <!-- TODO replace this and previous dependency with commented one below when removing explicit dep on wise-core-cxf -->
<!-- <module name="org.jboss.ws.jaxws-client" services="true" export="true"/> -->
</dependencies>
Modified: webgui/branches/cdi-jsf/src/main/webapp/index.xhtml
===================================================================
--- webgui/branches/cdi-jsf/src/main/webapp/index.xhtml 2013-02-02 09:06:03 UTC (rev 485)
+++ webgui/branches/cdi-jsf/src/main/webapp/index.xhtml 2013-02-02 10:00:03 UTC (rev 486)
@@ -23,6 +23,10 @@
<h:form id="wsdlSelection">
<h:outputLabel value="URL:" for="wsdlUrlInput"/>
<h:inputText id="wsdlUrlInput" value="#{clientConversationBean.wsdlUrl}" onclick="document.getElementById('wsdlSelection:okButton').disabled=false" />
+ <h:outputLabel value="User:" for="wsdlUser"/>
+ <h:inputText id="wsdlUser" value="#{clientConversationBean.wsdlUser}" onclick="document.getElementById('wsdlSelection:okButton').disabled=false" />
+ <h:outputLabel value="Password:" for="wsdlPwd"/>
+ <h:inputSecret id="wsdlPwd" value="#{clientConversationBean.wsdlPwd}" onclick="document.getElementById('wsdlSelection:okButton').disabled=false" />
<a4j:commandButton id="okButton" value="OK" render="epSelection" action="#{clientConversationBean.readWsdl}" onclick="this.disabled=true" status="wsdlParseStatus" />
</h:form>
</rich:panel>
12 years, 1 month
wise SVN: r485 - webgui/branches/cdi-jsf.
by wise-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-02-02 04:06:03 -0500 (Sat, 02 Feb 2013)
New Revision: 485
Modified:
webgui/branches/cdi-jsf/pom.xml
Log:
Moving to RichFaces 4.3.0.Final
Modified: webgui/branches/cdi-jsf/pom.xml
===================================================================
--- webgui/branches/cdi-jsf/pom.xml 2013-02-01 23:47:12 UTC (rev 484)
+++ webgui/branches/cdi-jsf/pom.xml 2013-02-02 09:06:03 UTC (rev 485)
@@ -39,7 +39,7 @@
<version.org.jboss.as.plugins.maven.plugin>7.3.Final</version.org.jboss.as.plugins.maven.plugin>
<version.org.jboss.spec.jboss.javaee.6.0>3.0.0.Final</version.org.jboss.spec.jboss.javaee.6.0>
- <version.org.richfaces>4.3.0.CR2</version.org.richfaces> <!-- 4.3.0 required due to https://issues.jboss.org/browse/RF-12442 -->
+ <version.org.richfaces>4.3.0.Final</version.org.richfaces>
<version.wise.core>2.0.0-SNAPSHOT</version.wise.core>
<!-- other plugin versions -->
12 years, 1 month
wise SVN: r484 - webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement.
by wise-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-02-01 18:47:12 -0500 (Fri, 01 Feb 2013)
New Revision: 484
Modified:
webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/ComplexWiseTreeElement.java
Log:
Modified: webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/ComplexWiseTreeElement.java
===================================================================
--- webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/ComplexWiseTreeElement.java 2013-02-01 23:45:18 UTC (rev 483)
+++ webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/ComplexWiseTreeElement.java 2013-02-01 23:47:12 UTC (rev 484)
@@ -107,9 +107,6 @@
}
method.invoke(obj, childObject);
-// // TODO!!! Remove the following check once we're confident
-// method = cl.getMethod(getter, (Class[]) null);
-// Logger.getLogger(this.getClass()).info("[FIXME: remove check] risultato getter " + getter + ": " + method.invoke(obj, (Object[]) null));
}
}
} catch (Exception e) {
12 years, 1 month
wise SVN: r483 - in webgui/branches/cdi-jsf: src/main/java/org/jboss/wise/gui and 1 other directories.
by wise-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-02-01 18:45:18 -0500 (Fri, 01 Feb 2013)
New Revision: 483
Modified:
webgui/branches/cdi-jsf/pom.xml
webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/CleanupHelper.java
webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/ClientConversationBean.java
webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/ComplexWiseTreeElement.java
webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/EnumerationWiseTreeElement.java
webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/ParameterizedWiseTreeElement.java
webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/SimpleWiseTreeElement.java
webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/WiseTreeElementBuilder.java
Log:
Fixing logging, slimming down dependencies a bit and solving a potential concurrency issue with creation of client builder
Modified: webgui/branches/cdi-jsf/pom.xml
===================================================================
--- webgui/branches/cdi-jsf/pom.xml 2013-02-01 23:42:03 UTC (rev 482)
+++ webgui/branches/cdi-jsf/pom.xml 2013-02-01 23:45:18 UTC (rev 483)
@@ -104,6 +104,38 @@
<groupId>wsdl4j</groupId>
<artifactId>wsdl4j</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.freemarker</groupId>
+ <artifactId>freemarker</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.milyn</groupId>
+ <artifactId>milyn-smooks-javabean</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.milyn</groupId>
+ <artifactId>milyn-smooks-validation</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.thoughtworks.xstream</groupId>
+ <artifactId>xstream</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.mvel</groupId>
+ <artifactId>mvel2</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>dtdparser</groupId>
+ <artifactId>dtdparser</artifactId>
+ </exclusion>
</exclusions>
</dependency>
Modified: webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/CleanupHelper.java
===================================================================
--- webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/CleanupHelper.java 2013-02-01 23:42:03 UTC (rev 482)
+++ webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/CleanupHelper.java 2013-02-01 23:45:18 UTC (rev 483)
@@ -24,6 +24,8 @@
import javax.ejb.Singleton;
import javax.ejb.Startup;
+import org.jboss.logging.Logger;
+
@Singleton
@Startup
public class CleanupHelper {
@@ -32,6 +34,7 @@
@Schedule(minute = "*/3", hour = "*", persistent = false) //every 3 minutes
public void foo() {
+ Logger.getLogger(CleanupHelper.class).debug("Periodic cleanup...");
synchronized (tasks) {
for (CleanupTask<?> task : tasks) {
task.refsCleanup();
Modified: webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/ClientConversationBean.java
===================================================================
--- webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/ClientConversationBean.java 2013-02-01 23:42:03 UTC (rev 482)
+++ webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/ClientConversationBean.java 2013-02-01 23:45:18 UTC (rev 483)
@@ -16,6 +16,7 @@
*/
package org.jboss.wise.gui;
+import java.io.PrintStream;
import java.io.Serializable;
import java.lang.reflect.Type;
import java.util.Collection;
@@ -34,16 +35,17 @@
import javax.inject.Named;
import javax.jws.soap.SOAPBinding;
+import org.jboss.logging.Logger;
import org.jboss.wise.core.client.InvocationResult;
import org.jboss.wise.core.client.WSDynamicClient;
import org.jboss.wise.core.client.WSEndpoint;
import org.jboss.wise.core.client.WSMethod;
import org.jboss.wise.core.client.WSService;
import org.jboss.wise.core.client.WebParameter;
-import org.jboss.wise.core.client.builder.WSDynamicClientBuilder;
-import org.jboss.wise.core.client.factories.WSDynamicClientFactory;
+import org.jboss.wise.core.client.impl.reflection.builder.ReflectionBasedWSDynamicClientBuilder;
import org.jboss.wise.core.exception.InvocationException;
import org.jboss.wise.core.exception.WiseRuntimeException;
+import org.jboss.wise.core.utils.JBossLoggingOutputStream;
import org.jboss.wise.gui.treeElement.GroupWiseTreeElement;
import org.jboss.wise.gui.treeElement.LazyLoadWiseTreeElement;
import org.jboss.wise.gui.treeElement.WiseTreeElement;
@@ -57,10 +59,11 @@
public class ClientConversationBean implements Serializable {
private static final long serialVersionUID = 1L;
-
+
private static final int CONVERSATION_TIMEOUT = 15 * 60 * 1000; //15 mins instead of default 30 mins
- private static WSDynamicClientBuilder clientBuilder;
private static CleanupTask<WSDynamicClient> cleanupTask = new CleanupTask<WSDynamicClient>(true);
+ private static Logger logger = Logger.getLogger(ClientConversationBean.class);
+ private static PrintStream ps = new PrintStream(new JBossLoggingOutputStream(logger, Logger.Level.DEBUG), true);
@Inject Conversation conversation;
private WSDynamicClient client;
@@ -85,7 +88,7 @@
conversation.end();
conversation.begin();
try {
- client = getClientBuilder().verbose(true).keepSource(true).wsdlURL(getWsdlUrl()).maxThreadPoolSize(1).build();
+ client = new ReflectionBasedWSDynamicClientBuilder().verbose(true).messageStream(ps).keepSource(true).maxThreadPoolSize(1).wsdlURL(getWsdlUrl()).build();
cleanupTask.addRef(client, System.currentTimeMillis() + CONVERSATION_TIMEOUT, new CleanupTask.CleanupCallback<WSDynamicClient>() {
@Override
public void cleanup(WSDynamicClient data) {
@@ -331,13 +334,6 @@
this.error = error;
}
- private static synchronized WSDynamicClientBuilder getClientBuilder() {
- if (clientBuilder == null) {
- clientBuilder = WSDynamicClientFactory.getJAXWSClientBuilder();
- }
- return clientBuilder;
- }
-
private static String toErrorMessage(Exception e) {
StringBuilder sb = new StringBuilder();
if (e instanceof WiseRuntimeException) {
@@ -354,6 +350,6 @@
}
private static void logException(Exception e) {
- e.printStackTrace(); //TODO!!
+ logger.error("", e);
}
}
Modified: webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/ComplexWiseTreeElement.java
===================================================================
--- webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/ComplexWiseTreeElement.java 2013-02-01 23:42:03 UTC (rev 482)
+++ webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/ComplexWiseTreeElement.java 2013-02-01 23:45:18 UTC (rev 483)
@@ -26,7 +26,6 @@
import javax.xml.datatype.Duration;
import javax.xml.datatype.XMLGregorianCalendar;
-import org.jboss.logging.Logger;
import org.jboss.wise.core.exception.WiseRuntimeException;
import org.jboss.wise.core.utils.IDGenerator;
import org.jboss.wise.core.utils.ReflectionUtils;
@@ -84,15 +83,12 @@
String setter = ReflectionUtils.setterMethodName(child.getName(), child.isTypeBoolean());
String getter = ReflectionUtils.getterMethodName(child.getName(), child.isTypeBoolean());
- Logger.getLogger(this.getClass()).debug("Setter: " + setter);
Method method;
if (child instanceof GroupWiseTreeElement) {
- Logger.getLogger(this.getClass()).debug("Child is a group...");
method = cl.getMethod(getter, (Class[]) null);
Collection<?> col = (Collection<?>) method.invoke(obj, (Object[]) null);
col.addAll((List) child.toObject());
} else {
- Logger.getLogger(this.getClass()).debug("Child is not a group...");
Object childObject = child.toObject();
if (child instanceof ParameterizedWiseTreeElement) {
method = cl.getMethod(setter, (Class<?>) ((ParameterizedType) child.getClassType()).getRawType());
@@ -111,9 +107,9 @@
}
method.invoke(obj, childObject);
- // TODO!!! Remove the following check once we're confident
- method = cl.getMethod(getter, (Class[]) null);
- Logger.getLogger(this.getClass()).debug("[FIXME: remove check] risultato getter " + getter + ": " + method.invoke(obj, (Object[]) null));
+// // TODO!!! Remove the following check once we're confident
+// method = cl.getMethod(getter, (Class[]) null);
+// Logger.getLogger(this.getClass()).info("[FIXME: remove check] risultato getter " + getter + ": " + method.invoke(obj, (Object[]) null));
}
}
} catch (Exception e) {
Modified: webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/EnumerationWiseTreeElement.java
===================================================================
--- webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/EnumerationWiseTreeElement.java 2013-02-01 23:42:03 UTC (rev 482)
+++ webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/EnumerationWiseTreeElement.java 2013-02-01 23:45:18 UTC (rev 483)
@@ -86,7 +86,6 @@
public Map<String, String> getValidValue() {
HashMap<String, String> returnMap = new HashMap<String, String>();
for (Object obj : ((Class<?>) classType).getEnumConstants()) {
- System.out.print("class:" + obj.getClass());
String valueOfEnum;
try {
Method method = obj.getClass().getMethod("value");
@@ -108,8 +107,6 @@
}
Method method = cl.getMethod("fromValue", String.class);
Object obj = method.invoke(null, value);
- System.out.print("returning:" + obj);
- System.out.print("returning:" + obj.getClass());
return obj;
} catch (Exception e) {
throw new WiseRuntimeException("Type format error", e);
Modified: webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/ParameterizedWiseTreeElement.java
===================================================================
--- webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/ParameterizedWiseTreeElement.java 2013-02-01 23:42:03 UTC (rev 482)
+++ webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/ParameterizedWiseTreeElement.java 2013-02-01 23:45:18 UTC (rev 483)
@@ -25,7 +25,6 @@
import javax.xml.bind.annotation.XmlElementDecl;
import javax.xml.ws.Holder;
-import org.jboss.logging.Logger;
import org.jboss.wise.core.client.WSDynamicClient;
import org.jboss.wise.core.exception.WiseRuntimeException;
import org.jboss.wise.core.utils.IDGenerator;
@@ -129,7 +128,6 @@
}
if (methodToUse != null) {
Object obj = objectFactoryClass.newInstance();
- Logger.getLogger(this.getClass()).debug(methodToUse + " with value=" + value);
return methodToUse.invoke(obj, new Object[] { value });
} else {
return null;
Modified: webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/SimpleWiseTreeElement.java
===================================================================
--- webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/SimpleWiseTreeElement.java 2013-02-01 23:42:03 UTC (rev 482)
+++ webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/SimpleWiseTreeElement.java 2013-02-01 23:45:18 UTC (rev 483)
@@ -21,7 +21,6 @@
import java.math.BigInteger;
import java.net.URLEncoder;
-import org.jboss.logging.Logger;
import org.jboss.wise.core.exception.WiseRuntimeException;
import org.jboss.wise.core.utils.IDGenerator;
import org.jboss.wise.core.utils.JavaUtils;
@@ -187,7 +186,6 @@
Class<?> cl = (Class<?>) classType;
if (cl.isPrimitive()) {
cl = JavaUtils.getWrapperType(cl);
- Logger.getLogger(this.getClass()).debug("Wrapper class assigned: " + cl);
}
if ("java.lang.String".equalsIgnoreCase(cl.getName())) {
return new String(value);
Modified: webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/WiseTreeElementBuilder.java
===================================================================
--- webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/WiseTreeElementBuilder.java 2013-02-01 23:42:03 UTC (rev 482)
+++ webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/WiseTreeElementBuilder.java 2013-02-01 23:45:18 UTC (rev 483)
@@ -46,12 +46,16 @@
*/
public class WiseTreeElementBuilder {
- private WSDynamicClient client;
- private boolean request;
+ private static Logger logger = Logger.getLogger(WiseTreeElementBuilder.class);
+ private final WSDynamicClient client;
+ private final boolean request;
+ private final boolean trace;
+
public WiseTreeElementBuilder(WSDynamicClient client, boolean request) {
this.client = client;
this.request = request;
+ this.trace = logger.isTraceEnabled();
}
public WiseTreeElement buildTreeFromType(Type type, String name, Object value, boolean nillable) {
@@ -66,14 +70,11 @@
String namespace,
Map<Type, WiseTreeElement> typeMap,
Set<Type> stack) {
- Logger.getLogger(this.getClass()).debug("=> Converting parameter '" + name + "', type '" + type + "'");
+ if (trace) logger.trace("=> Converting parameter '" + name + "', type '" + type + "'");
if (type instanceof ParameterizedType) {
- Logger.getLogger(this.getClass()).debug("Parameterized type...");
ParameterizedType pt = (ParameterizedType) type;
return this.buildParameterizedType(pt, name, obj, scope, namespace, typeMap, stack);
} else {
- Logger.getLogger(this.getClass()).debug("Not a parameterized type... casting to Class");
-
return this.buildFromClass((Class<?>) type, name, obj, nillable, typeMap, stack);
}
@@ -123,6 +124,7 @@
Set<Type> stack) {
if (cl.isArray()) {
+ if (trace) logger.trace("* array, component type: " + cl.getComponentType());
if (byte.class.equals(cl.getComponentType())) {
ByteArrayWiseTreeElement element = new ByteArrayWiseTreeElement(cl, name, null);
if (obj != null) {
@@ -130,13 +132,11 @@
}
return element;
}
- Logger.getLogger(this.getClass()).debug("* array");
- Logger.getLogger(this.getClass()).debug("Component type: " + cl.getComponentType());
throw new WiseRuntimeException("Converter doesn't support this Object[] yet.");
}
if (isSimpleType(cl, client)) {
- Logger.getLogger(this.getClass()).debug("* simple");
+ if (trace) logger.trace("* simple");
SimpleWiseTreeElement element = SimpleWiseTreeElementFactory.create(cl, name, obj);
if (!nillable) {
element.enforceNotNillable();
@@ -144,11 +144,11 @@
return element;
} else { // complex
if (request && stack.contains(cl)) {
- Logger.getLogger(this.getClass()).debug("* lazy");
+ if (trace) logger.trace("* lazy");
return new LazyLoadWiseTreeElement(cl, name, typeMap);
}
- Logger.getLogger(this.getClass()).debug("* complex");
+ if (trace) logger.trace("* complex");
ComplexWiseTreeElement complex = new ComplexWiseTreeElement(cl, name);
if (request) {
12 years, 1 month
wise SVN: r482 - in core/trunk: core and 1 other directories.
by wise-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-02-01 18:42:03 -0500 (Fri, 01 Feb 2013)
New Revision: 482
Added:
core/trunk/core/src/main/java/org/jboss/wise/core/utils/JBossLoggingOutputStream.java
Modified:
core/trunk/core/pom.xml
core/trunk/pom.xml
Log:
Sorting dependencies a bit and adding JBoss Logging flavor of Logging Output Stream
Modified: core/trunk/core/pom.xml
===================================================================
--- core/trunk/core/pom.xml 2013-02-01 18:48:53 UTC (rev 481)
+++ core/trunk/core/pom.xml 2013-02-01 23:42:03 UTC (rev 482)
@@ -50,11 +50,21 @@
</dependency>
<dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-common-core</artifactId>
</dependency>
<dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>org.jboss.ws</groupId>
<artifactId>jbossws-common</artifactId>
</dependency>
Added: core/trunk/core/src/main/java/org/jboss/wise/core/utils/JBossLoggingOutputStream.java
===================================================================
--- core/trunk/core/src/main/java/org/jboss/wise/core/utils/JBossLoggingOutputStream.java (rev 0)
+++ core/trunk/core/src/main/java/org/jboss/wise/core/utils/JBossLoggingOutputStream.java 2013-02-01 23:42:03 UTC (rev 482)
@@ -0,0 +1,88 @@
+package org.jboss.wise.core.utils;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+import org.jboss.logging.Logger;
+import org.jboss.logging.Logger.Level;
+
+public class JBossLoggingOutputStream extends OutputStream {
+
+ public static final int DEFAULT_BUFFER_LENGTH = 2048;
+
+ protected boolean hasBeenClosed = false;
+ protected byte[] buf;
+ protected int count;
+ private int bufLength;
+ protected Logger logger;
+ protected Level level;
+
+ public JBossLoggingOutputStream(Logger log, Level level) throws IllegalArgumentException {
+ if (log == null) {
+ throw new IllegalArgumentException("Null category!");
+ }
+ if (level == null) {
+ throw new IllegalArgumentException("Null priority!");
+ }
+ this.level = level;
+ logger = log;
+ bufLength = DEFAULT_BUFFER_LENGTH;
+ buf = new byte[DEFAULT_BUFFER_LENGTH];
+ count = 0;
+ }
+
+ public void close() {
+ flush();
+ hasBeenClosed = true;
+ }
+
+ public void write(final int b) throws IOException {
+ if (hasBeenClosed) {
+ throw new IOException("The stream has been closed.");
+ }
+ // would this be writing past the buffer?
+ if (count == bufLength) {
+ // grow the buffer
+ final int newBufLength = bufLength + DEFAULT_BUFFER_LENGTH;
+ final byte[] newBuf = new byte[newBufLength];
+ System.arraycopy(buf, 0, newBuf, 0, bufLength);
+ buf = newBuf;
+ bufLength = newBufLength;
+ }
+ buf[count] = (byte) b;
+ count++;
+ }
+
+ public void flush() {
+ if (count == 0) {
+ return;
+ }
+ // don't print out blank lines; flushing from PrintStream puts
+ // out these
+ // For linux system
+ if (count == 1 && ((char) buf[0]) == '\n') {
+ reset();
+ return;
+ }
+ // For mac system
+ if (count == 1 && ((char) buf[0]) == '\r') {
+ reset();
+ return;
+ }
+ // On windows system
+ if (count == 2 && (char) buf[0] == '\r' && (char) buf[1] == '\n') {
+ reset();
+ return;
+ }
+ final byte[] theBytes = new byte[count];
+ System.arraycopy(buf, 0, theBytes, 0, count);
+ logger.log(level, new String(theBytes));
+ reset();
+ }
+
+ private void reset() {
+ // not resetting the buffer -- assuming that if it grew then it
+ // will likely grow similarly again
+ count = 0;
+ }
+}
Modified: core/trunk/pom.xml
===================================================================
--- core/trunk/pom.xml 2013-02-01 18:48:53 UTC (rev 481)
+++ core/trunk/pom.xml 2013-02-01 23:42:03 UTC (rev 482)
@@ -121,13 +121,32 @@
<version>1.4</version>
</dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.1</version>
+ </dependency>
+
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-common-core</artifactId>
<version>2.2.17.GA</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-spi</artifactId>
+ </exclusion>
+ </exclusions>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging</artifactId>
+ <version>3.1.0.GA</version>
+ <scope>provided</scope>
+ </dependency>
+
<dependency>
<groupId>org.jboss.ws</groupId>
<artifactId>jbossws-common</artifactId>
12 years, 1 month
wise SVN: r481 - webgui/branches/cdi-jsf/src/main/webapp.
by wise-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-02-01 13:48:53 -0500 (Fri, 01 Feb 2013)
New Revision: 481
Modified:
webgui/branches/cdi-jsf/src/main/webapp/index.xhtml
Log:
Minor cleanup
Modified: webgui/branches/cdi-jsf/src/main/webapp/index.xhtml
===================================================================
--- webgui/branches/cdi-jsf/src/main/webapp/index.xhtml 2013-02-01 18:02:05 UTC (rev 480)
+++ webgui/branches/cdi-jsf/src/main/webapp/index.xhtml 2013-02-01 18:48:53 UTC (rev 481)
@@ -188,36 +188,26 @@
<h:outputText value="#{node.type} : #{node.name} = #{node.shortValue}"
rendered="#{node.notNil}" />
<h:outputText value="#{node.type} : #{node.name} = ***NIL***" rendered="#{node.nil}" />
-<!-- <h:graphicImage styleClass="plus" value="images/small/ZoomIn.png" rendered="#{node.notNil}"
- onclick="pippo = '#{node.longValue}'; document.getElementById('detailForm:detailArea').value = decode64(unescape(pippo)); showObj('detailDiv');" /> -->
</rich:treeNode>
<rich:treeNode type="qname">
<h:outputText value="#{node.type} : #{node.name} = #{node.shortValue}"
rendered="#{node.notNil}" />
<h:outputText value="#{node.type} : #{node.name} = ***NIL***" rendered="#{node.nil}" />
-<!-- <h:graphicImage styleClass="plus" value="images/small/ZoomIn.png" rendered="#{node.notNil}"
- onclick="pippo = '#{node.longValue}'; document.getElementById('detailForm:detailArea').value = decode64(unescape(pippo)); showObj('detailDiv');" /> -->
</rich:treeNode>
<rich:treeNode type="Duration">
<h:outputText value="#{node.type} : #{node.name} = #{node.shortValue}"
rendered="#{node.notNil}" />
<h:outputText value="#{node.type} : #{node.name} = ***NIL***" rendered="#{node.nil}" />
-<!-- <h:graphicImage styleClass="plus" value="images/small/ZoomIn.png" rendered="#{node.notNil}"
- onclick="pippo = '#{node.longValue}'; document.getElementById('detailForm:detailArea').value = decode64(unescape(pippo)); showObj('detailDiv');" /> -->
</rich:treeNode>
<rich:treeNode type="XMLGregorianCalendar">
<h:outputText value="#{node.type} : #{node.name} = #{node.shortValue}"
rendered="#{node.notNil}" />
<h:outputText value="#{node.type} : #{node.name} = ***NIL***" rendered="#{node.nil}" />
-<!-- <h:graphicImage styleClass="plus" value="images/small/ZoomIn.png" rendered="#{node.notNil}"
- onclick="pippo = '#{node.longValue}'; document.getElementById('detailForm:detailArea').value = decode64(unescape(pippo)); showObj('detailDiv');" /> -->
</rich:treeNode>
<rich:treeNode type="Enumeration">
<h:outputText value="#{node.type} : #{node.name} = #{node.shortValue}"
rendered="#{node.notNil}" />
<h:outputText value="#{node.type} : #{node.name} = ***NIL***" rendered="#{node.nil}" />
-<!-- <h:graphicImage styleClass="plus" value="images/small/ZoomIn.png" rendered="#{node.notNil}"
- onclick="pippo = '#{node.longValue}'; document.getElementById('detailForm:detailArea').value = decode64(unescape(pippo)); showObj('detailDiv');" /> -->
</rich:treeNode>
<rich:treeNode type="Parameterized">
<h:outputText value="{#{node.namespace}}" />
12 years, 1 month
wise SVN: r480 - in webgui/branches/cdi-jsf/src/main: java/org/jboss/wise/gui/treeElement and 1 other directories.
by wise-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-02-01 13:02:05 -0500 (Fri, 01 Feb 2013)
New Revision: 480
Modified:
webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/ClientConversationBean.java
webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/GroupWiseTreeElement.java
webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/WiseTreeElementBuilder.java
webgui/branches/cdi-jsf/src/main/webapp/index.xhtml
Log:
Further fixes on handling of group elements with nested types
Modified: webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/ClientConversationBean.java
===================================================================
--- webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/ClientConversationBean.java 2013-02-01 09:04:23 UTC (rev 479)
+++ webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/ClientConversationBean.java 2013-02-01 18:02:05 UTC (rev 480)
@@ -175,7 +175,7 @@
}
private static TreeNodeImpl convertOperationParametersToGui(WSMethod wsMethod, WSDynamicClient client) {
- WiseTreeElementBuilder builder = new WiseTreeElementBuilder(client);
+ WiseTreeElementBuilder builder = new WiseTreeElementBuilder(client, true);
TreeNodeImpl rootElement = new TreeNodeImpl();
Collection<? extends WebParameter> parameters = wsMethod.getWebParams().values();
SOAPBinding soapBindingAnn = wsMethod.getEndpoint().getUnderlyingObjectClass().getAnnotation(SOAPBinding.class);
@@ -185,14 +185,14 @@
rpcLit = style != null && SOAPBinding.Style.RPC.equals(style);
}
for (WebParameter parameter : parameters) {
- WiseTreeElement wte = builder.buildTreeFromType(parameter.getType(), parameter.getName(), !rpcLit);
+ WiseTreeElement wte = builder.buildTreeFromType(parameter.getType(), parameter.getName(), null, !rpcLit);
rootElement.addChild(wte.getId(), wte);
}
return rootElement;
}
private static TreeNodeImpl convertOperationResultToGui(InvocationResult result, WSDynamicClient client) {
- WiseTreeElementBuilder builder = new WiseTreeElementBuilder(client);
+ WiseTreeElementBuilder builder = new WiseTreeElementBuilder(client, false);
TreeNodeImpl rootElement = new TreeNodeImpl();
Map<String, Type> resTypes = new HashMap<String, Type>();
for (Entry<String, Object> res : result.getResult().entrySet()) {
Modified: webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/GroupWiseTreeElement.java
===================================================================
--- webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/GroupWiseTreeElement.java 2013-02-01 09:04:23 UTC (rev 479)
+++ webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/GroupWiseTreeElement.java 2013-02-01 18:02:05 UTC (rev 480)
@@ -16,6 +16,7 @@
*/
package org.jboss.wise.gui.treeElement;
+import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.Iterator;
import java.util.LinkedList;
@@ -95,6 +96,10 @@
}
return returnList;
}
+
+ public String getType() {
+ return ((Class<?>) ((ParameterizedType) this.classType).getActualTypeArguments()[0]).getSimpleName();
+ }
public int getSize() {
Iterator<Object> keyIt = this.getChildrenKeysIterator();
Modified: webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/WiseTreeElementBuilder.java
===================================================================
--- webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/WiseTreeElementBuilder.java 2013-02-01 09:04:23 UTC (rev 479)
+++ webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/WiseTreeElementBuilder.java 2013-02-01 18:02:05 UTC (rev 480)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source
- * Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual
+ * Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
* contributors by the @authors tag. See the copyright.txt in the
* distribution for a full listing of individual contributors.
*
@@ -47,18 +47,16 @@
public class WiseTreeElementBuilder {
private WSDynamicClient client;
+ private boolean request;
- public WiseTreeElementBuilder(WSDynamicClient client) {
+ public WiseTreeElementBuilder(WSDynamicClient client, boolean request) {
this.client = client;
+ this.request = request;
}
- public WiseTreeElement buildTreeFromType(Type type, String name, boolean nillable) {
- return buildTreeFromType(type, name, null, nillable, null, null, new HashMap<Type, WiseTreeElement>(), new HashSet<Type>());
+ public WiseTreeElement buildTreeFromType(Type type, String name, Object value, boolean nillable) {
+ return buildTreeFromType(type, name, value, nillable, null, null, new HashMap<Type, WiseTreeElement>(), new HashSet<Type>());
}
-
- public WiseTreeElement buildTreeFromType(Type type, String name, Object obj, boolean nillable) {
- return buildTreeFromType(type, name, obj, nillable, null, null, new HashMap<Type, WiseTreeElement>(), new HashSet<Type>());
- }
private WiseTreeElement buildTreeFromType(Type type,
String name,
@@ -91,12 +89,17 @@
Set<Type> stack) {
Type firstTypeArg = pt.getActualTypeArguments()[0];
if (Collection.class.isAssignableFrom((Class<?>) pt.getRawType())) {
- WiseTreeElement prototype = this.buildTreeFromType(firstTypeArg, name, null, true, null, null, typeMap, stack);
- GroupWiseTreeElement group = new GroupWiseTreeElement(pt, name, prototype);
- if (obj != null) {
- for (Object o : (Collection) obj) {
- group.addChild(IDGenerator.nextVal(), this.buildTreeFromType(firstTypeArg, name, o, true, null, null, typeMap, stack));
+ GroupWiseTreeElement group;
+ if (obj != null || request) {
+ WiseTreeElement prototype = this.buildTreeFromType(firstTypeArg, name, null, true, null, null, typeMap, stack);
+ group = new GroupWiseTreeElement(pt, name, prototype);
+ if (obj != null) {
+ for (Object o : (Collection) obj) {
+ group.addChild(IDGenerator.nextVal(), this.buildTreeFromType(firstTypeArg, name, o, true, null, null, typeMap, stack));
+ }
}
+ } else {
+ group = new GroupWiseTreeElement(pt, name, null);
}
return group;
} else {
@@ -140,7 +143,7 @@
}
return element;
} else { // complex
- if (stack.contains(cl)) {
+ if (request && stack.contains(cl)) {
Logger.getLogger(this.getClass()).debug("* lazy");
return new LazyLoadWiseTreeElement(cl, name, typeMap);
}
@@ -148,7 +151,9 @@
Logger.getLogger(this.getClass()).debug("* complex");
ComplexWiseTreeElement complex = new ComplexWiseTreeElement(cl, name);
- stack.add(cl);
+ if (request) {
+ stack.add(cl);
+ }
for (Field field : ReflectionUtils.getAllFields(cl)) {
XmlElement elemAnnotation = field.getAnnotation(XmlElement.class);
XmlElementRef refAnnotation = field.getAnnotation(XmlElementRef.class);
@@ -177,8 +182,10 @@
WiseTreeElement element = this.buildTreeFromType(field.getGenericType(), fieldName, fieldValue, true, cl, namespace, typeMap, stack);
complex.addChild(element.getId(), element);
}
- stack.remove(cl);
- typeMap.put(cl, complex.clone());
+ if (request) {
+ stack.remove(cl);
+ typeMap.put(cl, complex.clone());
+ }
if (!nillable) {
complex.setNillable(false);
}
Modified: webgui/branches/cdi-jsf/src/main/webapp/index.xhtml
===================================================================
--- webgui/branches/cdi-jsf/src/main/webapp/index.xhtml 2013-02-01 09:04:23 UTC (rev 479)
+++ webgui/branches/cdi-jsf/src/main/webapp/index.xhtml 2013-02-01 18:02:05 UTC (rev 480)
@@ -72,7 +72,7 @@
</a4j:commandLink>
</rich:treeNode>
<rich:treeNode type="group">
- <h:outputText value="[#{node.prototype.type}]" styleClass="tipoCampo" />
+ <h:outputText value="[#{node.type}]" styleClass="tipoCampo" />
<h:selectBooleanCheckbox value="#{node.notNil}" disabled="true" />
<h:outputText value=" " />
<a4j:commandLink name="Add" action="#{clientConversationBean.addChild(node)}" reRender="richTree">
@@ -86,8 +86,11 @@
<h:outputText value="#{node.type} ..." />
<h:outputText value=" " />
<a4j:commandLink name="Load" action="#{clientConversationBean.lazyLoadChild(node)}" reRender="richTree" rendered="#{not node.resolved}">
- load
+ Load
</a4j:commandLink>
+ <a4j:commandLink action="#{clientConversationBean.removeChild(node)}" rerender="richTree" rendered="#{node.removable}">
+ Remove
+ </a4j:commandLink>
</rich:treeNode>
<rich:treeNode type="complex">
<h:outputText value="#{node.type} : #{node.name} " />
@@ -220,15 +223,8 @@
<h:outputText value="{#{node.namespace}}" />
</rich:treeNode>
<rich:treeNode type="group">
- <h:outputText value="#{node.prototype.type}[#{node.size}]" />
+ <h:outputText value="#{node.type}[#{node.size}]" />
</rich:treeNode>
- <rich:treeNode type="lazy">
- <h:outputText value="#{node.type} ..." />
- <h:outputText value=" " />
- <a4j:commandLink name="Load" action="#{clientConversationBean.lazyLoadChild(node)}" reRender="richResTree" rendered="#{not node.resolved}">
- load
- </a4j:commandLink>
- </rich:treeNode>
<rich:treeNode type="complex">
<h:outputText value="#{node.type} : #{node.name}" />
</rich:treeNode>
12 years, 1 month
wise SVN: r479 - in webgui/branches/cdi-jsf/src/main: java/org/jboss/wise/gui/treeElement and 1 other directories.
by wise-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-02-01 04:04:23 -0500 (Fri, 01 Feb 2013)
New Revision: 479
Removed:
webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/EmptyWiseTreeElement.java
Modified:
webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/ClientConversationBean.java
webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/WiseTreeElement.java
webgui/branches/cdi-jsf/src/main/webapp/index.xhtml
Log:
Proper support null results and use of return types
Modified: webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/ClientConversationBean.java
===================================================================
--- webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/ClientConversationBean.java 2013-01-31 17:08:55 UTC (rev 478)
+++ webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/ClientConversationBean.java 2013-02-01 09:04:23 UTC (rev 479)
@@ -44,7 +44,6 @@
import org.jboss.wise.core.client.factories.WSDynamicClientFactory;
import org.jboss.wise.core.exception.InvocationException;
import org.jboss.wise.core.exception.WiseRuntimeException;
-import org.jboss.wise.gui.treeElement.EmptyWiseTreeElement;
import org.jboss.wise.gui.treeElement.GroupWiseTreeElement;
import org.jboss.wise.gui.treeElement.LazyLoadWiseTreeElement;
import org.jboss.wise.gui.treeElement.WiseTreeElement;
@@ -203,16 +202,13 @@
}
}
for (Entry<String, Object> res : result.getResult().entrySet()) {
- Object resObj = res.getValue();
final String key = res.getKey();
if (!key.startsWith(WSMethod.TYPE_PREFIX)) {
- WiseTreeElement wte;
- if (resObj != null) {
- wte = builder.buildTreeFromType(resTypes.get(WSMethod.TYPE_PREFIX + key), key, resObj, true);
- } else {
- wte = new EmptyWiseTreeElement("result"); // TODO!! remove this and treat other elements now that return types are available
+ Type type = resTypes.get(WSMethod.TYPE_PREFIX + key);
+ if (type != void.class && type != Void.class) {
+ WiseTreeElement wte = builder.buildTreeFromType(type, key, res.getValue(), true);
+ rootElement.addChild(wte.getId(), wte);
}
- rootElement.addChild(wte.getId(), wte);
}
}
return rootElement;
Deleted: webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/EmptyWiseTreeElement.java
===================================================================
--- webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/EmptyWiseTreeElement.java 2013-01-31 17:08:55 UTC (rev 478)
+++ webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/EmptyWiseTreeElement.java 2013-02-01 09:04:23 UTC (rev 479)
@@ -1,68 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual
- * contributors by the @authors tag. See the copyright.txt in the
- * distribution for a full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.wise.gui.treeElement;
-
-import org.jboss.wise.core.utils.IDGenerator;
-
-/**
- * @author Alessio Soldano, alessio.soldano(a)jboss.com
- *
- */
-public class EmptyWiseTreeElement extends WiseTreeElement {
-
- private static final long serialVersionUID = 1L;
-
- public EmptyWiseTreeElement() {
- super(true);
- this.kind = EMPTY;
- this.id = IDGenerator.nextVal();
- }
-
- public EmptyWiseTreeElement(String name) {
- super(true);
- this.kind = EMPTY;
- this.id = IDGenerator.nextVal();
- this.name = name;
- }
-
- /**
- * Returns the String value of the instance corresponding to this element.
- *
- * @return The value
- */
- public String getValue() {
- return null;
- }
-
- public WiseTreeElement clone() {
- throw new UnsupportedOperationException();
- }
-
- /**
- * Gets the value for this element parsing a given object instance. This is
- * to be used to set the element value after the service invocation.
- *
- * @param obj
- */
- public void parseObject(Object obj) {
- throw new UnsupportedOperationException();
- }
-
- public Object toObject() {
- return null;
- }
-}
Modified: webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/WiseTreeElement.java
===================================================================
--- webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/WiseTreeElement.java 2013-01-31 17:08:55 UTC (rev 478)
+++ webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/treeElement/WiseTreeElement.java 2013-02-01 09:04:23 UTC (rev 479)
@@ -37,7 +37,6 @@
public static final String BYTE_ARRAY = "byteArray";
public static final String COMPLEX = "complex";
public static final String DURATION = "Duration";
- public static final String EMPTY = "empty";
public static final String ENUMERATION = "Enumeration";
public static final String GROUP = "group";
public static final String LAZY = "lazy";
Modified: webgui/branches/cdi-jsf/src/main/webapp/index.xhtml
===================================================================
--- webgui/branches/cdi-jsf/src/main/webapp/index.xhtml 2013-01-31 17:08:55 UTC (rev 478)
+++ webgui/branches/cdi-jsf/src/main/webapp/index.xhtml 2013-02-01 09:04:23 UTC (rev 479)
@@ -222,6 +222,13 @@
<rich:treeNode type="group">
<h:outputText value="#{node.prototype.type}[#{node.size}]" />
</rich:treeNode>
+ <rich:treeNode type="lazy">
+ <h:outputText value="#{node.type} ..." />
+ <h:outputText value=" " />
+ <a4j:commandLink name="Load" action="#{clientConversationBean.lazyLoadChild(node)}" reRender="richResTree" rendered="#{not node.resolved}">
+ load
+ </a4j:commandLink>
+ </rich:treeNode>
<rich:treeNode type="complex">
<h:outputText value="#{node.type} : #{node.name}" />
</rich:treeNode>
@@ -230,9 +237,6 @@
rendered="#{node.notNil}" />
<h:outputText value="#{node.type} : #{node.name} = ***NIL***" rendered="#{node.nil}" />
</rich:treeNode>
- <rich:treeNode type="empty">
- <h:outputText value="#{node.name} = ***NIL***" />
- </rich:treeNode>
</rich:tree>
</h:form>
</rich:panel>
12 years, 1 month