PrimeFaces RequestContext.getCurrentInstance().openDialog()
ürününü çalıştıramıyor. Örnek kodu primefaces vitrininden kaldırdım, ama açılacak bir iletişim kutusu bulamıyorum. Wildfly 8.2.0.Final üzerinde çalışan PF 5.1 kullanıyorum. Ne var ne yok?PrimeFaces RequestContext.getCurrentInstance() öğesini alamıyorum openDialog() çalışmak
@ManagedBean(name = "dfView")
public class DFView {
public void chooseCar() {
RequestContext.getCurrentInstance().openDialog("selectCar");
}
public void onCarChosen(SelectEvent event) {
Car car = (Car) event.getObject();
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, "Car Selected", "Id:" + car.getId());
FacesContext.getCurrentInstance().addMessage(null, message);
}
}
ve benim dialogplay.xhtml
<!DOCTYPE html>
<ui:composition xmlns="http://www.w3.org/1999/xhtml" template="/WEB-INF/templates/template.xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:p="http://primefaces.org/ui">
<ui:define name="body">
<h:form>
<p:growl id="growl" showDetail="true" />
<p:commandButton value="Select Car" icon="ui-icon-extlink" actionListener="#{dfView.chooseCar}">
<p:ajax event="dialogReturn" listener="#{dfView.onCarChosen}" update="growl" />
</p:commandButton>
</h:form>
</ui:define>
</ui:composition>
Bingo, sorun buydu. KKO. Teşekkürler. –
bile bu kodu face-config içinde kullandıktan sonra hiçbir şeyim yok – Subodh