每次弹出时,我都试图更新一个primefaces对话框。该对话框由更改日历字段触发,实际调用是从 bean 进行的。当我第一次调用它时,数据很好,但是,如果我关闭它并再次打开它,它仍然会显示旧数据。这有点道理:它只渲染一次,然后显示和隐藏,从未真正更新。
我正在考虑在 bean 中的 dialog.show() 之前更新它,但我不知道该怎么做。任何的想法?
<p:dialog
site ="sectionDlg"
widgetVar ="Dlg"
minWidth ="430"
modal ="true"
closable ="true"
resizable ="false"
dynamic ="true"
width="450" height="300"
>
<h:form id="Form">
<br/>
<p:panelGrid id ="dates" styleClass="cmt-no-grid-100perc" columns="4">
<calendar attribName ="offerStartDateDlg"
value ="#{bean.startDate}"
writable ="#{false}"/>
<calendar attribName="offerEndDateDlg"
value="#{bean.endDate}"
writable="#{false}"/>
</p:panelGrid>
<div align="center">
<p:commandButton
onclick ="PF('whichSectionDlg').hide()"
>
</p:commandButton>
<p:commandButton
onclick ="PF('whichSectionDlg').hide()">
</p:commandButton>
</div>
</h:form>
Run Code Online (Sandbox Code Playgroud)
这可以让事情变得更容易
我有一个带有for的程序,它从Arraylist获取字符串,拆分它们并将它们发送到Worker类.
工人阶级:
public class WorkerRSR extends SwingWorker<String, Void>{
private static String urlFrames;
private static String urlImg;
public static int bool;
public static int dist;
public static int numI;
public static int spra;
public static boolean isCoda;
public static int numCoda;
public static String algo;
public WorkerRSR(String urlImg, int dist, int numI, int spra, String algo, String urlFrames, boolean isCoda, int numCoda) {
this.urlImg=urlImg;
this.dist=dist;
this.numI=numI;
this.spra=spra;
this.algo=algo;
this.urlFrames=urlFrames;
this.isCoda = isCoda;
this.numCoda = numCoda;
//FIRST CHECK POINT
}
@Override
protected …Run Code Online (Sandbox Code Playgroud) 我一直在寻找答案,但我能找到的只是我需要的东西(Mat to FIBITMAP).我有一个简短的代码,可以将图像作为FIBITMAP对象加载.我需要FreeImage,因为OpenCV不允许我加载pfm和其他一些扩展文件.我要做的是将FIBTMAP图像转换为OpenCV Mat,以便我可以在更长的代码中使用它.我该怎么办?