[ 
https://issues.apache.org/jira/browse/WICKET-5005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13601177#comment-13601177
 ] 

Martin Grigorov edited comment on WICKET-5005 at 3/13/13 2:24 PM:
------------------------------------------------------------------

With 6.7.0 you can use 
org.apache.wicket.core.util.string.ComponentRenderer#renderPage(PageProvider) 
and 
org.apache.wicket.core.util.string.ComponentRenderer#renderComponent(Component).

See org.apache.wicket.examples.asemail.MailTemplate (wicket-examples) for its 
usage.
                
      was (Author: mgrigorov):
    With 6.7.0 you can use 
org.apache.wicket.core.util.string.ComponentRenderer#renderPage(PageProvider) 
and 
org.apache.wicket.core.util.string.ComponentRenderer#renderComponent(Component).
                  
> Add Utility to allow conversion from Panel (or Component) to html String
> ------------------------------------------------------------------------
>
>                 Key: WICKET-5005
>                 URL: https://issues.apache.org/jira/browse/WICKET-5005
>             Project: Wicket
>          Issue Type: Improvement
>            Reporter: Steve Lowery
>            Assignee: Martin Grigorov
>            Priority: Minor
>              Labels: email, html, template, utility
>             Fix For: 6.7.0
>
>
> I think it would be useful to add a utility class/method to convert from a 
> Panel or Component to its markup String.  There are at least 2 very valid use 
> cases where doing this makes sense:
> 1.  You are trying to create an html email to send out to your customers.  
> Building that content out with wicket is a great way to do it.  We are able 
> to harness Wicket's awesome i18n capabilities to generate the content.  
> Otherwise, we resort to ResourceBundles or having to introduce some other 
> templating library.
> 2.  Many Javascript APIs/JQuery Plugins (i.e. growl notifications, popovers, 
> etc) want the html content passed in.  Again, ideally the component is 
> written in wicket and we could use the utility to convert it to a String.
> The blog post below (thanks Cedric!) suggests a way to do this, but I think 
> it would be helpful to be included in the wicket framework.  What do you guys 
> think?
> http://www.bloggure.info/work/java-work/use-wicket-templating-system-to-generate-html.html
> Original email thread: http://markmail.org/message/fnkwjuh3xdekepvi

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to