CSS:
.inputHint {
        color: #888866;
}

Java:
add(new AttributeModifier("value", true, new AbstractReadOnlyModel<String>() {
        @Override
        public String getObject() {
                return "yourHintText";
        }
}));
add(new AttributeModifier("class", true, new AbstractReadOnlyModel<String>() {
        @Override
        public String getObject() {
                return "inputHint";
        }
}));
add(new AttributeModifier("onfocus", true, new AbstractReadOnlyModel<String>() {
        @Override
        public String getObject() {
                return "removeInputHint(this,'inputHint');";
        }
}));

JS:
removeInputHint = function(x, c) {
        x.setAttribute('value', '');
        jQuery(x).removeClass(c);
}

Stefan



      


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

Reply via email to