我想在打开内容 primafaces 对话框后更新它。可能吗?我的示例代码如下。
<p:dialog widgetVar="pictureSaveDialog" id="pictureDialog" closable="false" >
<p:outputPanel id="saveDialogPanel">
<p:selectOneRadio id="options" value="#{pictureDefinitionsView.radioValue}" >
<f:selectItem itemLabel="FILE" itemValue="FILE" />
<f:selectItem itemLabel="" itemValue="URL" />
<p:ajax update="fileUpload1 fileUpload2" event="click" process="options" />
</p:selectOneRadio>
<p:outputPanel id="fileUpload1" rendered="#{pictureDefinitionsView.selectedFileUpload}"> File </p:outputPanel>
<p:outputPanel id="fileUpload2" rendered="#{pictureDefinitionsView.selectedUrlUpload}"> URL </p:outputPanel>
</p:outputPanel id="saveDialogPanel">
豆方法。
public boolean isSelectedFileUpload(){
return radioValue.equals("FILE");
}
public boolean isSelectedUrlUpload(){
return !isSelectedFileUpload();
}