-
11 May 2012 12:21 AM #1
NestedDivFrame appearance relies on background resource in Blue theme
NestedDivFrame appearance relies on background resource in Blue theme
If you take a look at the CSS file for NestedDivFrame, you will notice it is full of sprites like the offending background one:
But there's no ImageResource method for background in the NestedDivFrameResources interface. There is a background ImageResource in the BlueFramedPanelDivFrameResources interface:Code:@sprite .content { gwt-image: 'background'; overflow: visible; height: auto; width: auto; }
This means in any subclass of NestedDivFrame that doesn't use the Blue theme there's trouble.Code:public interface BlueFramedPanelDivFrameResources extends FramedPanelDivFrameResources, ClientBundle { @ImageOptions(repeatStyle = RepeatStyle.Both) ImageResource background(); // Needs to be in NestedDivFrameResources. }
Also, the extends ClientBundle should be in the NestedDivFrameResources interface in my opinion.
-
15 May 2012 9:47 AM #2
Thanks for the critiques. You're completely right - referencing an image that the interface doesn't require is not at all what we want to do here. I've filed an API review ticket against the team and will update here with any changes we make.
We don't add the extends ClientBundle until the very last interface because this triggers the GWT ClientBundle generators. Whenever we add extends ClientBundle, every CSS file that is included into a CssResource must already be specified. As a result, we only add extends ClientBundle on the Blue resources class.
-
6 Nov 2012 2:12 PM #3
NestedDivFrameResources defines the images required for the frame. However, the base theme does not provide any images. The interface should be extended to provide implementation. Because images are not provided in the base theme, the interface does not extend ClientBundle as this would cause errors as GWT tries to validate that images exist. Subclasses should extend ClientBundle.
I have added better docs to NestedDivFrame and NestedDivFrameResources to make this clear.
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote