i mean label.setEscapeModelStrings(false) ;-)

Michael Sparer wrote:
> 
> try label.setEscapeModelStrings(true)
> 
> 
> Davidoff wrote:
>> 
>> I'm developing a simple webmail application...i want to render in HTML
>> what is in a MIME multipart message...now here is the code:
>> 
>> GetMessage.java
>> 
>> public abstract class GetMessage extends Panel {
>>      private MultiLineLabel text;
>>      private String type;
>> 
>>      public GetMessage(String id,Message msg,int index) throws
>> MessagingException, IOException {
>>      super(id);
>>      add(new Label("num",String.valueOf(index)));
>>      add(new Label("sub",msg.getSubject().toString()));
>>      add(new Label("sender",msg.getFrom()[0].toString()));
>>      add(new Label("dat",msg.getSentDate().toString()));
>> 
>> Object content = msg.getContent();
>>       
>>  if( content instanceof String){
>>     text=new MultiLineLabel("content",content.toString());
>> 
>>     
>>  }else{
>>   Multipart multi = (Multipart)content;
>>    for(int j=0; j<multi.getCount(); ++j){
>>        BodyPart part = multi.getBodyPart(j);
>>    type = part.getContentType();
>>     content = part.getContent();
>>      if( content instanceof String){
>>    text=new MultiLineLabel("content", content.toString());
>>     }
>>  }
>>  }
>>     add(text);
>>      add(new Label("prova1",type));
>>      
>>      }
>>      }
>> 
>> GetMessage.html
>> 
>> <wicket:panel>
>> 
>> <table>
>>      <tr><th>#</th><td class="even" wicket:id="num"></td></tr>
>>      <tr><th>Subject</th><td class="odd" wicket:id="sub"></td></tr>
>>      <tr><th>Sender</th><td class="even" wicket:id="sender"></td></tr>
>>      <tr><th>Date</th><td class="odd" wicket:id="dat"></td></tr>
>>      <tr><td colspan=2><div wicket:id="content"></div></td></tr>
>> </table>
>> 
>> LAbel
>> </wicket:panel>
>> 
>> 
>> The problem is the MultiLineLabel shows  not the HTML resulting
>> rendering, but the HTML code itself!
>> My target is to render the html code that is in the content.toString()
>> 
> 
> 


-----
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/Html-mail-representation-tp17337174p17337440.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to