Quantcast
Channel: BTSoru.com - Bilisim ve Yazilim Teknolojileri Soru/Cevap Platformu - latest questions
Viewing all articles
Browse latest Browse all 4270

Primefaces da

$
0
0

Arkadaşlar merhaba benim elimde 6 tane pdf var ve bunları gelen isteğe karşılık ona ait pdf göstermek istiyorum primefaces ile ama ben ilk default olarak bi pdfi local adresi verdim ve actionlara göre pdf değiştirmiyor sebebi nedir teşekkürler...

XHTML SAYFASI

<p:media id="pdfViewer" player="pdf"
  value="#{muameleislemlerbean.stream}" width="650" height="550">
   </p:media>

BEAN SAYFASI

    String defaultFilePath = "C:/Users/Documents/";
    switch (whichContentType) {
    case 1:
        defaultFilePath += "local.pdf";
        break;
    case 2:
        defaultFilePath += "local1.pdf";
        break;
    default:
        break;
    }
    File file = new File(defaultFilePath);
    System.out.println("This Path Location" + defaultFilePath);

    try {
        FileInputStream fis = new FileInputStream(file);
        defaultFilePath = null;
        return new DefaultStreamedContent(fis,"application/pdf");
    } catch (Exception e) {
        throw new FacesException(e);
    }

Viewing all articles
Browse latest Browse all 4270

Trending Articles


Mide ağrısı için


Alessandra Torre - Karanlık Yalanlar


Şekilli süslü hazır floodlar


Flatcast Güneş ve Ay Flood Şekilleri


Gone Are the Days (2018) (ENG) (1080p)


Yildiz yükseltme


yc82


!!!!!!!!!! Amın !!!!!!!!!


Celp At Nalı (Sahih Tılsım)


SCCM 2012 Client Installation issue