Re: Html mail representation
idoff 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>>>>>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 >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> # >>>>>> Subject >>>>>> Sender >>>>>> Date >>>>>> >>>>>> >>>>>> >>>>>> LAbel >>>>>> >>>>>> >>>>>> >>>>>> 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() >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/Html-mail-representation-tp17337174p17337580.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] >>> >>> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > > -- View this message in context: http://www.nabble.com/Html-mail-representation-tp17337174p17364247.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]
Re: Html mail representation
rChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619)Complete stack:org.apache.wicket.WicketRuntimeException: Error attaching this container for rendering: [Page class = ajaxubimail.index.MailAccount, id = 7, version = 0] at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1601) at org.apache.wicket.Component.onBeforeRender(Component.java:3681) at org.apache.wicket.Page.onBeforeRender(Page.java:1416) at org.apache.wicket.Component.internalBeforeRender(Component.java:1002) at org.apache.wicket.Component.beforeRender(Component.java:1034) at org.apache.wicket.Component.prepareForRender(Component.java:2158) at org.apache.wicket.Page.renderPage(Page.java:885) at org.apache.wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:163) at org.apache.wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:58) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1172) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1243) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1331) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:363) I've partially resolved the question putting in the ListView constructor the lines if (!folder.isOpen) folder.open(Folder.READ_ONLY); but the system is really slow to download all emails because opens and closes folder for each message in it How can i simplify this? Excuse me for my poor English... :) jwcarman wrote: > > How are you spitting out the contents of the mail? Are you using a > stream of some sort? Are you forgetting to flush/close the stream? > > On Tue, May 20, 2008 at 6:45 AM, Davidoff <[EMAIL PROTECTED]> wrote: >> >> wonderful...the problem now is that some mail do not render >> completely...i >> don't see any tags now, i see the rendered mail, but some mails are half >> rendered, maybe a part of these contain text/plain? >> >> Michael Sparer wrote: >>> >>> 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>>>>BodyPart part = multi.getBodyPart(j); >>>>>type = part.getContentType(); >>>>> content = part.getContent(); >>>>> if( content instanceof String){ >&g
Re: Html mail representation
How are you spitting out the contents of the mail? Are you using a stream of some sort? Are you forgetting to flush/close the stream? On Tue, May 20, 2008 at 6:45 AM, Davidoff <[EMAIL PROTECTED]> wrote: > > wonderful...the problem now is that some mail do not render completely...i > don't see any tags now, i see the rendered mail, but some mails are half > rendered, maybe a part of these contain text/plain? > > Michael Sparer wrote: >> >> 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>>>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 >>>> >>>> >>>> >>>> >>>> # >>>> Subject >>>> Sender >>>> Date >>>> >>>> >>>> >>>> LAbel >>>> >>>> >>>> >>>> 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() >>>> >>> >>> >> >> > > -- > View this message in context: > http://www.nabble.com/Html-mail-representation-tp17337174p17337580.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] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Html mail representation
wonderful...the problem now is that some mail do not render completely...i don't see any tags now, i see the rendered mail, but some mails are half rendered, maybe a part of these contain text/plain? Michael Sparer wrote: > > 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>>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 >>> >>> >>> >>> >>> # >>> Subject >>> Sender >>> Date >>> >>> >>> >>> LAbel >>> >>> >>> >>> 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() >>> >> >> > > -- View this message in context: http://www.nabble.com/Html-mail-representation-tp17337174p17337580.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]
Re: Html mail representation
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>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 >> >> >> >> >> # >> Subject >> Sender >> Date >> >> >> >> LAbel >> >> >> >> 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]
Re: Html mail representation
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; jBodyPart 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 > > > > > # > Subject > Sender > Date > > > > LAbel > > > > 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-tp17337174p17337437.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]
Html mail representation
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 # Subject Sender Date LAbel The problem is the MultiLineLabel shows not the HTML resulting rendering, but the HTML code itself! My target is to render the html code in the content.toString() -- View this message in context: http://www.nabble.com/Html-mail-representation-tp17337174p17337174.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]