Skip to content

Commit

Permalink
Improve Query Design Interface #122
Browse files Browse the repository at this point in the history
  • Loading branch information
rush authored and rush committed Oct 31, 2020
1 parent 38f72b3 commit 2664024
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 36 deletions.
3 changes: 2 additions & 1 deletion src/main/resources/META-INF/persistence.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="hmisPU" transaction-type="JTA">
<jta-data-source>java:app/dsC</jta-data-source>
<jta-data-source>java:app/pssp</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<shared-cache-mode>ALL</shared-cache-mode>
<properties>
<!--<property name="javax.persistence.schema-generation.database.action" value="create-or-extend-tables"/>-->
<property name="javax.persistence.schema-generation.database.action" value="create"/>
</properties>
</persistence-unit>
</persistence>
4 changes: 2 additions & 2 deletions src/main/webapp/designComponentFormItem/item.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<p:panelGrid columns="2" >


<p:outputLabel value="Name:" for="name" />
<p:outputLabel value="Name:" for="name"/>
<p:inputText id="name" required="true" rendered="true"
value="#{designComponentFormItemController.selected.name}" title="Name" />

Expand All @@ -50,7 +50,7 @@


<p:outputLabel value="Item:" for="item" />
<p:autoComplete id="item" value="#{designComponentFormItemController.selected.item}"
<p:autoComplete id="item" value="#{designComponentFormItemController.selected.item}"
completeMethod="#{itemController.completeDictionaryItems}" forceSelection="true"
required="true" var="dic" itemLabel="#{dic.code}" itemValue="#{dic}">
<p:column headerText="ID" >
Expand Down
90 changes: 57 additions & 33 deletions src/main/webapp/queryComponent/edit_criterian.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
<p:selectOneMenu id="evaluationType" value="#{queryComponentController.selected.evaluationType}" >
<f:selectItem itemLabel="Select" ></f:selectItem>
<f:selectItems value="#{commonController.queryVariableEvaluationType}" ></f:selectItems>
<f:ajax event="change" execute="evaluationType" render="values"></f:ajax>
</p:selectOneMenu>

<p:outputLabel value="Item:" for="item" />
Expand All @@ -74,10 +75,13 @@
<p:selectOneMenu id="queryDataType" value="#{queryComponentController.selected.queryDataType}" >
<f:selectItem itemLabel="Select" ></f:selectItem>
<f:selectItems value="#{commonController.queryDataTypes}" ></f:selectItems>
</p:selectOneMenu>
<f:ajax event="change" execute="queryDataType" render="values itemValue boolValue strVal"></f:ajax>
</p:selectOneMenu>

<p:outputLabel value="Item Value:" for="itemValue" />
<p:selectOneMenu id="itemValue" value="#{queryComponentController.selected.itemValue}" >
<p:selectOneMenu id="itemValue"
disabled="#{queryComponentController.selected.queryDataType ne 'item'}"
value="#{queryComponentController.selected.itemValue}" >
<f:selectItem itemLabel="Select" ></f:selectItem>
<f:selectItems value="#{queryComponentController.itemsInDesignFormItemValues}" itemValue="#{iv}"
itemLabel="#{iv.name}" var="iv" ></f:selectItems>
Expand All @@ -88,43 +92,63 @@
<p:outputLabel value="#{iv.code}" ></p:outputLabel>
</p:column>
</p:selectOneMenu>


<p:outputLabel value="Integer Numbers:" for="integerNumberValue" />
<h:panelGrid columns="2" >
<p:inputText id="integerNumberValue" value="#{queryComponentController.selected.integerNumberValue}" title="IntegerNumberValue" />
<p:inputText id="integerNumberValue2" value="#{queryComponentController.selected.integerNumberValue2}" title="IntegerNumberValue2" />

</h:panelGrid>

<p:outputLabel value="Long Number Values:" for="longNumberValue" />
<h:panelGrid columns="2" >
<p:inputText id="longNumberValue" value="#{queryComponentController.selected.longNumberValue}" title="LongNumberValue" />
<p:inputText id="longNumberValue2" value="#{queryComponentController.selected.longNumberValue2}" title="LongNumberValue2" />
</h:panelGrid>


<p:outputLabel value="Real Number Value:" for="realNumberValue" />
<h:panelGrid columns="2" >
<p:inputText id="realNumberValue" value="#{queryComponentController.selected.realNumberValue}" title="RealNumberValue" />
<p:inputText id="realNumberValue2" value="#{queryComponentController.selected.realNumberValue2}" title="RealNumberValue2" />
</h:panelGrid>



<p:outputLabel value="Boolean Value:" for="boolValue" />
<p:selectBooleanButton id="boolValue" value="#{queryComponentController.selected.booleanValue}" offLabel="Unchecked" onLabel="Checked" ></p:selectBooleanButton>
<p:selectBooleanButton id="boolValue"
disabled="#{queryComponentController.selected.queryDataType ne 'Boolean'}"
value="#{queryComponentController.selected.booleanValue}" offLabel="Unchecked" onLabel="Checked" ></p:selectBooleanButton>


<p:outputLabel value="String Value:" for="strVal" />
<p:inputText id="strVal" value="#{queryComponentController.selected.shortTextValue}" title="String Value" />

<p:inputText id="strVal"
disabled="#{queryComponentController.selected.queryDataType ne 'String'}"
value="#{queryComponentController.selected.shortTextValue}" title="String Value" />

</p:panelGrid>







<h:panelGroup id="values">
<p:panelGrid id="between" columns="2" rendered="#{queryComponentController.selected.evaluationType eq 'Between'}">

<p:outputLabel value="From"></p:outputLabel>
<p:inputText id="integerNumberValue"
rendered="#{queryComponentController.selected.queryDataType eq 'integer'}"
value="#{queryComponentController.selected.integerNumberValue}" title="IntegerNumberValue" />
<p:inputText id="longNumberValue"
rendered="#{queryComponentController.selected.queryDataType eq 'longNumber'}"
value="#{queryComponentController.selected.longNumberValue}" title="LongNumberValue" />
<p:inputText id="realNumberValue"
rendered="#{queryComponentController.selected.queryDataType eq 'real'}"
value="#{queryComponentController.selected.realNumberValue}" title="RealNumberValue" />

<p:outputLabel value="To"></p:outputLabel>
<p:inputText id="integerNumberValue2"
rendered="#{queryComponentController.selected.queryDataType eq 'integer'}"
value="#{queryComponentController.selected.integerNumberValue2}" title="IntegerNumberValue2" />
<p:inputText id="longNumberValue2"
rendered="#{queryComponentController.selected.queryDataType eq 'longNumber'}"
value="#{queryComponentController.selected.longNumberValue2}" title="LongNumberValue2" />
<p:inputText id="realNumberValue2"
rendered="#{queryComponentController.selected.queryDataType eq 'real'}"
value="#{queryComponentController.selected.realNumberValue2}" title="RealNumberValue2" />

</p:panelGrid>


<p:panelGrid id="singleValue" columns="2" rendered="#{queryComponentController.selected.evaluationType ne 'Between'}">

<p:outputLabel value="value"></p:outputLabel>
<p:inputText id="integerNumberValue1"
rendered="#{queryComponentController.selected.queryDataType eq 'integer'}"
value="#{queryComponentController.selected.integerNumberValue}" title="IntegerNumberValue" />
<p:inputText id="longNumberValue1"
rendered="#{queryComponentController.selected.queryDataType eq 'longNumber'}"
value="#{queryComponentController.selected.longNumberValue}" title="LongNumberValue" />
<p:inputText id="realNumberValue1"
rendered="#{queryComponentController.selected.queryDataType eq 'real'}"
value="#{queryComponentController.selected.realNumberValue}" title="RealNumberValue" />
</p:panelGrid>
</h:panelGroup>


</h:panelGroup>
Expand Down

0 comments on commit 2664024

Please sign in to comment.