Hi

First, is it a good question.
My solution use jqwicket tooltip and I touch both java and html files but
it's ok for me.

>>> InlineHelp.java
public class InlineHelp extends Panel {

   private static final long serialVersionUID = 1L;

   public InlineHelp(String id, IModel<String> messageModel) {
      super(id, messageModel);
   }

   public InlineHelp(String id, String message) {
     super(id, Model.<String>of(message));
   }

   @Override
   protected void onInitialize() {
      super.onInitialize();

      setRenderBodyOnly(true);
                
      WebComponent image = new ContextImage("image", "/images/help.png") {
                        
         private static final long serialVersionUID = 1L;

         @Override
         protected void onComponentTag(ComponentTag tag) {
            tag.put("title", (String)
InlineHelp.this.getDefaultModelObject());
            }
                        
        };
        image.add(new TipTipBehavior(new TipTipOptions().maxWidth("auto")));
        add(image);
   }

}

>>> InlineHelp.html
<?xml version="1.0" encoding="utf-8"?>
<html xmlns:wicket="http://wicket.apache.org/";>
<wicket:panel>
     
</wicket:panel>
</html>

>>> How to use
> java
form.add(new InlineHelp("emailHelp", "If you want some notifications"));
> html

        Email notifications
        <input type="checkbox" wicket:id="emailNotification"/>


Best regards,
Decebal




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Custom-XHTML-tag-tp4650489p4650506.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