我有以下
当我按下“提交”按钮时,不会调用该操作。如何传递batchText
值和entityText
值并调用操作?
有人,请帮忙吗?
<h:form id="batchImportForm">
<p:dialog id="someDialog" header="Import Batches" widgetVar="someDialog" minHeight="40" appendTo="body">
<p:panelGrid id="usePalletsPanel" style="width:auto">
<p:row>
<p:column colspan="2">
<h:outputLabel for="Entity" value="Entity:"/>
</p:column>
<p:column colspan="2">
<p:inputText id="Entity" value="#{batchImportDialog.entityText}" required="false" />
</p:column>
</p:row>
<p:row>
<p:column colspan="2">
<h:outputLabel for="Batch" value="Batch:" />
</p:column>
<p:column colspan="2">
<h:panelGroup id="panel_1">
<p:inputText id="Batch" value="#{batchImportDialog.batchText}" required="false" />
</h:panelGroup>
</p:column>
</p:row>
<p:row>
<p:column colspan="2">
<h:outputLabel for="Schedule" value="Schedule:" />
</p:column>
<p:column colspan="2">
<p:selectOneMenu id="Schedule" value="#{batchImportDialog.defaultScheduleCombo}" required="false" >
<f:selectItems value="#{batchImportDialog.defaultScheduleComboItems}" var="defaultScheduleComboItem" itemLabel="#{defaultScheduleComboItem}" itemValue="#{defaultScheduleComboItem}" />
</p:selectOneMenu>
</p:column>
</p:row>
<p:row>
<p:column colspan="2">
<h:outputLabel for="SchedDate" value="Schedule Date:" />
<p:calendar id="SchedDate"/>
</p:column>
</p:row>
<p:row>
<p:column colspan="2">
<p:commandButton id="submitButton" value="Submit"
action="#{batchImportDialog.onAddNewBatch()}"
update="batchImportForm:importBatchRow" process="@all"/>
<p:commandButton widgetVar="test123" type="submit" action="#{batchImportDialog.onAddNewBatch}" ajax="true" value="Add">
</p:commandButton>
</p:column>
</p:row>
<p:dataTable style="width:auto" id="importBatchRow" widgetVar="importBatchRow" var="row" value="#{batchImportDialog.batchs}" editable="true">
<p:columnGroup type="header">
<p:outputLabel value="Entity"/>
<p:outputLabel value="Batch"/>
<p:outputLabel value="Schedule Date"/>
<p:outputLabel value="Schedule"/>
</p:columnGroup>
<p:column colspan="1"><h:outputText value="#{row.inEntity}"></h:outputText></p:column>
<p:column colspan="1"><h:outputText value="#{row.schedBatch}"></h:outputText></p:column>
<p:column colspan="1"><h:outputText value=""></h:outputText></p:column>
<p:column colspan="1"><h:outputText value=""></h:outputText></p:column>
</p:dataTable>
</p:panelGrid>
</p:dialog>
</h:form>
我想通过调用操作方法将新创建的行添加到输出表中,该方法会修改绑定到p:数据表输出的列表,但这没有发生。