2011-02-18 6 views
1

새 브라우저 창에서 pdf 파일을 여는 페이지에 간단한 링크를 렌더링해야합니다.JSF 및 링크 : 대상 속성이 작동하지 않습니까?

<h:commandLink target="_blank" 
     action="showPDF" 
     title="Show attached PDF"   
     actionListener="#{bean.doShowPDF}"      
     value="Show PDF"> 
     <f:attribute name="path" value="#{bean.pdfPath}" /> 
    </h:commandLink> 

대상 속성은 무시하는 것 같다 나는 다음과 같은 태그를 썼다. 대상 페이지가 현재 페이지에 나타납니다.

나는 시간과 노력 : outputLink :

<h:outputLink target="_blank" 
     title="Show attached PDF" 
     value="/visAttached.jspx"> 
     <f:param name="path" value="#{bean.pdfPath}" /> 
     Show PDF 
    </h:outputLink> 

하지만 같은 결과. 두 경우 모두 생성 된 html에는 대상 속성이 없습니다.

내 잘못은 어디입니까? JSF에서 새 브라우저 창에 파일을 표시하는 것이 더 좋은 전략입니까?

+0

다음 component showcase는 (소스를 확인 레이아웃 패널/축소 패널 연결을 많이 가지고) 작업 예를 보여줍니다. JSF impl/version은 무엇입니까? 나는 고대 JSF 버전에서 비슷한 문제를 모호하게 상기한다. – BalusC

+0

jsf 1.2, icefaces 1.8.2 –

+0

최신 [1.2_15] (http://javaserverfaces.java.net/download.html)로 시도해 보셨습니까? – BalusC

답변

2

ice: 버전을 ice:outputLink 또는 ice:commandLink으로 사용해보십시오. 그것은 작동합니다

<ice:outputLink target="_blank" styleClass="navPnlClpsblLnks" 
       value="http://icefaces.org/main/home/index.jsp"> 
    <ice:outputText id="icefacesOrgLink" value="ICEfaces.org"/> 
</ice:outputLink> 
+0

그것은 작동합니다! 아마 icefaces JSF 표준 구성 요소에서 무언가를 깰 ... –

관련 문제