Created
May 26, 2020 17:28
-
-
Save KiryhaPikoff/8a48ad558b084cadbf4c75db0865226f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p:panelGrid columns="2" style="width:100%; align-items: stretch;" columnClasses="half-column"> | |
<p:dataScroller value="#{medicalServiceCreationBean.medicamentsInstock}" var="medicamentCount" | |
chunkSize="10" | |
style="width: 100%"> | |
<f:facet name="header"> | |
Выберите медикаменты: | |
</f:facet> | |
<h:panelGrid columns="2" style="width:100%;" columnClasses="detail,buttons"> | |
<p:outputPanel> | |
<h:panelGrid columns="2" cellpadding="5"> | |
<h:outputText value="Название: " /> | |
<h:outputText value="#{medicamentCount}" /> | |
<h:outputText value="Количество: " /> | |
<h:outputText value="#{medicamentCount.count} шт." /> | |
</h:panelGrid> | |
</p:outputPanel> | |
<p:outputPanel> | |
<p:spinner id="countSpinner" value="#{medicalServiceCreationBean.count}" min="1" max="#{medicamentCount.count}"/> | |
<!– Наверное будет баг с последним количеством –> | |
<p:commandButton value="Добавить" update=":mainForm:mainPanel" action="#{medicalServiceCreationBean.addToSelected(medicamentCount)}" /> | |
</p:outputPanel> | |
</h:panelGrid> | |
</p:dataScroller> | |
<p:dataScroller id="selectedDataScroller" value="#{medicalServiceCreationBean.selectedMedicaments}" var="selectedMedicament" | |
chunkSize="10" | |
style="width: 100%;"> | |
<f:facet name="header"> | |
Вы выбрали: | |
</f:facet> | |
<h:panelGrid columns="2" style="width:100%" columnClasses="logo,detail"> | |
<p:outputPanel> | |
<h:panelGrid columns="2" cellpadding="5"> | |
<h:outputText value="Название: " /> | |
<h:outputText value="#{selectedMedicament}" /> | |
<h:outputText value="Количество: " /> | |
<h:outputText value="#{selectedMedicament.count} шт." /> | |
</h:panelGrid> | |
</p:outputPanel> | |
<p:outputPanel style="align-content: center"> | |
<p:commandButton value="Убрать" update=":mainForm:mainPanel" action="#{medicalServiceCreationBean.removeFromSelected(selectedMedicament)}" /> | |
</p:outputPanel> | |
</h:panelGrid> | |
</p:dataScroller> | |
</p:panelGrid> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment