JBoss Rich Faces SVN: r8322 - trunk/test-applications/facelets/src/main/java/pickList.
by richfaces-svn-commits@lists.jboss.org
Author: gmaksimenko
Date: 2008-04-29 10:39:59 -0400 (Tue, 29 Apr 2008)
New Revision: 8322
Modified:
trunk/test-applications/facelets/src/main/java/pickList/PickList.java
Log:
Erase tests for dir and size attributes.
Modified: trunk/test-applications/facelets/src/main/java/pickList/PickList.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/pickList/PickList.java 2008-04-29 14:37:30 UTC (rev 8321)
+++ trunk/test-applications/facelets/src/main/java/pickList/PickList.java 2008-04-29 14:39:59 UTC (rev 8322)
@@ -13,7 +13,6 @@
public class PickList {
public String copyAllControlLabel;
public String copyControlLabel;
- public String dir;
public boolean disabled;
public boolean fastOrderControlsVisible;
public boolean immediate;
@@ -24,7 +23,6 @@
public String removeControlLabel;
public boolean rendered;
public boolean showButtonLabels;
- public int size;
public String sourceListWidth;
public boolean switchByClick;
public String targetListWidth;
@@ -41,7 +39,6 @@
public PickList() {
this.copyAllControlLabel = "copyAllControlLabel";
this.copyControlLabel = "copyControlLabel";
- this.dir = "alert('work')";
this.disabled = false;
this.fastOrderControlsVisible = true;
this.immediate = false;
@@ -53,7 +50,6 @@
this.removeControlLabel = "removeControlLabel";
this.rendered = true;
this.showButtonLabels = true;
- this.size = 10;
this.sourceListWidth = "300";
this.switchByClick = false;
this.targetListWidth = "400";
@@ -133,14 +129,6 @@
this.copyControlLabel = copyControlLabel;
}
- public String getDir() {
- return dir;
- }
-
- public void setDir(String dir) {
- this.dir = dir;
- }
-
public boolean isDisabled() {
return disabled;
}
@@ -213,14 +201,6 @@
this.rendered = rendered;
}
- public int getSize() {
- return size;
- }
-
- public void setSize(int size) {
- this.size = size;
- }
-
public String getSourceListWidth() {
return sourceListWidth;
}
16 years, 7 months
JBoss Rich Faces SVN: r8321 - trunk/test-applications/jsp/src/main/java/dataTable.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-04-29 10:37:30 -0400 (Tue, 29 Apr 2008)
New Revision: 8321
Added:
trunk/test-applications/jsp/src/main/java/dataTable/Cell.java
trunk/test-applications/jsp/src/main/java/dataTable/Table.java
trunk/test-applications/jsp/src/main/java/dataTable/TestBean.java
Log:
new dataTable with dataGrid inside.
Added: trunk/test-applications/jsp/src/main/java/dataTable/Cell.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/dataTable/Cell.java (rev 0)
+++ trunk/test-applications/jsp/src/main/java/dataTable/Cell.java 2008-04-29 14:37:30 UTC (rev 8321)
@@ -0,0 +1,13 @@
+package dataTable;
+public class Cell {
+ private Integer value;
+
+ public Integer getValue() {
+ return value;
+ }
+
+ public void setValue(Integer value) {
+ this.value = value;
+ }
+
+}
Added: trunk/test-applications/jsp/src/main/java/dataTable/Table.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/dataTable/Table.java (rev 0)
+++ trunk/test-applications/jsp/src/main/java/dataTable/Table.java 2008-04-29 14:37:30 UTC (rev 8321)
@@ -0,0 +1,15 @@
+package dataTable;
+import java.util.ArrayList;
+import java.util.List;
+
+public class Table {
+ private List<Cell> cells = new ArrayList<Cell>();
+
+ public List<Cell> getCells() {
+ return cells;
+ }
+
+ public void setCells(List<Cell> cells) {
+ this.cells = cells;
+ }
+}
Added: trunk/test-applications/jsp/src/main/java/dataTable/TestBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/dataTable/TestBean.java (rev 0)
+++ trunk/test-applications/jsp/src/main/java/dataTable/TestBean.java 2008-04-29 14:37:30 UTC (rev 8321)
@@ -0,0 +1,73 @@
+package dataTable;
+import java.util.ArrayList;
+import java.util.List;
+import org.richfaces.component.html.HtmlDataGrid;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+public class TestBean {
+
+ private List<Table> tables = new ArrayList<Table>();
+ private HtmlDataGrid myDataGrid = null;
+ private String bindLabel;
+ private String elements;
+
+ public String getElements() {
+ return elements;
+ }
+
+ public void setElements(String elements) {
+ this.elements = elements;
+ }
+
+ public TestBean() {
+ Table t1 = new Table();
+ tables.add(t1);
+ t1.getCells().add(new Cell());
+ t1.getCells().add(new Cell());
+
+ Table t2 = new Table();
+ tables.add(t2);
+ t2.getCells().add(new Cell());
+ t2.getCells().add(new Cell());
+ bindLabel = "not ready";
+ elements = "0";
+ }
+
+ public String submit() {
+ return null;
+ }
+
+ public void submitAjax() {
+
+ }
+
+ public void checkBinding(ActionEvent actionEvent){
+ FacesContext context = FacesContext.getCurrentInstance();
+ bindLabel = myDataGrid.getBaseClientId(context);
+ }
+
+ public List<Table> getTables() {
+ return tables;
+ }
+
+ public void setTables(List<Table> tables) {
+ this.tables = tables;
+ }
+
+ public HtmlDataGrid getMyDataGrid() {
+ return myDataGrid;
+ }
+
+ public void setMyDataGrid(HtmlDataGrid myDataGrid) {
+ this.myDataGrid = myDataGrid;
+ }
+
+ public String getBindLabel() {
+ return bindLabel;
+ }
+
+ public void setBindLabel(String bindLabel) {
+ this.bindLabel = bindLabel;
+ }
+}
16 years, 7 months
JBoss Rich Faces SVN: r8320 - trunk/test-applications/jsp/src/main/webapp/DataTable.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-04-29 10:36:47 -0400 (Tue, 29 Apr 2008)
New Revision: 8320
Modified:
trunk/test-applications/jsp/src/main/webapp/DataTable/DataTable.jsp
trunk/test-applications/jsp/src/main/webapp/DataTable/DataTableProperty.jsp
Log:
var="cell" border="12px" dir="LTR"
elements="#{testBean.elements}" footerClass="style, test" headerClass="style,test"
onclick="#{event.onclick}"
ondblclick="#{event.ondblclick}"
onkeydown="#{event.onkeydown}"
onkeypress="#{event.onkeypress}"
onkeyup="#{event.onkeyup}"
onmousedown="#{event.onmousedown}"
onmousemove="#{event.onmousemove}"
onmouseout="#{event.onmouseout}"
onmouseover="#{event.onmouseover}"
onmouseup="#{event.onmouseup}"
onRowClick="#{event.onRowClick}"
onRowDblClick="#{event.onRowDblClick}"
onRowMouseDown="#{event.onRowMouseDown}"
onRowMouseMove="#{event.onRowMouseMove}"
onRowMouseOut="#{event.onRowMouseOut}"
onRowMouseOver="#{event.onRowMouseOver}"
onRowMouseUp="#{event.onRowMouseUp}"
rowKeyVar="myVar">
Modified: trunk/test-applications/jsp/src/main/webapp/DataTable/DataTable.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/DataTable/DataTable.jsp 2008-04-29 14:34:06 UTC (rev 8319)
+++ trunk/test-applications/jsp/src/main/webapp/DataTable/DataTable.jsp 2008-04-29 14:36:47 UTC (rev 8320)
@@ -75,4 +75,52 @@
<h:outputText value="#{dataTableID.total}" />
</rich:column>
</rich:dataTable>
+
+ <h1>Test page</h1>
+ <a4j:outputPanel id="panel">
+ <h:dataTable id="c1" border="1" value="#{testBean.tables}"
+ var="table">
+ <h:column>
+ <rich:dataGrid id="c2" columns="2" value="#{table.cells}"
+ var="cell" border="12px" dir="LTR"
+ elements="#{testBean.elements}" footerClass="style, test" headerClass="style,test"
+ onclick="#{event.onclick}"
+ ondblclick="#{event.ondblclick}"
+ onkeydown="#{event.onkeydown}"
+ onkeypress="#{event.onkeypress}"
+ onkeyup="#{event.onkeyup}"
+ onmousedown="#{event.onmousedown}"
+ onmousemove="#{event.onmousemove}"
+ onmouseout="#{event.onmouseout}"
+ onmouseover="#{event.onmouseover}"
+ onmouseup="#{event.onmouseup}"
+ onRowClick="#{event.onRowClick}"
+ onRowDblClick="#{event.onRowDblClick}"
+ onRowMouseDown="#{event.onRowMouseDown}"
+ onRowMouseMove="#{event.onRowMouseMove}"
+ onRowMouseOut="#{event.onRowMouseOut}"
+ onRowMouseOver="#{event.onRowMouseOver}"
+ onRowMouseUp="#{event.onRowMouseUp}"
+ rowKeyVar="myVar">
+
+ <f:facet name="header">
+ <f:verbatim>HEADER</f:verbatim>
+ </f:facet>
+
+ <h:outputLabel value="Value:" for="field" />
+ <h:inputText id="field" value="#{cell.value}" required="true"/>
+ <h:outputText value="rowKeyVar:"></h:outputText>
+ <h:outputText value="#{myVar}"></h:outputText>
+
+ <f:facet name="footer">
+ <f:verbatim>FOOTER</f:verbatim>
+ </f:facet>
+ </rich:dataGrid>
+ </h:column>
+ </h:dataTable>
+ <h:messages />
+ </a4j:outputPanel>
+ <h:commandButton action="#{testBean.submit}" value="Submit" />
+ <a4j:commandButton action="#{testBean.submitAjax}" value="Submit Ajax" reRender="panel"/>
+
</f:subview>
Modified: trunk/test-applications/jsp/src/main/webapp/DataTable/DataTableProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/DataTable/DataTableProperty.jsp 2008-04-29 14:34:06 UTC (rev 8319)
+++ trunk/test-applications/jsp/src/main/webapp/DataTable/DataTableProperty.jsp 2008-04-29 14:36:47 UTC (rev 8320)
@@ -33,5 +33,8 @@
<h:outputText value=" row 2 rendered" />
<h:selectBooleanCheckbox value="#{dataTable.r2rendered}" onclick="submit();" />
+
+ <h:outputText value="elements:"></h:outputText>
+ <h:outputText value="#{testBean.elements}"></h:outputText>
</h:panelGrid>
</f:subview>
\ No newline at end of file
16 years, 7 months
JBoss Rich Faces SVN: r8319 - trunk/ui/panelmenu/src/test/java/org/richfaces/renderkit/html/iconimages.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-04-29 10:34:06 -0400 (Tue, 29 Apr 2008)
New Revision: 8319
Modified:
trunk/ui/panelmenu/src/test/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasicTest.java
Log:
http://jira.jboss.com/jira/browse/RF-3272
JUnit test fixed.
Modified: trunk/ui/panelmenu/src/test/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasicTest.java
===================================================================
--- trunk/ui/panelmenu/src/test/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasicTest.java 2008-04-29 14:33:53 UTC (rev 8318)
+++ trunk/ui/panelmenu/src/test/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasicTest.java 2008-04-29 14:34:06 UTC (rev 8319)
@@ -34,7 +34,7 @@
Color color1 = HtmlColor.decode(headerTextColor);
- byte [] data = (byte []) icon.getDataToStore(facesContext, null);
+ byte [] data = (byte []) icon.getDataToStore(facesContext, new Boolean(true));
assertNotNull(data);
16 years, 7 months
JBoss Rich Faces SVN: r8317 - trunk/test-applications/facelets/src/main/webapp/PickList.
by richfaces-svn-commits@lists.jboss.org
Author: gmaksimenko
Date: 2008-04-29 10:30:00 -0400 (Tue, 29 Apr 2008)
New Revision: 8317
Modified:
trunk/test-applications/facelets/src/main/webapp/PickList/PickList.xhtml
Log:
Erase tests for onblur, onchange and onfocus events
Modified: trunk/test-applications/facelets/src/main/webapp/PickList/PickList.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/PickList/PickList.xhtml 2008-04-29 14:29:20 UTC (rev 8316)
+++ trunk/test-applications/facelets/src/main/webapp/PickList/PickList.xhtml 2008-04-29 14:30:00 UTC (rev 8317)
@@ -23,12 +23,15 @@
targetListWidth="#{pickList.targetListWidth}" size="#{pickList.size}"
required="#{pickList.required}"
requiredMessage="#{pickList.requiredMessage}"
- onclick="#{event.onclick}" onblur="#{event.onblur}"
- onchange="#{event.onchange}" ondblclick="#{event.ondblclick}"
- onfocus="#{event.onfocus}" onkeydown="#{event.onkeydown}"
- onkeypress="#{event.onkeypress}" onkeyup="#{event.onkeyup}"
- onmousedown="#{event.onmousedown}" onmousemove="#{event.onmousemove}"
- onmouseout="#{event.onmouseout}" onmouseover="#{event.onmouseover}"
+ onclick="#{event.onclick}"
+ ondblclick="#{event.ondblclick}"
+ onkeydown="#{event.onkeydown}"
+ onkeypress="#{event.onkeypress}"
+ onkeyup="#{event.onkeyup}"
+ onmousedown="#{event.onmousedown}"
+ onmousemove="#{event.onmousemove}"
+ onmouseout="#{event.onmouseout}"
+ onmouseover="#{event.onmouseover}"
onmouseup="#{event.onmouseup}"
binding="#{pickList.myPickList}"
lang="#{pickList.lang}">
16 years, 7 months
JBoss Rich Faces SVN: r8316 - in trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit: html/iconimages and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-04-29 10:29:20 -0400 (Tue, 29 Apr 2008)
New Revision: 8316
Modified:
trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java
trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasic.java
Log:
http://jira.jboss.com/jira/browse/RF-3272
Modified: trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java
===================================================================
--- trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java 2008-04-29 14:28:07 UTC (rev 8315)
+++ trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java 2008-04-29 14:29:20 UTC (rev 8316)
@@ -102,41 +102,34 @@
UIComponent component){
String source = "";
- String color = "";
- Skin skin = getSkin(context);
-
- if (isTopLevel){
- color = (String) skin.getParameter(context,"panelmenu.headerBulletColor");
- } else {
- color = (String) skin.getParameter(context,"panelmenu.itemBulletColor");
- }
+
+ Boolean topLevel = new Boolean(isTopLevel);
+
if(iconType != null && !iconType.equals("none")){
if (iconType.equals("custom") || "".equals(iconType)){
- source = getResource(PanelMenuIconSpacer.class.getName()).getUri(context, color);
+ source = getResource(PanelMenuIconSpacer.class.getName()).getUri(context, topLevel);
} else if (iconType.equals("spacer")){
- source = getResource(PanelMenuIconSpacer.class.getName()).getUri(context, color);
+ source = getResource(PanelMenuIconSpacer.class.getName()).getUri(context, topLevel);
} else if (iconType.equals("triangle")) {
- source = getResource(PanelMenuIconTriangle.class.getName()).getUri(context, color);
+ source = getResource(PanelMenuIconTriangle.class.getName()).getUri(context, topLevel);
} else if (iconType.equals("triangleLeft")) {
- source = getResource(PanelMenuIconTriangleLeft.class.getName()).getUri(context, color);
+ source = getResource(PanelMenuIconTriangleLeft.class.getName()).getUri(context, topLevel);
} else if (iconType.equals("triangleDown")) {
- source = getResource(PanelMenuIconTriangleDown.class.getName()).getUri(context, color);
+ source = getResource(PanelMenuIconTriangleDown.class.getName()).getUri(context, topLevel);
} else if (iconType.equals("triangleUp")) {
- source = getResource(PanelMenuIconTriangleUp.class.getName()).getUri(context, color);
+ source = getResource(PanelMenuIconTriangleUp.class.getName()).getUri(context, topLevel);
} else if (iconType.equals("chevron")) {
- source = getResource(PanelMenuIconChevron.class.getName()).getUri(context, color);
+ source = getResource(PanelMenuIconChevron.class.getName()).getUri(context, topLevel);
} else if (iconType.equals("chevronLeft")) {
- source = getResource(PanelMenuIconChevronLeft.class.getName()).getUri(context, color);
+ source = getResource(PanelMenuIconChevronLeft.class.getName()).getUri(context, topLevel);
} else if (iconType.equals("chevronUp")) {
- source = getResource(PanelMenuIconChevronUp.class.getName()).getUri(context, color);
+ source = getResource(PanelMenuIconChevronUp.class.getName()).getUri(context, topLevel);
} else if (iconType.equals("chevronDown")) {
- source = getResource(PanelMenuIconChevronDown.class.getName()).getUri(context, color);
-// } else if (iconType.equals("square")) {
-// source = getResource(PanelMenuIconSquare.class.getName()).getUri(context, color);
+ source = getResource(PanelMenuIconChevronDown.class.getName()).getUri(context, topLevel);
} else if (iconType.equals("disc")) {
- source = getResource(PanelMenuIconDisc.class.getName()).getUri(context, color);
+ source = getResource(PanelMenuIconDisc.class.getName()).getUri(context, topLevel);
} else if (iconType.equals("grid")) {
- source = getResource(PanelMenuIconGrid.class.getName()).getUri(context, color);
+ source = getResource(PanelMenuIconGrid.class.getName()).getUri(context, topLevel);
} else {
//TODO by nick - dima - TemplateContext is deprecated and shouldn't be used
source = (String)getUtils().encodeResourceURL(new TemplateContext(this,context,component),iconType);
Modified: trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasic.java
===================================================================
--- trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasic.java 2008-04-29 14:28:07 UTC (rev 8315)
+++ trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasic.java 2008-04-29 14:29:20 UTC (rev 8316)
@@ -43,6 +43,8 @@
*
*/
public abstract class PanelMenuIconBasic extends Java2Dresource {
+ private static final String TOP_BULLET_COLOR = "headerTextColor";
+ private static final String ORDINAL_BULLET_COLOR = "headerBackgroundColor";
public PanelMenuIconBasic() {
setRenderer(new GifRenderer());
@@ -93,22 +95,23 @@
byte[] ret = new byte[3];
Color color = null;
+ String skinParameter = ORDINAL_BULLET_COLOR;
- if (data!=null){
- color = HtmlColor.decode(data.toString());
- } else {
- String skinParameter = "headerTextColor";
- String headerTextColor = (String) skin.getParameter(context, skinParameter);
- if (null == headerTextColor || "".equals(headerTextColor))
- headerTextColor = (String) defaultSkin.getParameter(context, skinParameter);
-
- if(headerTextColor == null) {
- return null;
+ if (data != null) {
+ if (((Boolean)data).booleanValue()) {
+ skinParameter = TOP_BULLET_COLOR;
}
-
- color = HtmlColor.decode(headerTextColor);
}
+ String headerTextColor = (String) skin.getParameter(context, skinParameter);
+ if (null == headerTextColor || "".equals(headerTextColor))
+ headerTextColor = (String) defaultSkin.getParameter(context, skinParameter);
+ if(headerTextColor == null) {
+ return null;
+ }
+
+ color = HtmlColor.decode(headerTextColor);
+
new Zipper2(ret).addColor(color);
return ret;
16 years, 7 months
JBoss Rich Faces SVN: r8315 - trunk/test-applications/jsp/src/main/webapp/PickList.
by richfaces-svn-commits@lists.jboss.org
Author: gmaksimenko
Date: 2008-04-29 10:28:07 -0400 (Tue, 29 Apr 2008)
New Revision: 8315
Modified:
trunk/test-applications/jsp/src/main/webapp/PickList/PickList.jsp
Log:
Erase tests for onblur, onchange and onfocus events
Modified: trunk/test-applications/jsp/src/main/webapp/PickList/PickList.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/PickList/PickList.jsp 2008-04-29 14:25:49 UTC (rev 8314)
+++ trunk/test-applications/jsp/src/main/webapp/PickList/PickList.jsp 2008-04-29 14:28:07 UTC (rev 8315)
@@ -22,15 +22,17 @@
targetListWidth="#{pickList.targetListWidth}"
required="#{pickList.required}"
requiredMessage="#{pickList.requiredMessage}"
- onclick="#{event.onclick}" onblur="#{event.onblur}"
- onchange="#{event.onchange}" ondblclick="#{event.ondblclick}"
- onfocus="#{event.onfocus}" onkeydown="#{event.onkeydown}"
- onkeypress="#{event.onkeypress}" onkeyup="#{event.onkeyup}"
- onmousedown="#{event.onmousedown}" onmousemove="#{event.onmousemove}"
- onmouseout="#{event.onmouseout}" onmouseover="#{event.onmouseover}"
+ onclick="#{event.onclick}"
+ ondblclick="#{event.ondblclick}"
+ onkeydown="#{event.onkeydown}"
+ onkeypress="#{event.onkeypress}"
+ onkeyup="#{event.onkeyup}"
+ onmousedown="#{event.onmousedown}"
+ onmousemove="#{event.onmousemove}"
+ onmouseout="#{event.onmouseout}"
+ onmouseover="#{event.onmouseover}"
onmouseup="#{event.onmouseup}"
- binding="#{pickList.myPickList}"
- >
+ binding="#{pickList.myPickList}">
<f:selectItems value="#{pickList.data}"/>
</rich:pickList>
<h:panelGrid columns="2">
16 years, 7 months
JBoss Rich Faces SVN: r8314 - trunk/test-applications/jsp/src/main/webapp/ComponentControl.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2008-04-29 10:25:49 -0400 (Tue, 29 Apr 2008)
New Revision: 8314
Modified:
trunk/test-applications/jsp/src/main/webapp/ComponentControl/ComponentControl.jsp
Log:
http://jira.jboss.com/jira/browse/RF-1531
Modified: trunk/test-applications/jsp/src/main/webapp/ComponentControl/ComponentControl.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/ComponentControl/ComponentControl.jsp 2008-04-29 14:10:11 UTC (rev 8313)
+++ trunk/test-applications/jsp/src/main/webapp/ComponentControl/ComponentControl.jsp 2008-04-29 14:25:49 UTC (rev 8314)
@@ -4,7 +4,12 @@
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<f:subview id="componentControlSubviewID">
-
+<rich:componentControl attachTo="testCID" attachTiming="onavailable" for="cc" event="onclick" operation="doExpand" params="show:'componentControl work(doExpand)'"/>
+<rich:calendar popup="true" id="cc"/>
+<f:verbatim>
+ <a href="#" id="testCID">Click text(attachTiming)</a>
+ <br />
+</f:verbatim>
<h:inputText value="test">
<rich:componentControl name="controlMe" event="onclick" attachTiming="onload" for="ccToltipID" operation="show" />
</h:inputText>
16 years, 7 months
JBoss Rich Faces SVN: r8313 - trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-04-29 10:10:11 -0400 (Tue, 29 Apr 2008)
New Revision: 8313
Modified:
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js
Log:
RF-3247
Modified: trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js
===================================================================
--- trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2008-04-29 14:06:50 UTC (rev 8312)
+++ trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2008-04-29 14:10:11 UTC (rev 8313)
@@ -368,22 +368,31 @@
},
updateHeaders : function() {
- var cols = this.getColumns();
- for(var i = 0; i < cols.length; i++) {
- var th = cols[i].object.getElement();
- var div = th.firstChild;
- var icon = this._getCellElements(i)[1];
+ var length = this.frozenCells.length;
+ var posX = 0;
+ for(var j=0; j<length; j++) {
+ posX = this.updateHeader(posX, this.frozenCells[j]);
+ }
+ length = this.cells.length - 1;
+ posX = 0;
+ for(var j=0; j<length; j++) {
+ posX = this.updateHeader(posX, this.cells[j]);
+ }
+ },
+
+ updateHeader : function(posX, th) {
+ var icon = $(this.gridId + ":hs_" + th.id.split("_").last());
+ posX += th.offsetWidth;
+ if (icon) {
+ var newPosX = posX - icon.getWidth();
+ var newPosY = (th.clientHeight - icon.offsetHeight)/2;
- if (icon) {
- var newPosX = th.offsetLeft + div.clientWidth - icon.getWidth();
- var newPosY = (div.clientHeight - icon.offsetHeight)/2;
-
- newPosX = Math.floor(newPosX);
- newPosY = Math.floor(newPosY);
-
- icon.setStyle({left: newPosX + "px",top: newPosY + "px", visibility : "inherit"});
- }
+ newPosX = Math.floor(newPosX);
+ newPosY = Math.floor(newPosY);
+
+ icon.setStyle({left: newPosX + "px",top: newPosY + "px", visibility : "inherit"});
}
+ return posX;
},
adjustColumnWidth: function(column, width) {
16 years, 7 months