And this is my implementation:

    private class DesignModeBehavior extends AbstractTransformerBehavior {

    private static final long serialVersionUID = 1L;
                public CharSequence transform(Component component, CharSequence 
throws Exception {              
                        String className = 
                        StringBuilder pre = new StringBuilder();
                        pre.append("<!- &quot;);
                        pre.append(&quot; BEGIN&quot;);
                        pre.append(&quot; ->\n");

                        StringBuilder post = new StringBuilder();
                        post.append("<!- &quot;);
                        post.append(&quot; END&quot;);
                        post.append(&quot; ->\n");

                        StringBuilder tmp = new StringBuilder(output);
                        int i1 = tmp.indexOf(">");
                        int i2 = tmp.lastIndexOf("<");
                        tmp.insert(i2, post.toString());
                        tmp.insert(i1 + 1, pre.toString());
                        return tmp;

View this message in context:
Sent from the Users forum mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to