By the way, the current implementation of default button ruins design sometimes (I do not exactly remember the case right now, but I can try to reproduce if necessary). I was forced to rewrite the appendDefaultButtonField to add position: absolute to the default pseudo-button.

protected void appendDefaultButtonField(final MarkupStream markupStream,
        final ComponentTag openTag)
    final AppendingStringBuffer buffer = new AppendingStringBuffer();

    // get the value, first seeing whether the value attribute is set by a model

    String value = this.getDefaultButton().getModelObjectAsString();
    if (value == null || "".equals(value))
        // nope it isn't; try to read from the attributes
        // note that we're only trying lower case here
        value = this.getDefaultButton().getMarkupAttributes().getString("value");

    // append the button
    final String userAgent = ((WebClientInfo)this.getSession().getClientInfo()).getUserAgent();
    .append("<input type=\"submit\" value=\"").append(value).append("\" name=\"")
    if (userAgent != null && userAgent.indexOf("MSIE") != -1)
        buffer.append("style=\"width: 0px; height: 0px; position: absolute;\"");
        buffer.append(" style=\"display: none\"");

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
Wicket-user mailing list

Reply via email to