Author: konstantin.mishin
Date: 2010-04-16 11:41:56 -0400 (Fri, 16 Apr 2010)
New Revision: 16769
Modified:
root/ui-sandbox/trunk/components/tables/ui/src/test/java/org/richfaces/renderkit/ExtendedDataTableRendererTest.java
Log:
RF-8480
Modified:
root/ui-sandbox/trunk/components/tables/ui/src/test/java/org/richfaces/renderkit/ExtendedDataTableRendererTest.java
===================================================================
---
root/ui-sandbox/trunk/components/tables/ui/src/test/java/org/richfaces/renderkit/ExtendedDataTableRendererTest.java 2010-04-16
15:39:25 UTC (rev 16768)
+++
root/ui-sandbox/trunk/components/tables/ui/src/test/java/org/richfaces/renderkit/ExtendedDataTableRendererTest.java 2010-04-16
15:41:56 UTC (rev 16769)
@@ -229,4 +229,25 @@
assertTrue(facesContext.getPartialViewContext().getRenderIds().contains(clientId));
facesRequest.release();
}
+
+ @Test
+ public final void testColumnResizing() throws IOException {
+ FacesRequest facesRequest =
environment.createFacesRequest("http://localhost/extendedDataTableTest.jsf");
+ facesRequest.withViewId("/extendedDataTableTest.jsf");
+ facesRequest.start();
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ ViewHandler vh = facesContext.getApplication().getViewHandler();
+ ViewDeclarationLanguage vdl = vh.getViewDeclarationLanguage(facesContext,
facesContext.getViewRoot()
+ .getViewId());
+ vdl.buildView(facesContext, facesContext.getViewRoot());
+ UIExtendedDataTable component = (UIExtendedDataTable)
facesContext.getViewRoot().findComponent("table");
+ ExtendedDataTableRenderer renderer = (ExtendedDataTableRenderer)
FacesContext.getCurrentInstance()
+ .getRenderKit().getRenderer(component.getFamily(), component.getRendererType());
+ Map<String, Object> column1Attributes =
component.findComponent("column1").getAttributes();
+ assertNull(column1Attributes.get("width"));
+ facesRequest.withParameter(component.getClientId(facesContext) + ":wi",
"column1:200px");
+ renderer.doDecode(facesContext, component);
+ assertEquals("200px", column1Attributes.get("width"));
+ facesRequest.release();
+ }
}
Show replies by date