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.

@Override
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();
   
    buffer
    .append("<input type=\"submit\" value=\"").append(value).append("\" name=\"")
    .append(this.getDefaultButton().getInputName()).append("\"");
   
    if (userAgent != null && userAgent.indexOf("MSIE") != -1)
    {
        buffer.append("style=\"width: 0px; height: 0px; position: absolute;\"");
    }
    else
    {
        buffer.append(" style=\"display: none\"");
    }
   
    buffer.append("/>");
   
    this.getResponse().write(buffer);
}

-------------------------------------------------------------------------
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
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to