And this is my implementation:

    private class DesignModeBehavior extends AbstractTransformerBehavior {

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

                        StringBuilder post = new StringBuilder();
                        post.append("<!- &quot;);
                        post.append(className);
                        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: 
http://apache-wicket.1842946.n4.nabble.com/something-similar-with-setOutputMarkupContainerClassName-tp4653202p4653263.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to