1 Reply Latest reply on Apr 22, 2008 9:52 PM by Marcelo Leiras

    Dynamic creation of <f:verbatim>

    Marcelo Leiras Newbie

      Hi, i have the following code

       <rich:panel style="margin-left:auto; margin-right:auto; margin-top: 32px; text-align: justify;border: 0px; width:700px; background-color: transparent;">
       <rich:panel style="margin-left:0px; margin-top:0px;border: 0px; width:260px; height: 135px; background-color: trsnaparent;float:left;">
       <rich:panel style="margin-left:0px; margin-top:0px;border-width: 1px 1px 1px 1px; width:248px; height: 126px; background-color: trsnaparent;border-color: #CDD8BA;">
       <rich:panel style="margin-left: 3px; margin-top: 3px; width:242px; height: 120px; background-color: #0000FF;background-image: url(/busca_rastro/imagens/herlene.jpg); background-position: 50% 50%;">
       <h:graphicImage url="/imagens/etapa1.png" style="margin-left: 0px; margin-top: 97px;" />
       </rich:panel>
       </rich:panel>
       </rich:panel>
       <h:outputText style="color:#000000; font-size: 22px; font-famyli: verdana;float:left;" value="Fazenda Santa Rita" />
       <f:verbatim><br></f:verbatim>
       <h:outputText style="color:#999999; font-size: 16px; font-famyli: verdana;float:left;margin-top: 10px; margin-left: -190px;" value="Origem do Produto" />
       <f:verbatim><br><br><br></f:verbatim>
       <h:outputText style="color:#333333; font-size: 11px; font-famyli: verdana;line-height: 16px;" value="In Egypt, we find the earliest detailed records of warfare recorded thousands of years ago, but we also find the cemeteries and monuments of the world's last global war, World War II. In Egypt, we find some of the first written words of civilization, but we also find great thinkers and writers through the Greek period, into the Christian era, the archaic Islamic period and even modern Nobel Literates.In Egypt, we find the earliest detailed records of warfare recorded thousands of years ago, but we also find the cemeteries and monuments of the world's last global war, World War II. In Egypt, we find some of the first written words of civilization, but we also find great thinkers and writers through the Greek period, into the Christian era, the archaic Islamic period and even modern Nobel Literates.In Egypt, we find the earliest detailed records of warf, but we also find great thinkers and writers through the Greek period, into the Christian era, the archaic Islamic period and even modern Nobel Literates." />
       </rich:panel>
      



      and i have to do this dynamically, like this:

      panel.setStyle("margin-left:auto; margin-right:auto; margin-top: 32px; text-align: justify;border: 0px; width:700px; background-color: transparent;");
      
       HtmlPanel pnBack = new HtmlPanel();
       pnBack.setStyle("margin-left:0px; margin-top:0px;border: 0px; width:260px; height: 135px; background-color: trsnaparent;float:left;");
      
      
       HtmlPanel pnBorder = new HtmlPanel();
       pnBorder.setStyle("margin-left:0px; margin-top:0px;border-width: 1px 1px 1px 1px; width:248px; height: 126px; background-color: trsnaparent;border-color: #CDD8BA;");
      
      
       HtmlPanel pnImage = new HtmlPanel();
       pnImage.setStyle("margin-left: 3px; margin-top: 3px; width:242px; height: 120px; background-color: #0000FF;background-image: url(/busca_rastro/imagens/herlene.jpg); background-position: 50% 50%;");
      
       HtmlGraphicImage img = new HtmlGraphicImage();
       img.setStyle("margin-left: 0px; margin-top: 97px;");
       img.setUrl("/imagens/etapa1.png");
      
       pnImage.getChildren().add(img);
       pnBorder.getChildren().add(pnImage);
       pnBack.getChildren().add(pnBorder);
       panel.getChildren().add(pnBack);
      
       HtmlOutputText otNome = new HtmlOutputText();
       otNome.setStyle("color:#000000; font-size: 22px; font-famyli: verdana;float:left;");
       otNome.setValue("Fazenda Santa Rita<br>");
       panel.getChildren().add(otNome);
      
      
      
       HtmlOutputText otBR = new HtmlOutputText();
       otBR.setValue("<BR>");
       //panel.getChildren().add(otBR);
      
       HtmlOutputText otTipo = new HtmlOutputText();
       otTipo.setStyle("color:#999999; font-size: 16px; font-famyli: verdana;float:left;margin-top: 10px; margin-left: -190px;");
       otTipo.setValue("Origem do Produto<br><br><br>");
       panel.getChildren().add(otTipo);
      
       //panel.getChildren().add(otBR);
       //panel.getChildren().add(otBR);
       //panel.getChildren().add(otBR);
      
       HtmlOutputText otDescricao = new HtmlOutputText();
       otDescricao.setStyle("color:#333333; font-size: 11px; font-famyli: verdana;line-height: 16px;");
       otDescricao.setValue("In Egypt, we find the earliest detailed records of warfare recorded thousands of years ago, but we also find the cemeteries and monuments of the world's last global war, World War II. In Egypt, we find some of the first written words of civilization, but we also find great thinkers and writers through the Greek period, into the Christian era, the archaic Islamic period and even modern Nobel Literates.In Egypt, we find the earliest detailed records of warfare recorded thousands of years ago, but we also find the cemeteries and monuments of the world's last global war, World War II. In Egypt, we find some of the first written words of civilization, but we also find great thinkers and writers through the Greek period, into the Christian era, the archaic Islamic period and even modern Nobel Literates.In Egypt, we find the earliest detailed records of warf, but we also find great thinkers and writers through the Greek period, into the Christian era, the archaic Islamic period and even modern Nobel Literates.");
       panel.getChildren().add(otDescricao);
      
      


      But i don't know how to create the <f:verbatim> dynamically. Any suggestion? Or any other alternative? Thanks.