0 Replies Latest reply on Apr 30, 2008 1:07 PM by Marcelo Leiras

    Dynamic simple content inside modal panel

    Marcelo Leiras Newbie


      i'm trying to put a simple HtmlOutputText dynamically inside a modal panel. Please take a look at my code:


      <rich:modalPanel id="mpProtocoloSanitario" autosized="true" >
      <rich:panel style="height: 30px; width: 200px; background-color: #0000FF;" >
      <h:outputText value="Test"/>
      <rich:panel id="pnProtocoloSanitario" binding="#{rastreador.panelProtocoloSanitario}" />
      <rich:panel style="text-align:center;margin-left: auto;margin-right: auto; margin-top: auto; margin-bottom: auto; border-width: 0px 0px 0px 0px; height: 30px;background-color: transparent;" >
      <h:graphicImage url="/imagens/bt_fechar.png" style="cursor: hand; cursor: pointer; margin-top: 10px;" onclick="javascript:Richfaces.hideModalPanel('mpProtocoloSanitario')" />


      private void updatePanel(HtmlPanel panel) {
       if (panel == null) {
       panel = new HtmlPanel();
       } else {
       HtmlOutputText ot = new HtmlOutputText();
       ot.setValue("Test Modal Panel");

      The method "updatePanel" is called after a click on a button.
      I have an attribute private HtmlPanel panelProtocoloSanitario; at my bean, with get and set.
      The modal panel opens, but the "HtmlOutputText ot" is not displayed. What i am doing wrong? Thanks for the help.