2009-02-05 5 views
2

북마크를 클릭하면 hyperlink.so로 북마크를 표시해야합니다. 해당 웹 페이지로 이동하게됩니다. 내 목표를 어떻게 달성해야하는지 알려주시겠습니까? 고마워요. 고마워요.출력 텍스트 특성 값을 하이퍼 링크로 만드는 방법은 무엇입니까?

<html> 
    <f:view> 
    <head> 
     <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> 
     <title>Insert title here</title> 
    </head> 
    <body> 
     <h:form> 
     <h1>Welcome to bookmark page</h1> 
     <h:dataTable value="#{table.bookmark}" var="item" border="1" rows="10"> 
      <f:facet name="header"> 
      <h:outputLabel value="Bookmark table"></h:outputLabel> 
      </f:facet> 
      <h:column> 
      <f:facet name="header"> 
       <h:outputLabel value="Edit"></h:outputLabel> 
      </f:facet> 
      <h:selectBooleanCheckbox value="#{item.editBookmark}" onclick="submit"> 
      </h:selectBooleanCheckbox> 
      </h:column> 
      <h:column> 
      <f:facet name="header"> 
       <h:outputLabel value="Sno"></h:outputLabel> 
      </f:facet> 
      <h:inputText value="#{item.sno}" rendered="#{item.editBookmark}" size="10">  
      </h:inputText> 
      <h:outputText value="#{item.sno}" rendered="#{not item.editBookmark}"> 
      </h:outputText> 
      </h:column> 
      <h:column> 
      <f:facet name="header"> 
       <h:outputLabel value="Bookmarks"></h:outputLabel> 
      </f:facet> 
      <h:inputText value="#{item.bookmark}" rendered="#{item.editBookmark}" size="10"> 
      </h:inputText> 
      <h:outputText value="#{item.bookmark}" rendered="#{not item.editBookmark}"> 
      </h:outputText> 
      </h:column> 
     </h:dataTable> 
     <h:commandButton value="submit"> 
     </h:commandButton> 
     </h:form> 
    </body> 
    </f:view> 
</html> 

답변

2
<h:outputLink value="#{item.bookmark}" rendered="#{not item.editBookmark}" <h:outputText value = "#{item.bookmark}" ></h:outputText> </h:outputLink> 
+0

는 작은 실수를 수정이 이제 작동합니다 <시간을 : outputLink 값 = "# {item.bookmark}"렌더링 = "# { not item.editBookmark} ">

3

h:outputLink에서보세요 :

<h:outputLink value="#{item.sno}" rendered="#{not item.editBookmark}"><f:verbatim>#{item.sno}</f:verbatim></h:outputLink> 
관련 문제