2012-05-03 14 views
1

私はリッチ:パネルのヘッ​​ダーにのX(閉じる)ラベルを貼り付けようとしていますが、リッチ:パネルセットのテキストとX(閉じる)のヘッダ

例で:popupPanelを、と私は金持ちに実装する必要があります:

http://docs.jboss.org/richfaces/latest_4_0_X/Component_Reference/en-US/html/images/figu-Component_Reference-richpopupPanel-Header_and_controls.png

しかし、この例では、豊かで実行されているパネルのコンポーネント。

私が試している:

<rich:panel> 
     <f:facet name="header"> 
      <h:outputText value="Text Header here" /> 
     </f:facet> 
    <f:facet name="controls"> 
     <h:outputLink value="#" onclick="#{rich:component('component')}.hide()return false;"> 
      <h:outputText value="X" /> 
     </h:outputLink> 
    </f:facet> 
</rich:panel> 

AND:

<rich:panel> 
    <f:facet name="header"> 
      <h:outputText value="Text Header here" /> 
    </f:facet> 
     <f:facet name="controls"> 
      <h:outputLink value="#" onclick="#{rich:component('component')}.hide(); return false;"> 
       X 
      </h:outputLink> 
     </f:facet> 
</rich:panel> 

などを、すべて

おかげで働いていません。

+0

ような何かをすることによって、同じ動作をシミュレートしようとすることができます。panel'が、['豊富:popupPanel'](http://showcase.richfaces.org/richfaces /component-sample.jsf?demo=popup&skin=blueSky) –

+0

しかし、私はリッチでこの機能を実装する必要があります:パネル – vctlzac

+0

'rich:panel'に' f:facet name = "controls" '。あなたができることは** X **をヘッダーに入れて左に送信することです –

答えて

1

あなたは、これは `金持ちではありません

<h:form id="frmTest"> 
    <rich:panel id="panelTest" style="width: 200px"> 
     <f:facet name="header"> 
      <h:outputText value="Text Header here" /> 
      <div style="position: relative; float: right;"> 
       <a4j:commandLink 
        onclick="document.getElementById('frmTest:panelTest').style.display='none'; return false;"> 
        <h:outputText value="X" /> 
       </a4j:commandLink> 
      </div> 
     </f:facet> 
     <p> 
      Some text here! 
     </p> 
    </rich:panel> 
    <br /> 
    <a4j:commandLink onclick="document.getElementById('frmTest:panelTest').style.display='block'; return false;"> 
     <h:outputText value="Show panel" /> 
    </a4j:commandLink> 
</h:form> 
関連する問題