0
votes

I want to open a dialog box when selectbutton is pressed and that dialog box should show more detail related to the selected entry. my code is like this.

<p:commandButton id="selectButton" update=":form:display"     oncomplete="moreviewDialog.show();" icon="ui-icon-search" title="View" style="width: 30px; height: 30px">  

<f:setPropertyActionListener value="#{pMData}" target="#{managedBean.selectedRecord}" /> 

</p:commandButton>  



<p:dialog header="History Data" widgetVar="moreviewDialog" resizable="false" id="moreviewDlg"  showEffect="fade" hideEffect="explode" modal="true">  

<h:panelGrid id="display" columns="2" cellpadding="4" style="margin:0 auto;">  

<h:outputText value="CellId:" />  
<h:outputText value="#{managedBean.selectedRecord.cellid}" style="font-weight:bold"/>  



</h:panelGrid>  

</p:dialog>  

and managedBean is like this.

private PMData selectedRecord;
public void setSelectedRecord(PMData selectedRecord){
this.selectedRecord=selectedRecord;

}

public PMData getSelectedRecord(){
return  selectedRecord;
}

But dialogbox does not show any value.

1
What is #{pMData} and where does it come from ? - erencan
What does this have to do with CSS? Please remove the tag - thanks! - Netsurfer
can someone help please? - gsk

1 Answers

0
votes

You forgot to provide an action in the commandButton