I have this problem when I put download link into a dialog box it doesn't work, but when I put it into panelgrid it works is it a bug in primefaces or what ? do you have any idea
Asked
Active
Viewed 2,378 times
0
-
any chance of nested forms in your dialog ? – Daniel Aug 12 '12 at 13:47
-
I don't understand what you mean – begiPass Aug 12 '12 at 14:05
-
I just understand why doesn't work for me, when I put download link inside dialog it works but if it is inside ui:repeat it doesn't work : I just test this is : do you have any idea to make working this component inside ui:repeat, thanks – begiPass Aug 12 '12 at 14:29
-
I tested also h-datatable ,unfortunately, it doesn't work, did you ever encounter this problem ? – begiPass Aug 12 '12 at 14:44
-
1Duplicate of [convert Bytes\[\] to StreamedContent fro download jsf2.0 primefaces3.3.1](http://stackoverflow.com/questions/11914085/convert-bytes-to-streamedcontent-fro-download-jsf2-0-primefaces3-3-1) Please don't repost the same problem over and over. Instead edit and improve your original question on the very same problem. – BalusC Aug 12 '12 at 16:18
-
sorry, you are right, I made this only because I didn't find the result of the problem – begiPass Aug 12 '12 at 18:14
1 Answers
0
<h:form>
<p:panel header="Query">
<.......some come is here ........
<p:commandButton value="Export CSV" icon="ui-icon-document"
process="@this" rendered="#{xxx.showTable}"
oncomplete="exportConfirmationDialogShow.show()"></p:commandButton>
</h:panelGrid>
</p:outputPanel>
</h:panelGrid>
</p:panel>
</h:form>
Dialog ;
<p:dialog header="Choose Delimiter Type" id="dialogCSV"
widgetVar="exportConfirmationDialogShow" resizable="false">
<h:form id="csvForm">
<h:panelGrid columns="2" style="margin-bottom:10px">
<h:outputLabel value="Delimiter:" />
<p:selectOneRadio id="delimiter" value="#{xxx.delimiterType}">
<f:selectItem itemLabel="Tab" itemValue="tab" />
<f:selectItem itemLabel="Pipe" itemValue="|" />
<f:selectItem itemLabel="Comma" itemValue="," />
</p:selectOneRadio>
</h:panelGrid>
<p:commandButton id="exportCsv" value="Export CSV"
actionListener="#{xxx.export2CSV}" ajax="false"
onclick="PrimeFaces.monitorDownload(hideStatus)">
<p:fileDownload value="#{xxx.exportFile}"
contentDisposition="attachment" />
</p:commandButton>
</h:form>
<script type="text/javascript">
function showStatus() {
exportConfirmationDialogShow.show();
}
function hideStatus() {
exportConfirmationDialogShow.hide();
}
</script>
</p:dialog>

newuserua
- 299
- 2
- 6
-
We prefer it here at SO if you include in your answer a brief description of how this code works, and specifically how it answers the original question. That helps to make these answers a better resource of others. – joran Sep 22 '12 at 20:50