我要求我必须将inputText的值传递给backing bean,它将包含文件的版本以及文件上载。 我一直在尝试使用远程命令来实现它,但没有工作。
以下是我的代码:
<h:form enctype="multipart/form-data" id="uploadForm">
<p:growl id="messages" showDetail="true" />
<p:outputLabel for="vers" value="File Version:" />
<p:inputText id="vers" name="vers"
value="#{remoteDeployment.uploadedVersion}" placeholder="1.x.x.x"
maxlength="17" required="true"
requiredMessage="Version is required." />
<p:separator />
<p:fileUpload onstart="submitVersion()"
fileUploadListener="#{remoteDeployment.upload}" update="messages" >
<f:attribute name="terminalSettings" value="#{as}" />
</p:fileUpload>
<p:remoteCommand name="submitVersion" process="@this vers" />
</h:form>
输入文本的支持bean中的字符串:
@ViewScoped
private String uploadedVersion;
public String getUploadedVersion() {
return uploadedVersion;
}
public void setUploadedVersion(String uploadedVersion) {
this.uploade
请提供帮助,如果还有其他办法可以告诉我。
由于
答案 0 :(得分:1)
这对我有用。
Select sum(database_value)
CASE when science_name_short='rhodo'
THEN 'Rhododendron species'
END AS real_name
from species_data;
答案 1 :(得分:0)
您可以轻松解决您的问题
将
<h:form enctype="multipart/form-data" id="uploadForm">
<p:growl id="messages" showDetail="true" />
<p:outputLabel for="vers" value="File Version:" />
<p:inputText id="vers" name="vers"
value="#{remoteDeployment.uploadedVersion}"
placeholder="1.x.x.x" maxlength="17" required="true" requiredMessage="Version is required.">
<p:ajax />
</p:inputtext>
<p:separator />
<p:fileUpload onstart="submitVersion()"
fileUploadListener="#{remoteDeployment.upload}" update="messages" >
</p:fileUpload>
</h:form>