1
Primefaces로 프로그래밍 중입니다. P : wizard를 사용합니다.primefaces에서 p : wizard가 지우는 변수들
문제가 있습니다. 때 미안 내 모든 변수에 액세스 할 수 있습니다,하지만 난 panelGrid를 생성하기 위해 2 단계로 변경할 때, 1 단계에서 사용할 수 있었던 변수는 메소드의 CreateForm 지금 비어있는 단계 1 :
<p:wizard widgetVar="wiz">
<p:tab id="stepone" title="Step 1">
<p:panel>
<h:panelGrid >
<h:outputLink value="#" onclick="wiz.loadStep (wiz.cfg.steps [1], true)">next</h:outputLink>
</h:panelGrid>
</p:panel>
</p:tab>
<p:tab id="step2" title="Step 2">
<p:panel>
<h:panelGrid >
<h:panelGrid binding="#{ingresoBean.panelGrid}">
</h:panelGrid>
<h:panelGrid >
<h:outputLink value="#" onclick="wiz.loadStep (wiz.cfg.steps [0], true);">return</h:outputLink>
</h:panelGrid>
</p:panel>
</p:tab>
</p:wizard>
그리고 콩 다음 documenation에서
List<Element> listElement;
private transient UIComponent panelGrid;
public IngresoBean() {
this.initForm();
}
public UIComponent getPanelGrid() {
if (panelGrid == null) {
panelGrid = createForm();
}
return panelGrid;
}
.....
public void setPanelGrid(UIComponent panelGrid) {
this.panelGrid = panelGrid;
}
public UIComponent createForm(){
//here the listElement isnull
for(SiacFrmdinamico campo:listElement){
....
}
}
public void initForm(){
...
// populate listElement
...
}