Author: alessio.soldano(a)jboss.com
Date: 2013-01-28 17:43:00 -0500 (Mon, 28 Jan 2013)
New Revision: 466
Modified:
webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/ClientConversationBean.java
webgui/branches/cdi-jsf/src/main/webapp/index.xhtml
Log:
Fixing automatic notNil configuration when focussing on inputTexts
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-28
17:44:33 UTC (rev 465)
+++
webgui/branches/cdi-jsf/src/main/java/org/jboss/wise/gui/ClientConversationBean.java 2013-01-28
22:43:00 UTC (rev 466)
@@ -124,19 +124,11 @@
}
public void addChild(GroupWiseTreeElement el) {
- try {
- el.incrementChildren();
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
+ el.incrementChildren();
}
public void removeChild(WiseTreeElement el) {
- try {
- ((GroupWiseTreeElement)el.getParent()).removeChild(el.getId());
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
+ ((GroupWiseTreeElement)el.getParent()).removeChild(el.getId());
}
public void lazyLoadChild(LazyLoadWiseTreeElement el) {
@@ -147,6 +139,10 @@
}
}
+ public void onInputTextFocus(WiseTreeElement el) {
+ el.setNotNil(true);
+ }
+
private static TreeNodeImpl convertOperationParametersToGui(WSMethod wsMethod,
WSDynamicClient client) {
WiseTreeElementBuilder builder = new WiseTreeElementBuilder(client);
TreeNodeImpl rootElement = new TreeNodeImpl();
Modified: webgui/branches/cdi-jsf/src/main/webapp/index.xhtml
===================================================================
--- webgui/branches/cdi-jsf/src/main/webapp/index.xhtml 2013-01-28 17:44:33 UTC (rev 465)
+++ webgui/branches/cdi-jsf/src/main/webapp/index.xhtml 2013-01-28 22:43:00 UTC (rev 466)
@@ -54,8 +54,12 @@
switchType="ajax" binding="#{clientConversationBean.inTree}">
<rich:treeNode type="simple">
<h:outputText value="#{node.type} : #{node.name} " />
- <h:selectBooleanCheckbox id="foo-chk"
value="#{node.notNil}" disabled="#{node.notNillable}" />
- <h:inputText value="#{node.value}" id="foo"
label="" rendered="#{node.type!='boolean' and
node.type!='Boolean'}" columns="10"
onfocus="document.getElementById(this.id + '-chk').checked=true" />
+ <h:selectBooleanCheckbox id="foo-chk"
value="#{node.notNil}" disabled="#{node.notNillable}" >
+ <f:ajax />
+ </h:selectBooleanCheckbox>
+ <h:inputText value="#{node.value}" id="foo"
label="" rendered="#{node.type!='boolean' and
node.type!='Boolean'}" columns="10" >
+ <f:ajax event="valueChange" render="foo-chk"
listener="#{clientConversationBean.onInputTextFocus(node)}" />
+ </h:inputText>
<h:selectOneMenu value="#{node.value}"
rendered="#{node.type=='boolean' or node.type=='Boolean'}">
<f:selectItem itemValue="true" itemLabel="true"
/>
<f:selectItem itemValue="false" itemLabel="false"
/>
@@ -86,9 +90,10 @@
</rich:treeNode>
<rich:treeNode type="complex">
<h:outputText value="#{node.type} : #{node.name} " />
- <h:selectBooleanCheckbox value="#{node.notNil}"
disabled="#{node.notNillable}" />
- <h:outputText value=" " />
- <h:outputText value=" " />
+ <h:selectBooleanCheckbox value="#{node.notNil}"
disabled="#{node.notNillable}" >
+ <f:ajax />
+ </h:selectBooleanCheckbox>
+ <h:outputText value=" " />
<a4j:commandLink
action="#{clientConversationBean.removeChild(node)}"
rerender="richTree" rendered="#{node.removable}">
Remove
</a4j:commandLink>
@@ -99,7 +104,9 @@
</rich:treeNode>
<rich:treeNode type="XMLGregorianCalendar">
<h:outputText value="#{node.type} : #{node.name} "
styleClass="tipoCampo" />
- <h:selectBooleanCheckbox id="foo2-chk"
value="#{node.notNil}" disabled="#{node.notNillable}" />
+ <h:selectBooleanCheckbox id="foo2-chk"
value="#{node.notNil}" disabled="#{node.notNillable}" >
+ <f:ajax />
+ </h:selectBooleanCheckbox>
<rich:calendar id="foo2" value="#{node.valueDate}"
oncollapse="document.getElementById(this.id + '-chk').checked=true;return
true;"
popup="true"
showInput="true" enableManualInput="false" />
@@ -109,7 +116,9 @@
</rich:treeNode>
<rich:treeNode type="Duration">
<h:outputText value="#{node.type} : #{node.name} "
styleClass="tipoCampo" />
- <h:selectBooleanCheckbox id="foo3-chk"
value="#{node.notNil}" disabled="#{node.notNillable}" />
+ <h:selectBooleanCheckbox id="foo3-chk"
value="#{node.notNil}" disabled="#{node.notNillable}" >
+ <f:ajax />
+ </h:selectBooleanCheckbox>
<h:inputText id="foo3" value="#{node.value}"
onfocus="document.getElementById(this.id + '-chk').checked=true"/>
<h:outputText value="(MilliSeconds)" target="_blank"
/>
<h:outputText value=" " />
@@ -119,7 +128,9 @@
</rich:treeNode>
<rich:treeNode type="qname">
<h:outputText value="#{node.type} : #{node.name} "
styleClass="tipoCampo" />
- <h:selectBooleanCheckbox id="foo4-chk"
value="#{node.notNil}" disabled="#{node.notNillable}" />
+ <h:selectBooleanCheckbox id="foo4-chk"
value="#{node.notNil}" disabled="#{node.notNillable}" >
+ <f:ajax />
+ </h:selectBooleanCheckbox>
<h:outputText value="nameSpace: " />
<h:inputText id="foo4" value="#{node.nameSpace}"
onfocus="document.getElementById(this.id + '-chk').checked=true"/>
<h:outputText value=" localPart: " />
@@ -131,7 +142,9 @@
</rich:treeNode>
<rich:treeNode type="Enumeration">
<h:outputText value="#{node.type} : #{node.name} "
styleClass="tipoCampo" />
- <h:selectBooleanCheckbox id="foo5-chk"
value="#{node.notNil}" disabled="#{node.notNillable}" />
+ <h:selectBooleanCheckbox id="foo5-chk"
value="#{node.notNil}" disabled="#{node.notNillable}" >
+ <f:ajax />
+ </h:selectBooleanCheckbox>
<h:selectOneMenu id="foo5" value="#{node.value}"
onfocus="document.getElementById(this.id + '-chk').checked=true">
<f:selectItems value="#{node.validValue}" />
</h:selectOneMenu>
Show replies by date