@Override
public void decode(FacesContext context, UIComponent component) {
super.decode(context, component);
AbstractWindow window = (AbstractWindow) component;
String sizeKey = window.getClientId(context) + "::size";
String sizeStr = context.getExternalContext().getRequestParameterMap().get(sizeKey);
if (sizeStr != null) {
String[] widthAndHeightArr = sizeStr.split(",");
int width = Integer.parseInt(widthAndHeightArr[0]);
int height = Integer.parseInt(widthAndHeightArr[1]);
window.setWidth(width + "px");
window.setHeight(height + "px");
}
}