JBoss Rich Faces SVN: r1299 - trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-06-25 12:27:16 -0400 (Mon, 25 Jun 2007)
New Revision: 1299
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java
Log:
fix create of scrolling event
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-06-25 16:25:32 UTC (rev 1298)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-06-25 16:27:16 UTC (rev 1299)
@@ -1,8 +1,10 @@
package org.richfaces.renderkit.html;
import java.io.IOException;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
+import java.util.List;
import java.util.Map;
import javax.faces.component.UIComponent;
@@ -123,8 +125,6 @@
renderChild(context, component);
}
headerCellTemplate.encodeEnd(context, column);
-
-
}
};
@@ -187,7 +187,7 @@
UIScrollableGrid grid = state.getGrid();
grid.setRowKey(rowKey);
-
+
if(grid.isRowAvailable() || state.isFake()){
String row_id;
@@ -244,6 +244,7 @@
UIScrollableGrid grid = state.getGrid();
Collection collection = grid.getResponseData();
+
grid.setRowKey(rowKey);
ResponseWriter writer = context.getResponseWriter();
state.setFrozenColumnCount(GridUtils.getFrozenColumnsCount(grid));
@@ -375,12 +376,15 @@
state.setFrozenColumnCount(GridUtils.getFrozenColumnsCount(grid));
state.setFrozenPart(isFrozen);
state.setClientId(grid.getClientId(context));
+
grid.walk(context, rowsRenderer, state);
+
int fakeRowsCount = grid.getRows() - grid.getRowCount();
state.setFake(true);
for (int i = 0; i < fakeRowsCount; i++) {
rowsRenderer.process(context, null, state);
}
+
state.setFake(false);
grid.setRowKey(null);
}
@@ -459,6 +463,8 @@
JSFunction function = AjaxRendererUtils.buildAjaxFunction(grid, context);
Map options = AjaxRendererUtils.buildEventOptions(context, grid);
options.put("oncomplete", AjaxFunctionBuilder.getOnComplete(context, grid, this, AjaxFunctionBuilder.SCROLL));
+ Map parametersMap = (Map)options.get("parameters");
+ parametersMap.put(grid.getBaseClientId(context) + ":scroll", "");
function.addParameter(options);
String completeFunction = function.toScript()+"; return false;";
@@ -547,9 +553,10 @@
}
}
- if(parameters.containsKey(clientId + "_state_input") && !sorted){
+
+ if(parameters.containsKey(clientId + ":scroll") && !sorted){
+
String submitedState = (String)parameters.get(clientId + "_state_input");
-
boolean isEmpty = true;
@@ -565,18 +572,13 @@
grid.getAttributes().put(GridUtils.CLIENT_ROW_KEY,Integer.valueOf(values[2]));
rows = Integer.parseInt(values[0]);
first = Integer.parseInt(values[1]);
-
- }else{
- grid.getAttributes().put(GridUtils.CLIENT_ROW_KEY, new Integer(0));
- rows = grid.getRows();
- }
-
- ScrollEvent scrollEvent = new ScrollEvent(grid,rows,first);
- grid.queueEvent(scrollEvent);
+ ScrollEvent scrollEvent = new ScrollEvent(grid,rows,first);
+ grid.queueEvent(scrollEvent);
- if (ajaxContext.isAjaxRequest()) {
- component.getAttributes().put(PARTIAL_UPDATE, Boolean.TRUE);
- }
+ if (ajaxContext.isAjaxRequest()) {
+ component.getAttributes().put(PARTIAL_UPDATE, Boolean.TRUE);
+ }
+ }
}
}
17 years, 6 months
JBoss Rich Faces SVN: r1298 - trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/converters.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-06-25 12:25:32 -0400 (Mon, 25 Jun 2007)
New Revision: 1298
Modified:
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/converters/JiraUserConverter.java
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/converters/PriorityConverter.java
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/converters/StatusConverter.java
Log:
add converters for priority, jira user, status fields
Modified: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/converters/JiraUserConverter.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/converters/JiraUserConverter.java 2007-06-25 16:24:45 UTC (rev 1297)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/converters/JiraUserConverter.java 2007-06-25 16:25:32 UTC (rev 1298)
@@ -37,7 +37,8 @@
public Object getAsObject(FacesContext context, UIComponent component,
String value) throws ConverterException{
- JiraUser user = findUser(value);
+ JiraUser user = findUser(value);
+// System.out.println("JiraUserConverter.getAsObject()");
if( user == null){
FacesMessage errorMessage = ConverterUtils.createTypeErrorMessage(value,"real jira username");
throw new ConverterException(errorMessage);
@@ -52,6 +53,7 @@
if(value instanceof JiraUser){
jiraUser = (JiraUser)value;
+// System.out.println("JiraUserConverter.getAsString()");
}else{
FacesMessage errorMessage = ConverterUtils.createTypeErrorMessage(value.getClass().getName(), JiraUser.class.getName());
throw new ConverterException(errorMessage);
Modified: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/converters/PriorityConverter.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/converters/PriorityConverter.java 2007-06-25 16:24:45 UTC (rev 1297)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/converters/PriorityConverter.java 2007-06-25 16:25:32 UTC (rev 1298)
@@ -48,7 +48,7 @@
int pr_id = Integer.parseInt(value);
int id = -1;
-
+// System.out.println("PriorityConverter.getAsObject()");
switch (pr_id) {
case PRIORITY_BLOCKER:
id = 0;
@@ -84,6 +84,7 @@
Object value) throws ConverterException{
Priority priority = null;
+// System.out.println("PriorityConverter.getAsString()");
if(value instanceof Priority){
priority = (Priority)value;
Modified: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/converters/StatusConverter.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/converters/StatusConverter.java 2007-06-25 16:24:45 UTC (rev 1297)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/converters/StatusConverter.java 2007-06-25 16:25:32 UTC (rev 1298)
@@ -43,7 +43,7 @@
String value) throws ConverterException{
Status convertedValue = null;
-
+// System.out.println("StatusConverter.getAsObject()");
int st_id = Integer.parseInt(value);
int id = -1;
@@ -80,6 +80,7 @@
Object value) throws ConverterException{
Status status = null;
+// System.out.println("StatusConverter.getAsString()");
if(value instanceof Status){
status = (Status)value;
17 years, 6 months
JBoss Rich Faces SVN: r1297 - trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF/lib.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-06-25 12:24:45 -0400 (Mon, 25 Jun 2007)
New Revision: 1297
Added:
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF/lib/phaseTracker.jar
Log:
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF/lib/phaseTracker.jar
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF/lib/phaseTracker.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 6 months
JBoss Rich Faces SVN: r1296 - trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-06-25 12:24:27 -0400 (Mon, 25 Jun 2007)
New Revision: 1296
Modified:
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/scrollable-grid.xhtml
Log:
remove a4j panel
Modified: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/scrollable-grid.xhtml
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/scrollable-grid.xhtml 2007-06-25 16:23:48 UTC (rev 1295)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/scrollable-grid.xhtml 2007-06-25 16:24:27 UTC (rev 1296)
@@ -11,7 +11,7 @@
<style type="text/css">
.inputStyle{
font-family:arial;
- font-size:6pt;
+ font-size:8pt;
font-size-adjust:none;
font-stretch:normal;
font-style:normal;
@@ -168,11 +168,8 @@
</sg:scrollable-grid>
<h:commandButton value="submit"></h:commandButton>
-
+ <h:messages showDetail="true"/>
</h:form>
- <a4j:outputPanel ajaxRendered="true">
- <h:messages showDetail="true"/>
- </a4j:outputPanel>
</f:view>
</body>
</html>
\ No newline at end of file
17 years, 6 months
JBoss Rich Faces SVN: r1295 - trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-06-25 12:23:48 -0400 (Mon, 25 Jun 2007)
New Revision: 1295
Modified:
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/ChannelDataModel2.java
Log:
add getId method
Modified: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/ChannelDataModel2.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/ChannelDataModel2.java 2007-06-25 15:41:45 UTC (rev 1294)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/ChannelDataModel2.java 2007-06-25 16:23:48 UTC (rev 1295)
@@ -53,6 +53,12 @@
return channel.findIssueByKey((Key) id);
}
+
+ @Override
+ public Object getId(Object o) {
+ Issue issue = (Issue)o;
+ return issue.getKey();
+ }
/* (non-Javadoc)
* @see org.richfaces.model.GridDataModel#loadData(int, int, org.richfaces.model.SortOrder)
17 years, 6 months
JBoss Rich Faces SVN: r1294 - in trunk/sandbox/tooltip: design and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-06-25 11:41:45 -0400 (Mon, 25 Jun 2007)
New Revision: 1294
Added:
trunk/sandbox/tooltip/design/
trunk/sandbox/tooltip/design/funcspec/
trunk/sandbox/tooltip/design/funcspec/FuncSpec - RF Tool Tip Component.doc
Modified:
trunk/sandbox/tooltip/
Log:
Functional Spec. added
Property changes on: trunk/sandbox/tooltip
___________________________________________________________________
Name: svn:ignore
+ target
Added: trunk/sandbox/tooltip/design/funcspec/FuncSpec - RF Tool Tip Component.doc
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox/tooltip/design/funcspec/FuncSpec - RF Tool Tip Component.doc
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 6 months
JBoss Rich Faces SVN: r1293 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-06-25 10:44:56 -0400 (Mon, 25 Jun 2007)
New Revision: 1293
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml
Log:
added new questions
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml 2007-06-25 12:44:28 UTC (rev 1292)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml 2007-06-25 14:44:56 UTC (rev 1293)
@@ -1,76 +1,121 @@
<?xml version='1.0' encoding='UTF-8'?>
<chapter id="FAQ" xreflabel="FAQ">
- <?dbhtml filename="FAQ.html"?>
- <sectioninfo>
- <keywordset>
- <keyword>RichFaces</keyword>
- </keywordset>
- </sectioninfo>
- <title>FAQ</title>
-
- <section>
- <?dbhtml filename="Wherearebinary/sourcedistributionforRichFacesrelease.html"?>
- <title>Where are binary/source distribution for RichFaces 3.0.1 release?</title>
- <para> JBoss RichFaces downloads could be found <ulink url="http://labs.jboss.com/jbossrichfaces/downloads">here</ulink>. </para>
- <para> The version is tagged in SVN and put in the Jboss Maven <ulink url="http://repository.jboss.com/maven2/org/richfaces/richfaces/3.0.1/">repo</ulink>.</para>
- <para> Ajax4jsf binary is also available <ulink url="http://jboss.com/index.html?module=bb&op=viewtopic&t=110267">here</ulink>.</para>
- <para> Most important links for RichFaces can be found <ulink url="http://jboss.com/index.html?module=bb&op=viewtopic&t=104575">here</ulink>.</para>
- </section>
-
- <section id="Wherearethesnapshots">
- <?dbhtml filename="Wherearethesnapshots.html"?>
- <title>Where are the snapshots?</title>
- <para> Nightly builds are available <ulink url="http://maven.exadel.com/org/richfaces/richfaces/3.0.2-SNAPSHOT/">here</ulink> for RichFaces and <ulink url="http://maven.exadel.com/org/ajax4jsf/ajax4jsf/1.1.2-SNAPSHOT/">here</ulink> for Ajax.</para>
- <para> RichFaces JSF components library Tag library documentation can be found <ulink url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone...">here</ulink>.</para>
- <para> RichFaces JSF components library 3.0.2-SNAPSHOT API can be found <ulink url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone...">here</ulink>.</para>
- </section>
-
- <section>
- <?dbhtml filename="HowtobuildRichFacessnapshotmanually"?>
- <title>How to build RichFaces snapshot manually?</title>
- <para>As it was mentioned <ulink url="index.html#Wherearethesnapshots"> before </ulink> you can download the snapshots or you can build them manually. This <ulink url="http://labs.jboss.com/wiki/HowToBuildRichFacesSnapshotManually."> wiki article </ulink> helps you.</para>
- </section>
-
- <section>
- <?dbhtml filename="WhatstructureofRichFacesSVNrepositoryis"?>
- <title>What structure of RichFaces SVN repository is?</title>
- <para>RichFaces repository structure overview can be found <ulink url="http://labs.jboss.com/wiki/RichFacesRepositoryStructureOverview">here</ulink>.</para>
- </section>
-
- <section>
- <?dbhtml filename="Howtobuildrichfaces-samplesapplications"?>
- <title>How to build richfaces-samples applications?</title>
- <para>How to build and how to use richfaces-samples applications in Eclipse is described <ulink url="http://labs.jboss.com/wiki/RichFacesRepositoryStructureOverview">here</ulink>.</para>
- </section>
-
- <section>
- <?dbhtml filename="IstheredemoforRichFacescomponents"?>
- <title>Is there demo for RichFaces 3.0.1 components?</title>
- <para>Online demo Web applications that show the most important functionality of RichFaces components are available <ulink url="http://livedemo.exadel.com/richfaces-demo/">here</ulink>.</para>
- <para>War file of a nightly build can be found <ulink url="http://maven.exadel.com/org/richfaces/richfaces-demo/3.0.1-SNAPSHOT/">here</ulink>.</para>
- <para>Source Code (SVN) can be found <ulink url="http://anonsvn.jboss.org/repos/richfaces/trunk/richfaces-samples/richface...">here</ulink>.</para>
- </section>
-
- <section>
- <?dbhtml filename="HowtouseSkinnability"?>
- <title>How to use Skinnability?</title>
- <para><ulink url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=111143">Here</ulink> is an article that explains the Skinnability basics.</para>
- <para>Also, the effect of predefined skins on the application whole look-and-feel could be seen <ulink url="http://livedemo.exadel.com/richfaces-demo/">here</ulink>.</para>
- </section>
-
- <section>
- <?dbhtml filename="WhyRichFaceslibrarycondataTablecomp"?>
- <title>Why RichFaces library contains rich:dataTable component if the standard h:dataTable exists?</title>
- <para>The answer could be found <ulink url="http://labs.jboss.com/wiki/RichFacesArticleDataTable">here</ulink>.</para>
- <para>Source code (SVN) could be found <ulink url="http://anonsvn.jboss.org/repos/richfaces/trunk/richfaces-samples/richface...">here</ulink>.</para>
- <para> Online demo for a Web application is available <ulink url=" http://livedemo.exadel.com/richfaces-art-datatable/">here</ulink>.</para>
- </section>
-
- <section>
- <?dbhtml filename="WhyRichFaceslibrarycondataTablecomp"?>
- <title>How to organize wizards using the rich:modalPanel?</title>
- <para>It’s necessary to put a4j:include inside the rich:modal panel and perform navigation inside it, as it's shown in the example below:</para>
- <programlisting role="XML"><![CDATA[...
+ <?dbhtml filename="FAQ.html"?>
+ <sectioninfo>
+ <keywordset>
+ <keyword>RichFaces</keyword>
+ </keywordset>
+ </sectioninfo>
+ <title>FAQ</title>
+
+ <section>
+ <?dbhtml filename="Wherearebinary/sourcedistributionforRichFacesrelease.html"?>
+ <title>Where are binary/source distribution for RichFaces 3.0.1 release?</title>
+ <para> JBoss RichFaces downloads could be found <ulink
+ url="http://labs.jboss.com/jbossrichfaces/downloads">here</ulink>. </para>
+ <para> The version is tagged in SVN and put in the Jboss Maven <ulink
+ url="http://repository.jboss.com/maven2/org/richfaces/richfaces/3.0.1/"
+ >repo</ulink>.</para>
+ <para> Ajax4jsf binary is also available <ulink
+ url="http://jboss.com/index.html?module=bb&op=viewtopic&t=110267"
+ >here</ulink>.</para>
+ <para> Most important links for RichFaces can be found <ulink
+ url="http://jboss.com/index.html?module=bb&op=viewtopic&t=104575"
+ >here</ulink>.</para>
+ </section>
+
+ <section id="Wherearethesnapshots">
+ <?dbhtml filename="Wherearethesnapshots.html"?>
+ <title>Where are the snapshots?</title>
+ <para> Nightly builds are available <ulink
+ url="http://maven.exadel.com/org/richfaces/richfaces/3.0.2-SNAPSHOT/"
+ >here</ulink> for RichFaces and <ulink
+ url="http://maven.exadel.com/org/ajax4jsf/ajax4jsf/1.1.2-SNAPSHOT/"
+ >here</ulink> for Ajax.</para>
+ <para> RichFaces JSF components library Tag library documentation can be found
+ <ulink
+ url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
+ >here</ulink>.</para>
+ <para> RichFaces JSF components library 3.0.2-SNAPSHOT API can be found <ulink
+ url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
+ >here</ulink>.</para>
+ </section>
+
+ <section>
+ <?dbhtml filename="HowtobuildRichFacessnapshotmanually"?>
+ <title>How to build RichFaces snapshot manually?</title>
+ <para>As it was mentioned <ulink url="index.html#Wherearethesnapshots">
+ before</ulink> you can download the snapshots or you can build them
+ manually. This <ulink
+ url="http://labs.jboss.com/wiki/HowToBuildRichFacesSnapshotManually."
+ > wiki article </ulink> helps you.</para>
+ </section>
+
+ <section>
+ <?dbhtml filename="WhatstructureofRichFacesSVNrepositoryis"?>
+ <title>What structure of RichFaces SVN repository is?</title>
+ <para>RichFaces repository structure overview can be found <ulink
+ url="http://labs.jboss.com/wiki/RichFacesRepositoryStructureOverview"
+ >here</ulink>.</para>
+ </section>
+
+ <section>
+ <?dbhtml filename="Howtobuildrichfaces-samplesapplications"?>
+ <title>How to build richfaces-samples applications?</title>
+ <para>How to build and how to use richfaces-samples applications in Eclipse is
+ described <ulink
+ url="http://labs.jboss.com/wiki/RichFacesRepositoryStructureOverview"
+ >here</ulink>.</para>
+ </section>
+
+ <section>
+ <?dbhtml filename="IstheredemoforRichFacescomponents"?>
+ <title>Is there demo for RichFaces 3.0.1 components?</title>
+ <para>Online demo Web applications that show the most important functionality of
+ RichFaces components are available <ulink
+ url="http://livedemo.exadel.com/richfaces-demo/">here</ulink>.</para>
+ <para>War file of a nightly build can be found <ulink
+ url="http://maven.exadel.com/org/richfaces/richfaces-demo/3.0.1-SNAPSHOT/"
+ >here</ulink>.</para>
+ <para>Source Code (SVN) can be found <ulink
+ url="http://anonsvn.jboss.org/repos/richfaces/trunk/richfaces-samples/richface..."
+ >here</ulink>.</para>
+ </section>
+
+ <section>
+ <?dbhtml filename="HowtouseSkinnability"?>
+ <title>How to use Skinnability?</title>
+ <para><ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=111143"
+ >Here</ulink> is an article that explains the Skinnability basics.</para>
+ <para>Also, the effect of predefined skins on the application whole look-and-feel
+ could be seen <ulink url="http://livedemo.exadel.com/richfaces-demo/"
+ >here</ulink>.</para>
+ </section>
+
+ <section>
+ <?dbhtml filename="WhyRichFaceslibrarycondataTablecomp"?>
+ <title>Why RichFaces library contains <rich:dataTable> component if
+ the standard <h:dataTable> exists?</title>
+ <para>The answer could be found <ulink
+ url="http://labs.jboss.com/wiki/RichFacesArticleDataTable"
+ >here</ulink>.</para>
+ <para>Source code (SVN) could be found <ulink
+ url="http://anonsvn.jboss.org/repos/richfaces/trunk/richfaces-samples/richface..."
+ >here</ulink>.</para>
+ <para> Online demo for a Web application is available <ulink
+ url=" http://livedemo.exadel.com/richfaces-art-datatable/"
+ >here</ulink>.</para>
+ </section>
+
+ <section>
+ <?dbhtml filename="WhyRichFaceslibrarycondataTablecomp"?>
+ <title>How to organize wizards using the <rich:modalPanel> component?</title>
+ <para>It's necessary to put <emphasis role="bold"
+ ><a4j:include></emphasis> inside the <emphasis
+ role="bold"><rich:modalPanel></emphasis> and perform
+ navigation inside it, as it's shown in the example below:</para>
+ <programlisting role="XML"><![CDATA[...
<rich:modalPanel id="mp" minHeight="200" minWidth="450" height="200" width="500" zindex="2000">
<f:facet name="header">
<h:outputText value="Modal Panel Title" />
@@ -80,14 +125,16 @@
</rich:modalPanel>
...
]]></programlisting>
- <para>For more information, follow the <ulink url="http://labs.jboss.com/wiki/ModalPanelWizards">link</ulink>.</para>
- </section>
-
- <section>
- <?dbhtml filename="Howtopreventmodalpanelfromclosure"?>
- <title>How to prevent modalPanel from closure if the validation inside fails?</title>
- <para>Simple code is placed below to provide such behavior.</para>
- <programlisting role="XML"><![CDATA[...
+ <para>For more information, follow the <ulink
+ url="http://labs.jboss.com/wiki/ModalPanelWizards"
+ >link</ulink>.</para>
+ </section>
+
+ <section>
+ <?dbhtml filename="Howtopreventmodalpanelfromclosure"?>
+ <title>How to prevent modalPanel from closure if the validation inside fails?</title>
+ <para>Simple code is placed below to provide such behavior.</para>
+ <programlisting role="XML"><![CDATA[...
<ui:define name="body">
<f:verbatim>
<a href="javascript:Richfaces.showModalPanel('_panel',{left:'auto', top:'auto'})">Show Modal Panel</a>
@@ -110,15 +157,25 @@
</ui:define>
...
]]></programlisting>
- </section>
-
- <section>
- <?dbhtml filename="HowtousesuggestionBox"?>
- <title>How to use suggestionBox inside the modalPanel content? When I use it the popup suggestion list doesn't show since it is behind the modalPanel.</title>
- <para>First of all to solve this problem you should use the latest versions of Ajax4JSF 1.1.2-SNAPSHOT and Richfaces 3.0.2-SNAPSHOT.</para>
- <para> Nightly builds are available <ulink url="http://maven.exadel.com/org/richfaces/richfaces/3.0.2-SNAPSHOT/">here</ulink> for RichFaces and <ulink url="http://maven.exadel.com/org/ajax4jsf/ajax4jsf/1.1.2-SNAPSHOT/">here</ulink> for Ajax.</para>
- <para>Also see the example of using suggestionBox inside the modalPanel content.</para>
- <programlisting role="XML"><![CDATA[...
+ </section>
+
+ <section>
+ <?dbhtml filename="HowtousesuggestionBox"?>
+ <title>How to use <rich:suggestionBox> inside the
+ <rich:modalPanel> content? When I use it the popup suggestion
+ list doesn't show since it is behind the modalPanel.</title>
+ <para>First of all to solve this problem you should use the latest versions of
+ Ajax4JSF 1.1.2-SNAPSHOT and Richfaces 3.0.2-SNAPSHOT.</para>
+ <para> Nightly builds are available <ulink
+ url="http://maven.exadel.com/org/richfaces/richfaces/3.0.2-SNAPSHOT/"
+ >here</ulink> for RichFaces and <ulink
+ url="http://maven.exadel.com/org/ajax4jsf/ajax4jsf/1.1.2-SNAPSHOT/"
+ >here</ulink> for Ajax.</para>
+ <para>Also the example of using <emphasis role="bold"
+ ><rich:suggestionBox></emphasis> inside the <emphasis
+ role="bold"><rich:modalPanel></emphasis> content is
+ placed below.</para>
+ <programlisting role="XML"><![CDATA[...
<ui:define name="body">
<a href="javascript:Richfaces.showModalPanel('panel',{left:'auto', top:'auto'})">Show</a>
<rich:modalPanel id="panel">
@@ -136,39 +193,110 @@
</ui:define>
...
]]></programlisting>
- <para>In this case the popup suggestion list is above the modalPanel.</para>
- </section>
-
+ <para>In this case the popup suggestion list is above the modalPanel.</para>
+ </section>
+
<section>
<?dbhtml filename="DoesRichFacesworkwithfacelets"?>
<title>Does RichFaces work with facelets?</title>
- <para>Main <ulink url="http://livedemo.exadel.com/richfaces-demo/"> demo</ulink>of RichFaces is a facelets based application. So, the answer is yes.</para>
+ <para>Main <ulink url="http://livedemo.exadel.com/richfaces-demo/"> demo</ulink> of
+ RichFaces is a facelets based application. So, the answer is yes.</para>
</section>
-
+
<section>
<?dbhtml filename="RerenderingPartPage.html"?>
- <title>How to reRender only particular row(s) of datatable?</title>
- <para>
- If you use "rich:dataTable" then you may use ajaxKeys attribute to bind the rowKeys to be reRendered there. After you need to point reRender on the whole table and only specified rows will be reRedered. Also you can see example about usage of "a4j:repeat" component
- <ulink url="http://livedemo.exadel.com/a4j-repeat/">here</ulink>.</para>
+ <title>How to reRender only particular row(s) of dataTable?</title>
+ <para> If you use <emphasis role="bold"><rich:dataTable></emphasis>
+ then you may use ajaxKeys attribute to bind the rowKeys to be reRendered
+ there. After you need to point reRender on the whole table and only
+ specified rows will be reRedered. Also the example of usage of <emphasis
+ role="bold"><a4j:repeat></emphasis> component are
+ available <ulink url="http://livedemo.exadel.com/a4j-repeat/"
+ >here</ulink>.</para>
</section>
-
+
<section>
<?dbhtml filename="Isitpossibletocreatedynamicmenu"?>
- <title>Is it possible to create dynamic menu using rich:dropDownMenu component?</title>
- <para>rich:dropDown menu is a standard JSF component. So, creation the menu dynamically from the Java Script code is the same as for any other jsf component.</para>
+ <title>Is it possible to create dynamic menu using <rich:dropDownMenu>
+ component?</title>
+ <para><emphasis role="bold"><rich:dropDown></emphasis> menu is a
+ standard JSF component. So, creation the menu dynamically from the Java
+ Script code is the same as for any other jsf component.</para>
</section>
-
+
<section>
<?dbhtml filename="Isitpossibletocustomizelookofdatascroller"?>
- <title>Is it possible to customize look of datascroller (the forward/back buttons) and replace them with images?</title>
- <para>The answer is yes. Use facets: "first_disabled", "last_disabled", "next_disabled", "previous_disabled", "fastforward_disabled", "fastrewind_disabled".</para>
+ <title>Is it possible to customize look of dataScroller (the forward/back buttons)
+ and replace them with images?</title>
+ <para>The answer is yes. Use facets: "first_disabled",
+ "last_disabled", "next_disabled",
+ "previous_disabled",
+ "fastforward_disabled",
+ "fastrewind_disabled".</para>
</section>
-
+
<section>
<?dbhtml filename="HowtocustomizesimpleTogglePanel"?>
- <title>How to customize simpleTogglePanel? I need to change icon for toggler.</title>
- <para>To customize icon for toggler use "openMarker" and "closeMarker" facets.</para>
+ <title>How to customize <rich:simpleTogglePanel>? I need to change
+ icon for toggler.</title>
+ <para>To customize icon for toggler use "openMarker" and
+ "closeMarker" facets.</para>
</section>
-
+
+ <section>
+ <?dbhtml filename="Howtoredirecttoanotherpage"?>
+ <title><rich:dropDown> component: How to redirect to another page?</title>
+ <para>If you want to navigate to outside your application using external URL use
+ following approach:</para>
+ <programlisting role="XML"><![CDATA[...
+ <rich:dropDownMenu>
+ …
+ <rich:menuItem submitMode="none"
+ onclick="document.location.href='http://labs.jboss.com/jbossrichfaces/'">
+ <h:outputLink value="http://labs.jboss.com/jbossrichfaces/">
+ <h:outputText value="RichFaces Home Page"></h:outputText>
+ </h:outputLink>
+ </rich:menuItem>
+ …
+ </rich:dropDownMenu>
+...
+]]></programlisting>
+ <para>Also online demo of using <emphasis role="bold"
+ ><rich:dropDownMenu></emphasis> is available <ulink
+ url="http://livedemo.exadel.com/richfaces-demo/richfaces/dropDownMenu.jsf"
+ >here</ulink>.</para>
+ </section>
+
+ <section>
+ <?dbhtml filename="CanthedropDownMenubeincludedintreenodes"?>
+ <title>Can dropDownMenu be included in tree nodes?</title>
+ <para>The <emphasis role="bold"><rich:dropDownMenu></emphasis> is
+ designed keeping in mind that it should not be used for contextMenu purpose.
+ We have a <emphasis role="bold"><rich:contextMenu></emphasis>
+ component in the TODO list. However, it will not schedule for the nearest
+ versions.</para>
+ </section>
+
+ <section>
+ <?dbhtml filename="HowtocustomizesimpleTogglePanel"?>
+ <title>How to pass own parameters during a modalPanel opening or closing?</title>
+ <para>The answer could be found in the "Details of usage" of <link
+ linkend="modalPanel"><rich:modalPanel>
+ component</link>.</para>
+ </section>
+
+ <section>
+ <?dbhtml filename="Howtoaddalinktothetreenode"?>
+ <title>How to add a link to a tree node?</title>
+ <para>Simple code is placed below:</para>
+ <programlisting role="XML"><![CDATA[...
+ <rich:tree value="#{bean.data}" var="data">
+ <rich:treeNode type="text" nodeClass="customNode" acceptedTypes="file2" onselected="return false;">
+ <h:commandLink value="#{data.linkValue}" action="#{data.someAction}"/>
+ </rich:treeNode>
+ </rich:tree>
+...
+]]></programlisting>
+ </section>
+
</chapter>
17 years, 6 months
JBoss Rich Faces SVN: r1292 - trunk/richfaces/tree/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-06-25 08:44:28 -0400 (Mon, 25 Jun 2007)
New Revision: 1292
Modified:
trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
Log:
Some improvements for state advising code.
Modified: trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
===================================================================
--- trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2007-06-25 12:24:52 UTC (rev 1291)
+++ trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2007-06-25 12:44:28 UTC (rev 1292)
@@ -67,6 +67,8 @@
private final UITree tree;
private final TreeDataModelEventNavigator navigator;
+
+ private TreeStateAdvisor methodBindingAdvisor = null;
private DataVisitorWithLastElement(ResponseWriter writer,
StringHolder holder, Flag flag, UITree tree,
@@ -124,53 +126,55 @@
public void processAdvisors(FacesContext context, TreeRowKey rowKey) throws IOException {
TreeState componentState = (TreeState) tree.getComponentState();
TreeStateAdvisor stateAdvisor = (TreeStateAdvisor)tree.getStateAdvisor();
- if (null != stateAdvisor) {
- Boolean adviseOpened = stateAdvisor.adviseNodeOpened(tree);
- if (null != adviseOpened) {
- if (adviseOpened.booleanValue()) {
- if (!componentState.isExpanded(rowKey)) {
- componentState.expandNode(rowKey);
+
+ if (null == stateAdvisor) {
+ if (null == methodBindingAdvisor) {
+ methodBindingAdvisor = new TreeStateAdvisor() {
+ public Boolean adviseNodeOpened(UITree tree) {
+ MethodBinding adviseNodeOpened = tree.getAdviseNodeOpened();
+ if (null != adviseNodeOpened) {
+ return (Boolean) adviseNodeOpened.invoke(FacesContext.getCurrentInstance(), new Object[] {tree});
+ }
+ return null;
}
- }
- else {
- if (componentState.isExpanded(rowKey)) {
- componentState.collapseNode(rowKey);
+
+ public Boolean adviseNodeSelected(UITree tree) {
+ MethodBinding adviseNodeSelected = tree.getAdviseNodeSelected();
+ if (null != adviseNodeSelected) {
+ return (Boolean) adviseNodeSelected.invoke(FacesContext.getCurrentInstance(), new Object [] {tree});
+ }
+ return null;
}
+ };
+ }
+ stateAdvisor = methodBindingAdvisor;
+ }
+
+ Boolean adviseOpened = stateAdvisor.adviseNodeOpened(tree);
+ if (null != adviseOpened) {
+ if (adviseOpened.booleanValue()) {
+ if (!componentState.isExpanded(rowKey)) {
+ componentState.expandNode(rowKey);
}
}
- Boolean adviseSelected = stateAdvisor.adviseNodeSelected(tree);
- if (null != adviseSelected) {
- if (adviseSelected.booleanValue()) {
- if (!componentState.isSelected(rowKey)) {
- componentState.setSelected(rowKey);
- }
+ else {
+ if (componentState.isExpanded(rowKey)) {
+ componentState.collapseNode(rowKey);
}
- else {
- if (componentState.isSelected(rowKey)) {
- componentState.setSelected(null);
- }
- }
}
}
- else {
- tree.setStateAdvisor(new TreeStateAdvisor() {
- public Boolean adviseNodeOpened(UITree tree) {
- MethodBinding adviseNodeOpened = tree.getAdviseNodeOpened();
- if (null != adviseNodeOpened) {
- return (Boolean) adviseNodeOpened.invoke(FacesContext.getCurrentInstance(), new Object[] {tree});
- }
- return null;
+ Boolean adviseSelected = stateAdvisor.adviseNodeSelected(tree);
+ if (null != adviseSelected) {
+ if (adviseSelected.booleanValue()) {
+ if (!componentState.isSelected(rowKey)) {
+ componentState.setSelected(rowKey);
}
-
- public Boolean adviseNodeSelected(UITree tree) {
- MethodBinding adviseNodeSelected = tree.getAdviseNodeSelected();
- if (null != adviseNodeSelected) {
- return (Boolean) adviseNodeSelected.invoke(FacesContext.getCurrentInstance(), new Object [] {tree});
- }
- return null;
+ }
+ else {
+ if (componentState.isSelected(rowKey)) {
+ componentState.setSelected(null);
}
- });
- processAdvisors(context, rowKey);
+ }
}
}
}
17 years, 6 months
JBoss Rich Faces SVN: r1291 - trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2007-06-25 08:24:52 -0400 (Mon, 25 Jun 2007)
New Revision: 1291
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js
Log:
Add performance tuning logs
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js 2007-06-25 11:26:58 UTC (rev 1290)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js 2007-06-25 12:24:52 UTC (rev 1291)
@@ -19,6 +19,7 @@
eventOnPostSort: {},
initialize: function(options) {
+ this.startInitTime = (new Date()).getTime();
this.options = options;
this.client_id = this.options.client_id;
@@ -33,15 +34,9 @@
{pane: GridLayout_Enum.FOOTER, ref: this.client_id +"_" + "GridFooterTemplate"}
];
this.init2 = this.init.bindAsEventListener(this);
-
- this.eventOnPostSort = new ClientUI.common.utils.CustomEvent('OnSort');
- this.eventOnPostScroll = new ClientUI.common.utils.CustomEvent('OnScroll');
-
- this.startUpTime = new Date().getTime();
-
+
+ this.endInitTime = (new Date()).getTime();
this.rowCallbacks = [];
-
-// this.init()
},
// initialize parent Grid
@@ -50,22 +45,29 @@
// mark that grid control initialized
if(!this.isInitialized) {
this.isInitialized = true;
-
+
+ this.startCreateTime = (new Date()).getTime();
+
ClientUI.controls.grid.ScrollableGrid.parentClass.constructor().call(this, this.client_id, this.dataModel, this.templates);
+ this.endCreateTime = (new Date()).getTime();
+
// suspend some processing
- setTimeout(function(){
+ setTimeout(function() {
+ this.startPostProcessTime = (new Date()).getTime();
+
+ this.eventOnPostSort = new ClientUI.common.utils.CustomEvent('OnSort');
+ this.eventOnPostScroll = new ClientUI.common.utils.CustomEvent('OnScroll');
+
var progress = new ClientUI.common.box.SplashBox(this.splash_id, null, 300, true);
this.setProgressCtrl(progress);
Event.observe(this.eventOnSort, "on sort", this.onSorted.bindAsEventListener(this));
if (this.options.selectionInput) {
this.selectionManager = new ClientUI.controls.grid.SelectionManager(this);
}
- }.bind(this), 500);
-
- if (this.startUpTime) {
- ClientUILib.log(ClientUILogger.ERROR, "Load Time'" + (new Date().getTime() - this.startUpTime) + "' ms");
- }
+
+ this.endPostProcessTime = (new Date()).getTime();
+ }.bind(this), 500);
}
},
17 years, 6 months
JBoss Rich Faces SVN: r1290 - trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2007-06-25 07:26:58 -0400 (Mon, 25 Jun 2007)
New Revision: 1290
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridFooter.js
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js
Log:
add column hide JS API
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-06-25 11:26:15 UTC (rev 1289)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-06-25 11:26:58 UTC (rev 1290)
@@ -753,5 +753,17 @@
},
_getRowIndex: function(rowId) {
return Number(rowId.split(this.grid.getElement().id)[1].split(":")[2]);
+ },
+
+ hideColumn: function(index, frozen) {
+ var rows;
+ if(frozen) {
+ rows = this.templFrozen.getElement().rows;
+ } else {
+ rows = this.templNormal.getElement().rows;
+ }
+ for(var i=0; i<rows.length; i++) {
+ rows[i].removeChild(rows[i].cells[index]);
+ }
}
});
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridFooter.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridFooter.js 2007-06-25 11:26:15 UTC (rev 1289)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridFooter.js 2007-06-25 11:26:58 UTC (rev 1290)
@@ -177,5 +177,17 @@
width = 1;
}
columns.last().footerCol.width = width;
+ },
+
+ hideColumn: function(index, frozen) {
+ var rows;
+ if(frozen) {
+ rows = this.headerFrozenRow.getElement().rows;
+ } else {
+ rows = this.headerRow.getElement().rows;
+ }
+ for(var i=0; i<rows.length; i++) {
+ rows[i].removeChild(rows[i].cells[index]);
+ }
}
});
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2007-06-25 11:26:15 UTC (rev 1289)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2007-06-25 11:26:58 UTC (rev 1290)
@@ -426,5 +426,21 @@
width = 1;
}
this._columns.last().col.width = width;
+ },
+
+ hideColumn: function(index, frozen) {
+ var colomn = this._columns.splice(index,1)[0];
+ colomn.col.parentNode.removeChild(colomn.col);
+ colomn.bodyCol.parentNode.removeChild(colomn.bodyCol);
+ colomn.footerCol.parentNode.removeChild(colomn.footerCol);
+ var rows;
+ if(frozen) {
+ rows = this.headerFrozenRow.getElement().rows;
+ } else {
+ rows = this.headerRow.getElement().rows;
+ }
+ for(var i=0; i<rows.length; i++) {
+ rows[i].removeChild(rows[i].cells[index]);
+ }
}
});
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js 2007-06-25 11:26:15 UTC (rev 1289)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js 2007-06-25 11:26:58 UTC (rev 1290)
@@ -117,10 +117,25 @@
this.updateLayout();
},
- doExpand: function(index) {
+ doCollapse: function(index) {
+ var header = this.getHeader();
+ var length = header.headerFrozenRow.getElement().rows[0].cells.length;
+ if(index < length) {
+ this.hideColumn(index, true);
+ } else {
+ index -= fcount;
+ length = header.headerRow.getElement().rows[0].cells.length;
+ if (index < length - 1){
+ this.hideColumn(index, false);
+ }
+ }
},
- doCollapse: function(index) {
+ hideColumn: function(index, frozen) {
+ this.getHeader().hideColumn(index, frozen);
+ this.getBody().hideColumn(index, frozen);
+ if(this.getFooter()) {this.getFooter().hideColumn(index, frozen);}
+ this.updateLayout();
}
});
17 years, 6 months