You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2010/05/27 07:45:11 UTC
svn commit: r948678 - in /myfaces/tobago/branches/tobago-1.0.x:
core/src/main/java/org/apache/myfaces/tobago/component/UIData.java
example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/overview/OverviewController.java
Author: lofwyr
Date: Thu May 27 05:45:11 2010
New Revision: 948678
URL: http://svn.apache.org/viewvc?rev=948678&view=rev
Log:
TOBAGO-885: Add possibility to reset the column sizes of a sheet.
- method sign. without FacesContext
Modified:
myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/component/UIData.java
myfaces/tobago/branches/tobago-1.0.x/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/overview/OverviewController.java
Modified: myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/component/UIData.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/component/UIData.java?rev=948678&r1=948677&r2=948678&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/component/UIData.java (original)
+++ myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/component/UIData.java Thu May 27 05:45:11 2010
@@ -102,8 +102,8 @@ public class UIData extends javax.faces.
private transient LayoutTokens columnLayout;
- public void resetColumnWidths(FacesContext facesContext) {
- SheetState state = getSheetState(facesContext);
+ public void resetColumnWidths() {
+ SheetState state = getSheetState(FacesContext.getCurrentInstance());
if (state != null) {
state.setColumnWidths(null);
}
Modified: myfaces/tobago/branches/tobago-1.0.x/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/overview/OverviewController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/overview/OverviewController.java?rev=948678&r1=948677&r2=948678&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/overview/OverviewController.java (original)
+++ myfaces/tobago/branches/tobago-1.0.x/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/overview/OverviewController.java Thu May 27 05:45:11 2010
@@ -161,9 +161,12 @@ public class OverviewController {
}
public void resetColumnWidths(ActionEvent event) {
- FacesContext facesContext = FacesContext.getCurrentInstance();
final UIData sheet = (UIData) event.getComponent().findComponent("sheet");
- sheet.resetColumnWidths(facesContext);
+ if (sheet != null) {
+ sheet.resetColumnWidths();
+ } else {
+ LOG.warn("Didn't find sheet component!");
+ }
}
public void sheetSorter(ActionEvent event) {