JBoss Rich Faces SVN: r6838 - in trunk/ui/datascroller/src/main: java/org/richfaces/renderkit/html and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-03-14 16:31:21 -0400 (Fri, 14 Mar 2008)
New Revision: 6838
Added:
trunk/ui/datascroller/src/main/resources/org/richfaces/renderkit/html/scripts/
trunk/ui/datascroller/src/main/resources/org/richfaces/renderkit/html/scripts/datascroller.js
Modified:
trunk/ui/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java
trunk/ui/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java
trunk/ui/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx
Log:
http://jira.jboss.com/jira/browse/RF-2182
Modified: trunk/ui/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java
===================================================================
--- trunk/ui/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java 2008-03-14 20:24:23 UTC (rev 6837)
+++ trunk/ui/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java 2008-03-14 20:31:21 UTC (rev 6838)
@@ -426,12 +426,10 @@
if (pageIndex < 1) {
pageIndex = 1;
-
- this.updateModel(pageIndex);
+ setPage(pageIndex);
} else if (pageIndex > pageCount) {
pageIndex = pageCount;
-
- this.updateModel(pageIndex);
+ setPage(pageIndex);
}
currentPageIndex = pageIndex;
Modified: trunk/ui/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java
===================================================================
--- trunk/ui/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java 2008-03-14 20:24:23 UTC (rev 6837)
+++ trunk/ui/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java 2008-03-14 20:31:21 UTC (rev 6838)
@@ -35,6 +35,7 @@
import javax.faces.event.PhaseId;
import org.ajax4jsf.javascript.JSFunction;
+import org.ajax4jsf.javascript.JSFunctionDefinition;
import org.ajax4jsf.renderkit.AjaxRendererUtils;
import org.ajax4jsf.renderkit.HeaderResourcesRendererBase;
import org.richfaces.component.UIDatascroller;
@@ -48,8 +49,9 @@
}
public void doDecode(FacesContext context, UIComponent component) {
- String param = (String) getParamMap(context).get(
- component.getClientId(context));
+ Map paramMap = getParamMap(context);
+ String clientId = component.getClientId(context);
+ String param = (String) paramMap.get(clientId);
if (param != null) {
UIDatascroller scroller = (UIDatascroller) component;
UIData data = scroller.getDataTable();
@@ -58,9 +60,10 @@
if (pageCount > 1) {
int pageIndex = scroller.getPageIndex(data, pageCount);
int newPage = scroller.getPageForFacet(param, pageIndex, pageCount);
- if (newPage > 0) {
+ int page = scroller.getPage();
+ if (newPage > 0 && newPage != page) {
DataScrollerEvent event = new DataScrollerEvent(scroller,
- String.valueOf(pageIndex), param, newPage);
+ String.valueOf(page), param, newPage);
if (scroller.isImmediate()) {
event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
} else {
@@ -216,8 +219,7 @@
} else {
out.writeAttribute("class", "dr-dscr-inact rich-datascr-inact "+
styleClass, null);
- out.writeAttribute("onclick", getOnClick(context, component,
- Integer.toString(i + 1)), null);
+ out.writeAttribute("onclick", getOnClick(Integer.toString(i + 1)), null);
}
if (null != style) out.writeAttribute("style", style, null);
out.writeText(Integer.toString(i + 1), null);
@@ -227,6 +229,10 @@
}
+ public Object getOnClick(String string) {
+ return "RichFaces.Datascroller.switchToPage(this, event, '" + string + "');";
+ }
+
public void renderPages(FacesContext context, UIComponent component, int pageIndex, int count)
throws IOException {
UIDatascroller scroller = (UIDatascroller) component;
@@ -274,16 +280,16 @@
return parameters;
}
- public String getOnClick(FacesContext context, UIComponent component,
- String value) {
+ public String getSubmitFunction(FacesContext context, UIComponent component) {
- JSFunction function = AjaxRendererUtils.buildAjaxFunction(component,
+ JSFunctionDefinition definition = new JSFunctionDefinition("event");
+
+ JSFunction function = AjaxRendererUtils.buildAjaxFunction(component,
context);
UIDatascroller scroller = (UIDatascroller) component;
Map eventOptions = AjaxRendererUtils.buildEventOptions(context,
component);
Map parameters = (Map) eventOptions.get("parameters");
- parameters.put(scroller.getClientId(context), value);
Map params = getParameters(context,component);
if(!params.isEmpty()){
@@ -294,8 +300,8 @@
StringBuffer buffer = new StringBuffer();
function.appendScript(buffer);
buffer.append("; return false;");
- String script = buffer.toString();
- return script;
+ definition.addToBody(buffer.toString());
+ return definition.toScript();
}
Added: trunk/ui/datascroller/src/main/resources/org/richfaces/renderkit/html/scripts/datascroller.js
===================================================================
--- trunk/ui/datascroller/src/main/resources/org/richfaces/renderkit/html/scripts/datascroller.js (rev 0)
+++ trunk/ui/datascroller/src/main/resources/org/richfaces/renderkit/html/scripts/datascroller.js 2008-03-14 20:31:21 UTC (rev 6838)
@@ -0,0 +1,37 @@
+if (!window.RichFaces) {
+ window.RichFaces = {};
+}
+
+RichFaces.Datascroller = {};
+
+RichFaces.Datascroller.COMPONENT = "rich:datascroller";
+
+RichFaces.Datascroller.initialize = function(id, submitFunction) {
+ var scroller = $(id);
+ scroller.richfacesComponent = RichFaces.Datascroller.COMPONENT;
+ scroller.submitFunction = submitFunction;
+};
+
+RichFaces.Datascroller.switchToPage = function(elt, event, newPage) {
+ var e = elt;
+ while (!e.richfacesComponent || e.richfacesComponent != RichFaces.Datascroller.COMPONENT) {
+ e = e.parentNode;
+ }
+
+ var id = e.id;
+ var inputId = id + "PageIndex";
+
+ var input = e.lastChild;
+ while (!input.id || input.id != inputId) {
+ input = input.previousSibling;
+ }
+
+ var value = input.value;
+
+ input.value = newPage;
+ try {
+ e.submitFunction(event);
+ } finally {
+ input.value = value;
+ }
+};
\ No newline at end of file
Modified: trunk/ui/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx
===================================================================
--- trunk/ui/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx 2008-03-14 20:24:23 UTC (rev 6837)
+++ trunk/ui/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx 2008-03-14 20:31:21 UTC (rev 6838)
@@ -14,6 +14,7 @@
<h:scripts>
new org.ajax4jsf.javascript.PrototypeScript(),
new org.ajax4jsf.javascript.AjaxScript(),
+ /org/richfaces/renderkit/html/scripts/datascroller.js
</h:scripts>
<f:clientid var="clientId"/>
@@ -22,6 +23,7 @@
</jsp:scriptlet>
<c:object var="singlePageRenderStyle" type="java.lang.String" />
+ <c:object var="pageIndex" type="int" />
<jsp:scriptlet>
<![CDATA[
@@ -33,7 +35,7 @@
}
int pageCount = component.getCurrentPageCount(dataTable);
- int pageIndex = component.getCurrentPageIndex(dataTable);
+ pageIndex = component.getCurrentPageIndex(dataTable);
boolean singlePageRender = true;
@@ -66,7 +68,7 @@
if (controlsState.isFirstRendered()){
if (controlsState.isFirstEnabled()){
variables.setVariable("buttonClass", "");
- variables.setVariable("onclick", getOnClick(context,component,component.FIRST_FACET_NAME));
+ variables.setVariable("onclick", getOnClick(component.FIRST_FACET_NAME));
variables.setVariable("facet", component.FIRST_FACET_NAME);
facet=component.FIRST_FACET_NAME;
}else{
@@ -112,7 +114,7 @@
if (controlsState.isFastRewindRendered()){
if (controlsState.isFastRewindEnabled()){
variables.setVariable("buttonClass", "");
- variables.setVariable("onclick", getOnClick(context,component,component.FAST_REWIND_FACET_NAME));
+ variables.setVariable("onclick", getOnClick(component.FAST_REWIND_FACET_NAME));
variables.setVariable("facet", component.FAST_REWIND_FACET_NAME);
facet=component.FAST_REWIND_FACET_NAME;
}else{
@@ -159,7 +161,7 @@
if (controlsState.isPreviousRendered()){
if (controlsState.isPreviousEnabled()){
variables.setVariable("buttonClass", "");
- variables.setVariable("onclick", getOnClick(context,component,component.PREVIOUS_FACET_NAME));
+ variables.setVariable("onclick", getOnClick(component.PREVIOUS_FACET_NAME));
variables.setVariable("facet", component.PREVIOUS_FACET_NAME);
facet=component.PREVIOUS_FACET_NAME;
}else{
@@ -212,7 +214,7 @@
<jsp:scriptlet><![CDATA[
if (controlsState.isNextRendered()){
if (controlsState.isNextEnabled()){
- variables.setVariable("onclick", getOnClick(context,component,component.NEXT_FACET_NAME));
+ variables.setVariable("onclick", getOnClick(component.NEXT_FACET_NAME));
variables.setVariable("buttonClass", "");
variables.setVariable("facet", component.NEXT_FACET_NAME);
facet=component.NEXT_FACET_NAME;
@@ -258,7 +260,7 @@
<jsp:scriptlet><![CDATA[
if (controlsState.isFastForwardRendered()){
if (controlsState.isFastForwardEnabled()){
- variables.setVariable("onclick", getOnClick(context,component,component.FAST_FORWARD_FACET_NAME));
+ variables.setVariable("onclick", getOnClick(component.FAST_FORWARD_FACET_NAME));
variables.setVariable("buttonClass", "");
variables.setVariable("facet", component.FAST_FORWARD_FACET_NAME);
facet=component.FAST_FORWARD_FACET_NAME;
@@ -306,7 +308,7 @@
<jsp:scriptlet><![CDATA[
if (controlsState.isLastRendered()){
if (controlsState.isLastEnabled()){
- variables.setVariable("onclick", getOnClick(context,component,component.LAST_FACET_NAME));
+ variables.setVariable("onclick", getOnClick(component.LAST_FACET_NAME));
variables.setVariable("buttonClass", "");
variables.setVariable("facet", component.LAST_FACET_NAME);
facet=component.LAST_FACET_NAME;
@@ -351,5 +353,9 @@
}
]]>
</jsp:scriptlet>
+ <script type="text/javascript">
+ RichFaces.Datascroller.initialize('#{clientId}', #{this:getSubmitFunction(context,component)});
+ </script>
+ <input type="hidden" name="#{clientId}" id="#{clientId}PageIndex" value="#{pageIndex}" />
</div>
</f:root>
\ No newline at end of file
16 years, 10 months
JBoss Rich Faces SVN: r6837 - in trunk/cdk/generator/src/main: java/org/ajax4jsf/templatecompiler/builder and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-03-14 16:24:23 -0400 (Fri, 14 Mar 2008)
New Revision: 6837
Modified:
trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/model/JavaPrimitive.java
trunk/cdk/generator/src/main/java/org/ajax4jsf/templatecompiler/builder/AbstractCompilationContext.java
trunk/cdk/generator/src/main/java/org/ajax4jsf/templatecompiler/elements/std/ObjectTemplateElement.java
trunk/cdk/generator/src/main/resources/META-INF/templates/templatecompiler/object.vm
Log:
CDK:
- c:object value enhancements
- loader now handles primitive types
Modified: trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/model/JavaPrimitive.java
===================================================================
--- trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/model/JavaPrimitive.java 2008-03-14 18:59:25 UTC (rev 6836)
+++ trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/model/JavaPrimitive.java 2008-03-14 20:24:23 UTC (rev 6837)
@@ -72,4 +72,8 @@
return wrappers.get(primitive.getName());
}
+
+ public static final boolean isPrimitive(String typeName) {
+ return types.containsKey(typeName);
+ }
}
Modified: trunk/cdk/generator/src/main/java/org/ajax4jsf/templatecompiler/builder/AbstractCompilationContext.java
===================================================================
--- trunk/cdk/generator/src/main/java/org/ajax4jsf/templatecompiler/builder/AbstractCompilationContext.java 2008-03-14 18:59:25 UTC (rev 6836)
+++ trunk/cdk/generator/src/main/java/org/ajax4jsf/templatecompiler/builder/AbstractCompilationContext.java 2008-03-14 20:24:23 UTC (rev 6837)
@@ -35,6 +35,7 @@
import org.ajax4jsf.builder.config.ClassVisitor;
import org.ajax4jsf.builder.config.ClassWalkingLogic;
+import org.ajax4jsf.builder.model.JavaPrimitive;
import org.ajax4jsf.templatecompiler.elements.A4JRendererElementsFactory;
import org.ajax4jsf.templatecompiler.elements.ElementsFactory;
import org.ajax4jsf.templatecompiler.elements.TemplateElement;
@@ -345,7 +346,11 @@
public Class<?> loadClass(String className) throws ClassNotFoundException {
Class<?> clazz = null;
try {
- clazz = this.classLoader.loadClass(className);
+ if (JavaPrimitive.isPrimitive(className)) {
+ clazz = JavaPrimitive.forName(className);
+ } else {
+ clazz = this.classLoader.loadClass(className);
+ }
} catch (ClassNotFoundException e) {
System.err.println("ClassNotFoundException message: "
+ e.getMessage());
Modified: trunk/cdk/generator/src/main/java/org/ajax4jsf/templatecompiler/elements/std/ObjectTemplateElement.java
===================================================================
--- trunk/cdk/generator/src/main/java/org/ajax4jsf/templatecompiler/elements/std/ObjectTemplateElement.java 2008-03-14 18:59:25 UTC (rev 6836)
+++ trunk/cdk/generator/src/main/java/org/ajax4jsf/templatecompiler/elements/std/ObjectTemplateElement.java 2008-03-14 20:24:23 UTC (rev 6837)
@@ -71,7 +71,13 @@
this.strThisVariable = sVariableName;
- this.strExpression = ELParser.compileEL(strTempExpression, componentBean);
+ if (strTempExpression != null && strTempExpression.length() != 0) {
+ this.strExpression = ELParser.compileEL(strTempExpression, componentBean);
+ } else {
+ if (String.class.getName().equals(this.strType)) {
+ this.strExpression = "\"\"";
+ }
+ }
if (this.strType != null) {
try {
Modified: trunk/cdk/generator/src/main/resources/META-INF/templates/templatecompiler/object.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates/templatecompiler/object.vm 2008-03-14 18:59:25 UTC (rev 6836)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates/templatecompiler/object.vm 2008-03-14 20:24:23 UTC (rev 6837)
@@ -1 +1 @@
-$type $variable = $expression;
\ No newline at end of file
+$type $variable #if($expression) = $expression #end;
\ No newline at end of file
16 years, 10 months
JBoss Rich Faces SVN: r6836 - in trunk/test-applications/jsp/src/main: java/ddMenu and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2008-03-14 14:59:25 -0400 (Fri, 14 Mar 2008)
New Revision: 6836
Modified:
trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java
trunk/test-applications/jsp/src/main/java/ddMenu/DDMenu.java
trunk/test-applications/jsp/src/main/java/dnd/DndBean.java
trunk/test-applications/jsp/src/main/java/pickList/PickList.java
trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp
trunk/test-applications/jsp/src/main/webapp/Combobox/Combobox.jsp
trunk/test-applications/jsp/src/main/webapp/Combobox/ComboboxProperty.jsp
trunk/test-applications/jsp/src/main/webapp/InplaceInput/InplaceInput.jsp
Log:
+ update
Modified: trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java 2008-03-14 18:41:01 UTC (rev 6835)
+++ trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java 2008-03-14 18:59:25 UTC (rev 6836)
@@ -86,11 +86,14 @@
private boolean showWeekDaysBar;
private boolean showWeeksBar;
private String todayControlMode; // scroll, select, hidden;
+ private boolean limitToList;
+ private String inputSize;
public CalendarBean() {
+ limitToList = false;
horizontalOffset = "0";
verticalOffset = "0";
- isDayEnabled = true;
+ isDayEnabled = true;
immediate = false;
cellHeight = "15";
cellWidth = "15";
@@ -120,8 +123,8 @@
weekDay = "long";
month = "none";
timeZone = "Eastern European Time";
- preloadDateRangeBegin = "10.08.2007"; //d.m.y
- preloadDateRangeEnd = "11.10.2007";
+ preloadDateRangeBegin = "11.11.2007"; //d.m.y
+ preloadDateRangeEnd = "01.01.2008";
}
@@ -655,4 +658,24 @@
public void setHeaderFacet(String headerFacet) {
this.headerFacet = headerFacet;
}
+
+
+ public boolean isLimitToList() {
+ return limitToList;
+ }
+
+
+ public void setLimitToList(boolean limitToList) {
+ this.limitToList = limitToList;
+ }
+
+ public String getInputSize() {
+ return inputSize;
+ }
+
+
+ public void setInputSize(String inputSize) {
+ this.inputSize = inputSize;
+ }
+
}
Modified: trunk/test-applications/jsp/src/main/java/ddMenu/DDMenu.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/ddMenu/DDMenu.java 2008-03-14 18:41:01 UTC (rev 6835)
+++ trunk/test-applications/jsp/src/main/java/ddMenu/DDMenu.java 2008-03-14 18:59:25 UTC (rev 6836)
@@ -48,11 +48,14 @@
actionListener = "---";
}
- public void act() {
+ public String act() {
+ System.out.println("action work!");
action = "action work!";
+ return null;
}
public void actListener(ActionEvent e) {
+ System.out.println("actionListener work!");
actionListener = "actionListener work!";
}
Modified: trunk/test-applications/jsp/src/main/java/dnd/DndBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/dnd/DndBean.java 2008-03-14 18:41:01 UTC (rev 6835)
+++ trunk/test-applications/jsp/src/main/java/dnd/DndBean.java 2008-03-14 18:59:25 UTC (rev 6836)
@@ -33,14 +33,12 @@
actionListenerDrop = "---";
}
- public String actListenerDrag(ActionEvent e) {
+ public void actListenerDrag(ActionEvent e) {
actionListenerDrag = "actionListenerDrag work!";
- return null;
}
- public String actListenerDrop(ActionEvent e) {
+ public void actListenerDrop(ActionEvent e) {
actionListenerDrop = "actionListenerDrop work!";
- return null;
}
public void processDrop(DropEvent event) {
Modified: trunk/test-applications/jsp/src/main/java/pickList/PickList.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/pickList/PickList.java 2008-03-14 18:41:01 UTC (rev 6835)
+++ trunk/test-applications/jsp/src/main/java/pickList/PickList.java 2008-03-14 18:59:25 UTC (rev 6836)
@@ -82,7 +82,7 @@
this.requiredMessage = "requiredMessage";
data = new ArrayList<SelectItem>();
for (int i = 0; i < 10; i++)
- data.add(new SelectItem(new Data("selectItems " + i)));
+ data.add(new SelectItem("selectItems "));
}
Modified: trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp 2008-03-14 18:41:01 UTC (rev 6835)
+++ trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp 2008-03-14 18:59:25 UTC (rev 6836)
@@ -14,7 +14,10 @@
<h:outputText value="Ajax mode"
rendered="#{calendarBean.renderedAjax}" />
- <rich:calendar id="calendarClientID" dataModel="#{calendarDataModel}"
+ <rich:calendar id="calendarClientID" horizontalOffset="#{calendarBean.horizontalOffset}"
+ verticalOffset="#{calendarBean.verticalOffset}" ignoreDupResponses="#{calendarBean.ignoreDupResponses}"
+ inputSize="#{calendarBean.inputSize}" eventsQueue="myEventsQueue" label="calendarLabel" limitToList="#{calendarBean.limitToList}"
+ dataModel="#{calendarDataModel}"
style="#{style.style}" styleClass="#{style.styleClass}" inputStyle="#{style.inputStyle}"
locale="#{calendarBean.locale}" popup="#{calendarBean.popup}"
preloadDateRangeBegin="#{calendarBean.prDateRangeBegin}"
@@ -54,7 +57,7 @@
immediate="#{calendarBean.immediate}"
onbeforedomupdate="#{event.onbeforedomupdate}"
onchanged="#{event.onchanged}" oncollapse="#{event.oncollapse}"
- oncomplete="#{event.oncomplete}"
+ oncomplete="#{event.oncomplete}"
oncurrentdateselect="#{event.oncurrentdateselect}"
ondatemouseout="#{event.ondatemouseout}"
ondatemouseover="#{event.ondatemouseover}"
@@ -108,6 +111,8 @@
monthLabelsShort="#{calendarBean.monthLabelsShort}"
value="#{calendarBean.selectedDate}"
currentDate="#{calendarBean.currentDate}"
+ cellHeight="#{calendarBean.cellHeight}"
+ cellWidth="#{calendarBean.cellWidth}"
jointPoint="#{calendarBean.jointPoint}"
direction="#{calendarBean.direction}"
enableManualInput="#{calendarBean.enableManualInput}"
@@ -166,6 +171,7 @@
<h:panelGrid columns="2">
<f:verbatim>
<span style="padding: 2px;">{day}</span>
+ <h:outputText value="#{day}"></h:outputText>
</f:verbatim>
<h:panelGrid>
<h:outputText styleClass="smallText" value="{data.enLabel}" />
Modified: trunk/test-applications/jsp/src/main/webapp/Combobox/Combobox.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Combobox/Combobox.jsp 2008-03-14 18:41:01 UTC (rev 6835)
+++ trunk/test-applications/jsp/src/main/webapp/Combobox/Combobox.jsp 2008-03-14 18:59:25 UTC (rev 6836)
@@ -7,7 +7,7 @@
<rich:comboBox id="comboboxID" disabled="#{combobox.disabled}" defaultLabel="#{combobox.defaultLabel}"
buttonClass="#{style.buttonClass}" buttonDisabledClass="#{style.buttonDisabledClass}" buttonDisabledStyle="#{style.buttonDisabledStyle}" buttonInactiveClass="#{style.buttonInactiveClass}" buttonInactiveStyle="#{style.buttonInactiveStyle}" buttonStyle="#{style.buttonStyle}" inputClass="#{style.inputClass}" inputDisabledClass="#{style.inputDisabledClass}" inputDisabledStyle="#{style.inputDisabledStyle}" inputInactiveClass="#{style.inputInactiveClass}" inputInactiveStyle="#{style.inputInactiveStyle}" itemClass="#{style.itemClass}" inputStyle="#{style.inputStyle}" listClass="#{style.listClass}" listStyle="#{style.listStyle}"
filterNewValues="#{combobox.filterNewValues}"
- directInputSuggestions="#{combobox.directInputSuggestions}" immediate="#{combobox.immediate}" inputSize="#{combobox.inputSize}"
+ directInputSuggestions="#{combobox.directInputSuggestions}" immediate="#{combobox.immediate}"
width="#{combobox.width}" valueChangeListener="#{combobox.valueChangeListener}" value="#{combobox.value}"
tabindex="#{combobox.tabindex}" suggestionValues="#{combobox.suggestionValues}" size="#{combobox.size}"
required="#{combobox.required}" requiredMessage="#{combobox.requiredMessage}"
Modified: trunk/test-applications/jsp/src/main/webapp/Combobox/ComboboxProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Combobox/ComboboxProperty.jsp 2008-03-14 18:41:01 UTC (rev 6835)
+++ trunk/test-applications/jsp/src/main/webapp/Combobox/ComboboxProperty.jsp 2008-03-14 18:59:25 UTC (rev 6836)
@@ -11,9 +11,6 @@
<h:outputText value="filterNewValues"></h:outputText>
<h:selectBooleanCheckbox value="#{combobox.filterNewValues}" onchange="submit();"></h:selectBooleanCheckbox>
- <h:outputText value="inputSize"></h:outputText>
- <h:inputText value="#{combobox.inputSize}" onchange="submit();"></h:inputText>
-
<h:outputText value="value"></h:outputText>
<h:inputText value="#{combobox.value}" onchange="submit();"></h:inputText>
Modified: trunk/test-applications/jsp/src/main/webapp/InplaceInput/InplaceInput.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/InplaceInput/InplaceInput.jsp 2008-03-14 18:41:01 UTC (rev 6835)
+++ trunk/test-applications/jsp/src/main/webapp/InplaceInput/InplaceInput.jsp 2008-03-14 18:59:25 UTC (rev 6836)
@@ -7,7 +7,7 @@
This is because such an error can easily be made at programming level, <br />
and while invisible for the user who does not understand or cannot <br />
acquire the source code, many of those
-<rich:inplaceInput inputMaxLength="#{inplaceInput.inputMaxLength}"
+<rich:inplaceInput
inputWidth="#{inplaceInput.inputWidth}"
maxInputWidth="#{inplaceInput.maxInputWidth}"
minInputWidth="#{inplaceInput.minInputWidth}"
@@ -41,10 +41,6 @@
<h:inputText value="#{inplaceInput.defaultLabel}" onchange="submit();">
</h:inputText>
- <h:outputText value="inputMaxLength"></h:outputText>
- <h:inputText value="#{inplaceInput.inputMaxLength}" onchange="submit();">
- </h:inputText>
-
<h:outputText value="inputWidth"></h:outputText>
<h:inputText value="#{inplaceInput.inputWidth}" onchange="submit();">
</h:inputText>
16 years, 10 months
JBoss Rich Faces SVN: r6835 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2008-03-14 14:41:01 -0400 (Fri, 14 Mar 2008)
New Revision: 6835
Modified:
trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml
Log:
http://jira.jboss.com/jira/browse/RF-2468
info on localization added
Modified: trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2008-03-14 18:28:46 UTC (rev 6834)
+++ trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2008-03-14 18:41:01 UTC (rev 6835)
@@ -227,7 +227,7 @@
</itemizedlist>
</para>
-
+ <para>The <rich:fileUpload> component allows to use internationalization method to redefine and localize the labels. You could use application resource bundle and define RICH_FILE_UPLOAD_CANCEL_LABEL, RICH_FILE_UPLOAD_STOP_LABEL, RICH_FILE_UPLOAD_ADD_LABEL, RICH_FILE_UPLOAD_UPLOAD_LABEL, RICH_FILE_UPLOAD_CLEAR_LABEL, RICH_FILE_UPLOAD_CLEAR_ALL_LABEL, RICH_FILE_UPLOAD_PROGRESS_LABEL, RICH_FILE_UPLOAD_SIZE_ERROR_LABLE, RICH_FILE_UPLOAD_TRANSFER_ERROR_LABLE, RICH_FILE_UPLOAD_ENTRY_STOP_LABEL, RICH_FILE_UPLOAD_ENTRY_CLEAR_LABEL, RICH_FILE_UPLOAD_ENTRY_CANCEL_LABEL there.</para>
</section>
<!-- ordering control set>
16 years, 10 months
JBoss Rich Faces SVN: r6834 - trunk/samples/scrollableDataTableDemo/src/main/java/org/richfaces/demo/datagrid/bean.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2008-03-14 14:28:46 -0400 (Fri, 14 Mar 2008)
New Revision: 6834
Modified:
trunk/samples/scrollableDataTableDemo/src/main/java/org/richfaces/demo/datagrid/bean/ChannelDataModel2.java
Log:
Fixed generic
Modified: trunk/samples/scrollableDataTableDemo/src/main/java/org/richfaces/demo/datagrid/bean/ChannelDataModel2.java
===================================================================
--- trunk/samples/scrollableDataTableDemo/src/main/java/org/richfaces/demo/datagrid/bean/ChannelDataModel2.java 2008-03-14 18:25:18 UTC (rev 6833)
+++ trunk/samples/scrollableDataTableDemo/src/main/java/org/richfaces/demo/datagrid/bean/ChannelDataModel2.java 2008-03-14 18:28:46 UTC (rev 6834)
@@ -17,7 +17,7 @@
* @author Maksim Kaszynski
*
*/
-public class ChannelDataModel2 extends ScrollableTableDataModel {
+public class ChannelDataModel2 extends ScrollableTableDataModel<Issue> {
private final Log log = LogFactory.getLog(ChannelDataModel2.class);
@@ -31,7 +31,7 @@
* @see org.richfaces.model.GridDataModel#getObjectById(java.io.Serializable)
*/
@Override
- public Object getObjectById(Object id) {
+ public Issue getObjectById(Object id) {
if (log.isTraceEnabled()) {
log.trace(id);
@@ -55,7 +55,7 @@
}
@Override
- public Object getId(Object o) {
+ public Object getId(Issue o) {
Issue issue = (Issue)o;
return issue.getKey();
}
16 years, 10 months
JBoss Rich Faces SVN: r6833 - trunk/framework/test/src/main/java/org/ajax4jsf/tests.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2008-03-14 14:25:18 -0400 (Fri, 14 Mar 2008)
New Revision: 6833
Modified:
trunk/framework/test/src/main/java/org/ajax4jsf/tests/EnumSupportExpressionFactoryWrapper.java
Log:
Fixed NPE
Modified: trunk/framework/test/src/main/java/org/ajax4jsf/tests/EnumSupportExpressionFactoryWrapper.java
===================================================================
--- trunk/framework/test/src/main/java/org/ajax4jsf/tests/EnumSupportExpressionFactoryWrapper.java 2008-03-14 18:24:30 UTC (rev 6832)
+++ trunk/framework/test/src/main/java/org/ajax4jsf/tests/EnumSupportExpressionFactoryWrapper.java 2008-03-14 18:25:18 UTC (rev 6833)
@@ -27,7 +27,7 @@
*/
@Override
public Object coerceToType(Object obj, Class<?> targetType) {
- if (targetType.isEnum()) {
+ if (targetType != null && targetType.isEnum()) {
return coerceToEnum(obj, (Class<?>) targetType);
}
return factory.coerceToType(obj, targetType);
16 years, 10 months
JBoss Rich Faces SVN: r6832 - in trunk/ui/suggestionbox/src/main: java/org/richfaces/renderkit/html and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-03-14 14:24:30 -0400 (Fri, 14 Mar 2008)
New Revision: 6832
Modified:
trunk/ui/suggestionbox/src/main/config/component/suggestionbox.xml
trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
Log:
RF-1774
Modified: trunk/ui/suggestionbox/src/main/config/component/suggestionbox.xml
===================================================================
--- trunk/ui/suggestionbox/src/main/config/component/suggestionbox.xml 2008-03-14 18:19:50 UTC (rev 6831)
+++ trunk/ui/suggestionbox/src/main/config/component/suggestionbox.xml 2008-03-14 18:24:30 UTC (rev 6832)
@@ -171,6 +171,14 @@
update value of target element
</description>
</property>
+ <property>
+ <name>onobjectchange</name>
+ <classname>java.lang.String</classname>
+ <description>
+ JavaScript code for call when selected objects are changed
+ </description>
+ </property>
+
<!--
<property>
<name>popup</name>
Modified: trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java
===================================================================
--- trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java 2008-03-14 18:19:50 UTC (rev 6831)
+++ trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java 2008-03-14 18:24:30 UTC (rev 6832)
@@ -368,6 +368,15 @@
options.put("onselect", function);
}
+ String onobjectchange = (String) attributes.get("onobjectchange");
+ if (null != onobjectchange) {
+ JSFunctionDefinition function = new JSFunctionDefinition(
+ "suggestion","event");
+ function.addToBody(onobjectchange);
+
+ options.put("onobjectchange", function);
+
+ }
if (component.getValueBinding("fetchValue") != null
|| attributes.get("fetchValue") != null) {
options.put("select", attributes.get("selectValueClass"));
Modified: trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
===================================================================
--- trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2008-03-14 18:19:50 UTC (rev 6831)
+++ trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2008-03-14 18:24:30 UTC (rev 6832)
@@ -38,7 +38,7 @@
this.oldValue = this.element.value;
this.skipHover = false;
this.selectedItems = [];
- this.selectedItemsCache = [];
+ this.selectedItemsCache = {};
options.selection = update + "_selection";
@@ -579,12 +579,8 @@
var input = $(this.options.selection);
input.value = this.index;
var value="";
- if ( this.fetchValues && (value=this.fetchValues[this.index]) )
- {
- $(this.content+"_hiddenFetchValue").value = value;
- }
- this.updateElement(this.getCurrentEntry());
+ this.updateElement(this.getCurrentEntry(), event);
if (this.options.onselect) {
this.options.onselect(this, event);
}
@@ -594,7 +590,7 @@
input.value = "";
},
- updateElement: function(selectedElement) {
+ updateElement: function(selectedElement, event) {
if (this.options.updateElement) {
this.options.updateElement(selectedElement);
return;
@@ -608,7 +604,7 @@
} else
value = Element.collectTextNodesIgnoreClass(selectedElement, 'informal');
- this.insertValue(value);
+ this.insertValue(value, event);
this.oldValue = this.element.value;
this.element.focus();
@@ -710,10 +706,12 @@
updateItems:function (newValue)
{
+ this.isSelectedItemsUpdated = false;
+ var oldSelectedItems = this.selectedItems;
var value = newValue.replace(/^\s+/, '').replace(/\s+$/, '');
var itm="";
this.selectedItems = [];
- var newItemsCache = [];
+ var newItemsCache = {};
if (this.options.tokens.length!=0)
{
var re = new RegExp('\\s*[\\'+this.options.tokens.join("|\\")+']\\s*');
@@ -734,14 +732,34 @@
newItemsCache[itm.text] = itm;
}
this.selectedItemsCache = newItemsCache;
+ // check for changes
+ if (this.selectedItems.length!=oldSelectedItems.length) this.isSelectedItemsUpdated = true;
+ else
+ {
+ for (var i=0;i<this.selectedItems.length;i++)
+ {
+ if (this.selectedItems[0].text!=oldSelectedItems.text || this.selectedItems[0].object!=oldSelectedItems.object)
+ {
+ this.isSelectedItemsUpdated = true;
+ break;
+ }
+ }
+ }
},
updateSelectedItems: function (items)
{
for (var i=0;i<this.selectedItems.length; i++)
{
- var obj = items[this.selectedItems.text];
- if (obj) this.selectedItems.object = obj;
+ if (!this.selectedItems.object)
+ {
+ var obj = items[this.selectedItems.text];
+ if (obj)
+ {
+ this.selectedItems.object = obj;
+ this.isSelectedItemsUpdated = true;
+ }
+ }
}
},
@@ -753,7 +771,7 @@
{
for (var i=0;i<this.selectedItems.length; i++)
{
- if (!this.selectedItems[i].object) list.push(this.selectedItems[i].text);
+ if (!this.selectedItems[i].object && this.selectedItems[i].text.length==0) list.push(this.selectedItems[i].text);
}
result = list.join(this.options.tokens[0]);
}
@@ -762,7 +780,7 @@
return result;
},
- insertValue: function(value)
+ insertValue: function(value, event)
{
var startStr = this.element.value.substr(0,this.startPosition);
var endStr = this.element.value.substr(this.endPosition);
@@ -788,14 +806,29 @@
// if object null we don't need to request data for it in future
var itm = {text:value, object:this.fetchValues[this.index]}
+ var flag = (this.selectedItems[index].text != value || this.selectedItems[index].object==null ? true : false);
this.selectedItemsCache[value] = itm;
this.selectedItems[index] = itm;
+ if (flag)
+ {
+ //call user listner
+ this.callOnObjectChangeListener(event);
+ }
},
getToken: function() {
var ret = this.element.value.substring(this.startPosition, this.endPosition).replace(/^\s+/, '').replace(/\s+$/, '');
return /\n/.test(ret) ? '' : ret;
+ },
+
+ callOnObjectChangeListener: function(event)
+ {
+ if (this.options.onobjectchange)
+ {
+ this.options.onobjectchange(this, event);
+ }
}
+
}
@@ -822,7 +855,6 @@
getUpdatedChoices: function(event) {
this.options.parameters[this.options.param] = this.getToken();
- // TODO-done: add string list parameter for the values that need object from server
this.options.parameters[this.options.param + "request"] = this.getItemListForUpdate();
if (this.onsubmitFunction && ! this.onsubmitFunction()) {
return;
@@ -841,9 +873,14 @@
}
this.updateChoices();
if (data) {
- this.fetchValues = data.suggestionObjects; // use data.suggestionObjects
- // TODO-done: add update item objects from data
- this.updateSelectedItems(data.requestedObjects); // use data.requestedObjects
+ this.fetchValues = data.suggestionObjects;
+ this.updateSelectedItems(data.requestedObjects);
+ if (this.isSelectedItemsUpdated)
+ {
+ //call user listner
+ this.isSelectedItemsUpdated = false;
+ this.callOnObjectChangeListener(event);
+ }
LOG.debug("Choices updated");
}
16 years, 10 months
JBoss Rich Faces SVN: r6831 - branches/3.1.x/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-03-14 14:19:50 -0400 (Fri, 14 Mar 2008)
New Revision: 6831
Modified:
branches/3.1.x/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
Log:
http://jira.jboss.com/jira/browse/RF-2522
Modified: branches/3.1.x/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
===================================================================
--- branches/3.1.x/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2008-03-14 18:04:34 UTC (rev 6830)
+++ branches/3.1.x/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2008-03-14 18:19:50 UTC (rev 6831)
@@ -154,7 +154,8 @@
var menu = $(menuName);
var iframe = $(menuName + "_iframe");
if(!iframe&&on){
- iframe = this.initIFrame(menu);
+ this.initIFrame(menu);
+ iframe = $(menuName + "_iframe");
}
var nsfix = (this.NS ? 7 : 0);
if(on){
16 years, 10 months
JBoss Rich Faces SVN: r6830 - trunk/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-03-14 14:04:34 -0400 (Fri, 14 Mar 2008)
New Revision: 6830
Added:
trunk/docs/userguide/en/src/main/resources/images/progressbarClasses.png
trunk/docs/userguide/en/src/main/resources/images/progressbarMyClass.png
trunk/docs/userguide/en/src/main/resources/images/progressbarRedefinedClasses.png
Log:
http://jira.jboss.com/jira/browse/RF-1690
Images for ProgressBar
Added: trunk/docs/userguide/en/src/main/resources/images/progressbarClasses.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/progressbarClasses.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/docs/userguide/en/src/main/resources/images/progressbarMyClass.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/progressbarMyClass.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/docs/userguide/en/src/main/resources/images/progressbarRedefinedClasses.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/progressbarRedefinedClasses.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 10 months
JBoss Rich Faces SVN: r6829 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-03-14 13:53:24 -0400 (Fri, 14 Mar 2008)
New Revision: 6829
Modified:
trunk/docs/userguide/en/src/main/docbook/included/progressBar.xml
Log:
http://jira.jboss.com/jira/browse/RF-1690
Skin Parameters Redefinition
Definition of Custom Style Classes
Redefinition styles with predefined classes
Modified: trunk/docs/userguide/en/src/main/docbook/included/progressBar.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/progressBar.xml 2008-03-14 17:53:12 UTC (rev 6828)
+++ trunk/docs/userguide/en/src/main/docbook/included/progressBar.xml 2008-03-14 17:53:24 UTC (rev 6829)
@@ -260,7 +260,354 @@
</para>
</section>
- <!-- End of Look-and-Feel Customization-->
+ <!-- Skin Parameters Redefinition-->
+ <section>
+ <title>Skin Parameters Redefinition</title>
+
+ <table>
+ <title>Skin parameters redefinition for the "completed" part of the bar with no label</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>selectControlColor</entry>
+
+ <entry>background-color</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Skin parameters redefinition for the "completed" part of the bar with a label used</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>panelBorderColor</entry>
+
+ <entry>border-color</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Skin parameters redefinition for the “completed” part of the bar with a label used</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>selectControlColor</entry>
+
+ <entry>background-color</entry>
+ </row>
+
+ <row>
+ <entry>controlBackgroundColor</entry>
+
+ <entry>color</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Skin parameters redefinition for the "remained" part of the bar</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>controlBackgroundColor</entry>
+
+ <entry>background-color</entry>
+ </row>
+
+ <row>
+ <entry>controlTextColor</entry>
+
+ <entry>color</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Skin parameters redefinition for the bar itself with a label used</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>panelBorderColor</entry>
+
+ <entry>border-color</entry>
+ </row>
+
+ <row>
+ <entry>generalFamilyFont</entry>
+
+ <entry>font-family</entry>
+ </row>
+
+ <row>
+ <entry>headerFamilyFont</entry>
+
+ <entry>font-family</entry>
+ </row>
+
+ <row>
+ <entry>generalSizeFont</entry>
+
+ <entry>font-size</entry>
+ </row>
+
+ <row>
+ <entry>controlTextColor</entry>
+
+ <entry>color</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Skin parameters redefinition for the bar itself with no label used</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>controlBackgroundColor</entry>
+
+ <entry>background-color</entry>
+ </row>
+
+ <row>
+ <entry>panelBorderColor</entry>
+
+ <entry>border-color</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ </section>
+ <!-- END Skin Parameters Redefinition-->
+
+ <!-- Definition of Custom Style Classes-->
+
+ <section>
+ <title>Definition of Custom Style Classes</title>
+ <para>On the screenshot there are classes names that define styles for component elements.</para>
+ <figure>
+ <title>Classes names</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/progressbarClasses.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <table>
+ <title>Classes names for the bar</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>.rich-progress-bar-shell</entry>
+ <entry>Defines styles for the background and the borders of the bar when label is not used</entry>
+ </row>
+
+ <row>
+ <entry>rich-progress-bar-shell-dig</entry>
+ <entry>Defines styles for background, font and border settings when label is used</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Classes names that define "completed" part of the bar</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+
+ <row>
+ <entry>rich-progress-bar-uploaded</entry>
+ <entry>Defines styles for of "completed" progress area with no labels used</entry>
+ </row>
+ <row>
+ <entry>rich-progress-bar-uploaded-dig</entry>
+ <entry>Defines styles for that "completed" progress area with labels used </entry>
+ </row>
+
+ <row>
+ <entry>rich-progress-bar-completed</entry>
+ <entry>Defines styles for the "completed" progress area with a label used</entry>
+ </row>
+
+
+ </tbody>
+ </tgroup>
+ </table>
+
+
+
+ <table>
+ <title>Classes names that define "remained" part of the progress area</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+
+ <row>
+ <entry>rich-progress-bar-remained</entry>
+ <entry>Defines styles for the "remained" part of the bar</entry>
+ </row>
+
+
+
+ </tbody>
+ </tgroup>
+ </table>
+ <para>In order to redefine styles for all <emphasis role="bold">
+ <property><rich:progressBar></property>
+ </emphasis> components on a page using CSS, it's enough to create classes with the
+ same names (possible classes could be found in the tables <link linkend="tab_cn3"> above</link>) and define necessary properties in them. </para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="CSS"><![CDATA[...
+.rich-progress-bar-remained{
+ background-color: #5793f5;
+}
+...]]></programlisting>
+
+ <para>This is the result:</para>
+
+ <figure>
+ <title>Redefinition styles with predefined classes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/progressbarRedefinedClasses.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>In the example the "remained" part of progress area is modified with a background-color CSS property.</para>
+
+
+
+
+
+ <para>It's aslo possible to change styles of a particular
+ <emphasis role="bold"> <property><rich:progressBar></property></emphasis> component. In this case you should create own style classes and use them in corresponding <emphasis role="bold"><property><rich:progressBar></property></emphasis> <property>styleClass</property> attributes. An example is placed below:</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="CSS"><![CDATA[...
+.myFontClass{
+ color: #5793f5;
+}
+...]]></programlisting>
+ <para>The <emphasis><property>"styleClass"</property></emphasis> attribute for <emphasis role="bold"
+ ><property><rich:progressBar> </property></emphasis> is defined as it’s shown in the example below:</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="CSS"><![CDATA[<progressBar:progressBar value="#{bean.incValue1}" styleClass="myFontClass" />
+]]></programlisting>
+
+ <para>This is a result:</para>
+
+ <figure>
+ <title>Modificaton of a look and feel with own classes and <emphasis><property>styleClass</property></emphasis> attributes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/progressbarMyClass.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>As it could be seen on the picture above, the font style for output text was changed.</para>
+
+
+ </section>
+ <section>
+ <title>Relevant Resources Links</title>
+ <para>
+ <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/progressbar.jsf?c=pro...">Here</ulink>
+ you can see the example of <emphasis role="bold">
+ <property><rich:progressBar></property>
+ </emphasis> usage and sources for the given example. </para>
+
+ </section>
</section>
16 years, 10 months