Apr 29, 2012

PlayRythm 1.0.0-RC1 released

Just released this new big version to Play's module repository. There are lots of improvements in terms of both functionality and documentation, several bug fixes and a few break changes:

break changes

  • @renderBody() does not render layout content now. It’s used to render tag body specifically. To render the layout content, use @doLayout() or @render() without section name parameter
  • Automatic escape expression with html format if the template file name suffix is .html. If your code breaks, try to use @raw() tag to surround relevant template part or export your variable with.raw() extension.
    • Note auto-escape can cause template execution performance up to 3 times slower(still much faster than groovy) depending on how many expressions there are in your template, but we consider it a good trade-off to offer a secure default behavior. For those people who “need for speed”, simply wrap your entire template content in raw block:@raw(){your content comes here}.
  • app/view as template root are no longer supported. All rythm template files must be put intoapp/rythm folder
  • app/view/tags/rythm as tag root are no longer supported. Just put tag files as normal template file into app/rythm folder
  • @section tag usage:
    • previously @section sectionName {...}
    • now @section(“sectionName”) {...}

New features

Small enhancements

Issues closed




Apr 4, 2012

Smooth your font in your Java IDE

I have just installed gdipp which makes your windows font rendered like MacOS and it looks really awesome. However I found a tiny problem is the equal symbol "=" is rendered as the minus symbol "-" in my Intellij IDEA, and someone using Netbeans also reported the same issue. So here is the solution based on the issue discussion thread. Add the following section in your gdipp_setting.xml file:
  <process name="idea.*">
   <renderer>20</renderer>
  </process>
So the code means using GetGlyphOutline to render font in process named "idea.*", specifically my IntelliJ IDEA process. Now everything is perfect!

Apr 3, 2012

plupload file browse dialog only open on firefox

I've just experienced an issue with plupload. Say that the file browse dialog open only on Firefox, other browsers doesn't work including IE 9, Chrome, Opera, I didn't test Safari though. Fortunately this thread told me where the issue comes from. You must put the browse_button inside the container:
        var uploader = new plupload.Uploader({
            runtimes : 'html5, flash, browserplus',
            browse_button : 'theUploadBtn', 
            container: 'divPlUploadContainer', // << 'theUploadBtn' must be inside this element!
            max_file_size : '2mb',
            url : 'file/upload/handler',
            multipart: true,
            flash_swf_url : '/lib/plupload/js/plupload.flash.swf',
            filters : [
                {title : "Image files", extensions : "jpg,gif,png"},
            ]
        });
However plupload still not work on Opera with this change