JBoss Rich Faces SVN: r5184 - in trunk/sandbox/samples/progressBarDemo/src/main: webapp/pages and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-01-08 11:07:35 -0500 (Tue, 08 Jan 2008)
New Revision: 5184
Modified:
trunk/sandbox/samples/progressBarDemo/src/main/java/org/richfaces/sandbox/samples/Bean.java
trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp
trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.xhtml
Log:
Add client mode to progress bar component
Modified: trunk/sandbox/samples/progressBarDemo/src/main/java/org/richfaces/sandbox/samples/Bean.java
===================================================================
--- trunk/sandbox/samples/progressBarDemo/src/main/java/org/richfaces/sandbox/samples/Bean.java 2008-01-08 15:44:16 UTC (rev 5183)
+++ trunk/sandbox/samples/progressBarDemo/src/main/java/org/richfaces/sandbox/samples/Bean.java 2008-01-08 16:07:35 UTC (rev 5184)
@@ -22,6 +22,8 @@
package org.richfaces.sandbox.samples;
+import java.math.BigDecimal;
+import java.math.BigInteger;
import java.util.Date;
import javax.faces.event.ActionEvent;
@@ -50,7 +52,8 @@
* @return the value
*/
public Integer getValue() {
- return value ++;
+ //value = value.add(new BigDecimal(0.6));
+ return value++;
}
/**
Modified: trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp 2008-01-08 15:44:16 UTC (rev 5183)
+++ trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.jsp 2008-01-08 16:07:35 UTC (rev 5184)
@@ -6,13 +6,18 @@
<head>
<title></title>
<style>
+ body{font-size : 11px}
.complete {
background-color: green;
- font-size: 9px;
+ color: white;
}
.remain {
background-color: #FCBBCD;
}
+ .main {
+ font-size: 12px;
+ font-weight: bold;
+ }
</style>
</head>
<body>
@@ -22,11 +27,11 @@
<h:form>
<progressBar:progressBar value="#{bean.value}" enabled="#{bean.enabled}" id="progrs"
interval="500"
- style="width: 500px; height: 15px;"
+ reRender="per1"
+ styleClass="main"
determined="true"
- completeClass="complete"
- reRender="per1"
- reRenderAfterComplete="per2">
+ reRenderAfterComplete="per2"
+ mode="client">
<f:facet name="initial">
<h:outputText value="Process not started"></h:outputText>
</f:facet>
@@ -45,8 +50,12 @@
<a4j:support event="onclick" reRender="progrs"></a4j:support>
</h:selectBooleanCheckbox>
</h:form>
-
-
+ <script>
+ var pr = new ProgressBar('j_id_jsp_2009877409_1:progrs');
+ </script>
+ <input type="button" value="crack" onclick="alert(pr.getPercent());" /><br/>
+ <input type="text" value="" id="percent"/>
+ <input type="button" value="set" onclick="pr.setPercent(document.getElementById('percent').value);" />
</f:view>
</body>
</html>
Modified: trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.xhtml
===================================================================
--- trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.xhtml 2008-01-08 15:44:16 UTC (rev 5183)
+++ trunk/sandbox/samples/progressBarDemo/src/main/webapp/pages/index.xhtml 2008-01-08 16:07:35 UTC (rev 5184)
@@ -13,7 +13,7 @@
<h:form>
<progressBar:progressBar value="#{bean.value}" enabled="#{bean.enabled}" id="progrs"
interval="500"
- style="width: 300px; height: 15px;"
+ style="width: 300px; height: 20px;"
determined="true"
reRender="per1"
permanent="true"
17 years
JBoss Rich Faces SVN: r5183 - branches/3.1.x/ui/toolBar/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: akushunin
Date: 2008-01-08 10:44:16 -0500 (Tue, 08 Jan 2008)
New Revision: 5183
Modified:
branches/3.1.x/ui/toolBar/src/main/java/org/richfaces/renderkit/html/ToolBarGroupRenderer.java
Log:
RF-1825
Modified: branches/3.1.x/ui/toolBar/src/main/java/org/richfaces/renderkit/html/ToolBarGroupRenderer.java
===================================================================
--- branches/3.1.x/ui/toolBar/src/main/java/org/richfaces/renderkit/html/ToolBarGroupRenderer.java 2008-01-08 15:41:29 UTC (rev 5182)
+++ branches/3.1.x/ui/toolBar/src/main/java/org/richfaces/renderkit/html/ToolBarGroupRenderer.java 2008-01-08 15:44:16 UTC (rev 5183)
@@ -24,6 +24,7 @@
import java.io.IOException;
import java.util.Iterator;
+import java.util.List;
import javax.faces.FacesException;
import javax.faces.component.UIComponent;
@@ -59,7 +60,14 @@
String contentStyle = (String) toolBarGroup.getToolBar().getAttributes().get("contentStyle");
if (component.getChildCount() > 0) {
- for (Iterator it = component.getChildren().iterator(); it.hasNext();) {
+ List children = component.getChildren();
+ for (Iterator iter = children.iterator(); iter.hasNext();) {
+ UIComponent child = (UIComponent) iter.next();
+ if(!child.isRendered()){
+ iter.remove();
+ }
+ }
+ for (Iterator it = children.iterator(); it.hasNext();) {
UIComponent child = (UIComponent) it.next();
writer.startElement("td", component);
writer.writeAttribute("class", "dr-toolbar-int rich-toolbar-item " + contentClass +" "+styleClass, null);
@@ -71,6 +79,7 @@
if (it.hasNext()) {
insertSeparatorIfNeed(writer, facesContext, toolBarGroup);
}
+
}
}
}
17 years
JBoss Rich Faces SVN: r5182 - branches/3.1.x/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/css.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-01-08 10:41:29 -0500 (Tue, 08 Jan 2008)
New Revision: 5182
Modified:
branches/3.1.x/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/css/suggestionbox.xcss
Log:
http://jira.jboss.com/jira/browse/RF-1533
Modified: branches/3.1.x/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/css/suggestionbox.xcss
===================================================================
--- branches/3.1.x/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/css/suggestionbox.xcss 2008-01-08 15:30:24 UTC (rev 5181)
+++ branches/3.1.x/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/css/suggestionbox.xcss 2008-01-08 15:41:29 UTC (rev 5182)
@@ -31,8 +31,8 @@
}
.dr-sb-overflow {
- overflow : auto;
- overflow-x : hidden;
+ overflow-y: auto;
+ overflow-x: auto;
}
.dr-sb-int-decor-table {
17 years
JBoss Rich Faces SVN: r5181 - branches/3.1.x/ui/menu-components/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-01-08 10:30:24 -0500 (Tue, 08 Jan 2008)
New Revision: 5181
Modified:
branches/3.1.x/ui/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx
Log:
http://jira.jboss.com/jira/browse/RF-1826
Modified: branches/3.1.x/ui/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx
===================================================================
--- branches/3.1.x/ui/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx 2008-01-08 15:03:02 UTC (rev 5180)
+++ branches/3.1.x/ui/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx 2008-01-08 15:30:24 UTC (rev 5181)
@@ -47,9 +47,10 @@
<div id="#{clientId}"
class="dr-menu-item dr-menu-item-enabled rich-menu-item rich-menu-item-enabled #{component.attributes['styleClass']}"
style="#{component.attributes['style']}"
- onclick="#{component.attributes['onselect']}; #{onclick}">
+ onclick="#{component.attributes['onselect']}; #{onclick}; Event.stop(event);"
+ onmouseup="Event.stop(event); #{component.attributes['onmouseup']}" >
<f:call name="utils.encodeAttributes">
- <f:parameter value="onmousedown,onmouseup,onmousemove" />
+ <f:parameter value="onmousedown,onmousemove" />
</f:call>
<jsp:scriptlet><![CDATA[
17 years
JBoss Rich Faces SVN: r5180 - in trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html: scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-01-08 10:03:02 -0500 (Tue, 08 Jan 2008)
New Revision: 5180
Modified:
trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/css/combobox.xcss
trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
Log:
component's style was added
Modified: trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/css/combobox.xcss
===================================================================
--- trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/css/combobox.xcss 2008-01-08 14:50:24 UTC (rev 5179)
+++ trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/css/combobox.xcss 2008-01-08 15:03:02 UTC (rev 5180)
@@ -7,9 +7,18 @@
<![CDATA[
.rich-combobox-button-disabled {
+
}
.rich-combobox-field-disabled {
+ position : absolute;
+ top : 0px; left : 0;
+ padding-right :20px;
+ padding-left :3px;
+ margin : 0px;
+ border : 1px solid #eeeeee;
+ background-position:left top;
+ background-repeat:repeat-x;
}
.rich-combobox-list {
Modified: trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
===================================================================
--- trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-01-08 14:50:24 UTC (rev 5179)
+++ trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-01-08 15:03:02 UTC (rev 5180)
@@ -69,6 +69,7 @@
},
fieldHandler : function() {
+ this.doActive();
if (this.field.value == this.defaultMessage) {
this.field.value = "";
} else {
@@ -80,6 +81,7 @@
this.setValue(true);
this.comboList.hide();
+ this.field.focus();
},
setValue : function(toSetOnly) {
@@ -128,9 +130,9 @@
this.applyDefaultText();
}
this.comboList.hide();
-
- this.button.className = "rich-combobox-button-disabled"; //FIXME
- this.field.className = "rich-combobox-field-disabled"; //FIXME
+ this.doDisable();
+ } else {
+ this.doActive();
}
},
@@ -158,6 +160,16 @@
this.setValue();
}
}
+ },
+
+ doActive : function() {
+ //this.button.className = ""; //FIXME
+ this.field.className = "rich_cb_width rich_cb_font rich_cb_field"; //FIXME
+ },
+
+ doDisable : function() {
+ //this.button.className = ""; //FIXME
+ this.field.className = "rich_cb_width rich_cb_font rich-combobox-field-disabled"; //FIXME
}
};
17 years
JBoss Rich Faces SVN: r5179 - branches/3.1.x/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-01-08 09:50:24 -0500 (Tue, 08 Jan 2008)
New Revision: 5179
Modified:
branches/3.1.x/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
Log:
http://jira.jboss.com/jira/browse/RF-1649
Modified: branches/3.1.x/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
===================================================================
--- branches/3.1.x/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2008-01-08 14:15:30 UTC (rev 5178)
+++ branches/3.1.x/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2008-01-08 14:50:24 UTC (rev 5179)
@@ -81,8 +81,8 @@
this.onBlurListener = this.onBlur.bindAsEventListener(this);
Event.observe(this.element, "blur", this.onBlurListener);
- this.onKeyPressListener = this.onKeyPress.bindAsEventListener(this);
- Event.observe(this.element, "keypress", this.onKeyPressListener);
+ this.onKeyDownListener = this.onKeyDown.bindAsEventListener(this);
+ Event.observe(this.element, "keydown", this.onKeyDownListener);
if (this.isOpera) {
this.onKeyUpListener = this.onKeyUp.bindAsEventListener(this);
@@ -206,12 +206,12 @@
LOG.info("Element unloaded from DOM");
if (this.element) {
Event.stopObserving(this.element, "blur", this.onBlurListener);
- Event.stopObserving(this.element, "keypress", this.onKeyPressListener);
+ Event.stopObserving(this.element, "keydown", this.onKeyDownListener);
}
return true;
},
- onKeyPress: function(event) {
+ onKeyDown: function(event) {
if (this.isUnloaded()) return;
if (!this.initialized) {
if (this.options.iframeId) {
17 years
JBoss Rich Faces SVN: r5178 - in branches/3.1.x/ui/calendar/src/main: java/org/richfaces/component and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: akushunin
Date: 2008-01-08 09:15:30 -0500 (Tue, 08 Jan 2008)
New Revision: 5178
Modified:
branches/3.1.x/ui/calendar/src/main/config/component/calendar.xml
branches/3.1.x/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java
branches/3.1.x/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
Log:
RF-1675
Modified: branches/3.1.x/ui/calendar/src/main/config/component/calendar.xml
===================================================================
--- branches/3.1.x/ui/calendar/src/main/config/component/calendar.xml 2008-01-08 13:45:14 UTC (rev 5177)
+++ branches/3.1.x/ui/calendar/src/main/config/component/calendar.xml 2008-01-08 14:15:30 UTC (rev 5178)
@@ -60,9 +60,9 @@
disabled
</description>
</property>
- <property elonly="true">
+ <property>
<name>locale</name>
- <classname>java.util.Locale</classname>
+ <classname>java.lang.Object</classname>
<description>Used for locale definition</description>
<defaultvalue>getDefaultLocale()</defaultvalue>
</property>
Modified: branches/3.1.x/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java
===================================================================
--- branches/3.1.x/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java 2008-01-08 13:45:14 UTC (rev 5177)
+++ branches/3.1.x/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java 2008-01-08 14:15:30 UTC (rev 5178)
@@ -30,10 +30,12 @@
import java.util.TimeZone;
import javax.faces.FacesException;
+import javax.faces.application.Application;
import javax.faces.application.FacesMessage;
import javax.faces.component.UIInput;
import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
import javax.faces.convert.ConverterException;
import javax.faces.convert.DateTimeConverter;
import javax.faces.el.MethodBinding;
@@ -74,9 +76,9 @@
private final static Log log = LogFactory.getLog(UICalendar.class);
- public abstract Locale getLocale();
+ public abstract Object getLocale();
- public abstract void setLocale(Locale locale);
+ public abstract void setLocale(Object locale);
public abstract TimeZone getTimeZone();
@@ -205,7 +207,7 @@
// currentDate processing -------------------------------------------------
public Calendar getCalendar() {
- return Calendar.getInstance(getTimeZone(), getLocale());
+ return Calendar.getInstance(getTimeZone(), getAsLocale(getLocale()));
}
public Date getConvertedValue(FacesContext context, String currentDateString)
@@ -241,9 +243,10 @@
if (vb != null) {
if(vb.getType(context).equals(String.class)){
DateTimeConverter convert = new DateTimeConverter();
- convert.setLocale(getLocale());
+ convert.setLocale(getAsLocale(getLocale()));
convert.setPattern(getDatePattern());
- vb.setValue(context,convert.getAsString(context, this, currentDate));
+ vb.setValue(context, convert.getAsString(context, this,
+ currentDate));
return;
}else if(vb.getType(context).equals(Calendar.class)){
Calendar c = Calendar.getInstance();
@@ -301,7 +304,7 @@
if (date instanceof String) {
DateTimeConverter converter = new DateTimeConverter();
converter.setPattern(this.getDatePattern());
- converter.setLocale(this.getLocale());
+ converter.setLocale(getAsLocale(this.getLocale()));
converter.setTimeZone(this.getTimeZone());
FacesContext context = FacesContext.getCurrentInstance();
return (Date) converter.getAsObject(context, this,
@@ -331,7 +334,7 @@
}
protected Date getDefaultPreloadBegin(Date date) {
- Calendar calendar = Calendar.getInstance(getTimeZone(), getLocale());
+ Calendar calendar = Calendar.getInstance(getTimeZone(), getAsLocale(getLocale()));
calendar.setTime(date);
calendar.set(Calendar.DATE, calendar.getActualMinimum(Calendar.DATE));
/*
@@ -342,7 +345,7 @@
}
protected Date getDefaultPreloadEnd(Date date) {
- Calendar calendar = Calendar.getInstance(getTimeZone(), getLocale());
+ Calendar calendar = Calendar.getInstance(getTimeZone(), getAsLocale(getLocale()));
calendar.setTime(date);
calendar.set(Calendar.DATE, calendar.getActualMaximum(Calendar.DATE));
/*
@@ -514,8 +517,7 @@
List dates = new ArrayList();
- Calendar calendar = Calendar.getInstance(this.getTimeZone(), this
- .getLocale());
+ Calendar calendar = Calendar.getInstance(this.getTimeZone(), getAsLocale(this.getLocale()));
Calendar calendar2 = (Calendar) calendar.clone();
calendar.setTime(dateRangeBegin);
calendar2.setTime(dateRangeEnd);
@@ -542,4 +544,63 @@
removeFacesListener(listener);
}
+ /**
+ *Parse Locale from String.
+ *String must be represented as Locale.toString(); xx_XX_XXXX
+ */
+
+ public Locale parseLocale(String localeStr){
+
+ int length = localeStr.length();
+ if(null==localeStr||length<2){
+ return Locale.getDefault();
+ }
+
+ //Lookup index of first '_' in string locale representation.
+ int index1 = localeStr.indexOf("_");
+ //Get first charters (if exist) from string
+ String language = null;
+ if(index1!=-1){
+ language = localeStr.substring(0, index1);
+ }else{
+ return new Locale(localeStr);
+ }
+ //Lookup index of second '_' in string locale representation.
+ int index2 = localeStr.indexOf("_", index1+1);
+ String country = null;
+ if(index2!=-1){
+ country = localeStr.substring(index1+1, index2);
+ String variant = localeStr.substring(index2+1);
+ return new Locale(language, country, variant);
+ }else{
+ country = localeStr.substring(index1+1);
+ return new Locale(language, country);
+ }
+ }
+
+ public Locale getAsLocale(Object locale) {
+
+ if (locale instanceof Locale) {
+
+ return (Locale) locale;
+
+ } else if (locale instanceof String) {
+
+ return parseLocale((String) locale);
+
+ } else {
+
+ FacesContext context = FacesContext.getCurrentInstance();
+ Application application = context.getApplication();
+ Converter converter = application
+ .createConverter(locale.getClass());
+ if (null != converter) {
+ return parseLocale(converter.getAsString(context, this, locale));
+ } else {
+ throw new FacesException(
+ "Wrong locale attibute type or there is no converter for custom attibute type");
+ }
+ }
+ }
+
}
Modified: branches/3.1.x/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
===================================================================
--- branches/3.1.x/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2008-01-08 13:45:14 UTC (rev 5177)
+++ branches/3.1.x/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2008-01-08 14:15:30 UTC (rev 5178)
@@ -118,7 +118,7 @@
} else {
DateTimeConverter converter = new DateTimeConverter();
converter.setPattern(calendar.getDatePattern());
- converter.setLocale(calendar.getLocale());
+ converter.setLocale(calendar.getAsLocale(calendar.getLocale()));
converter.setTimeZone(calendar.getTimeZone());
return converter.getAsObject(context, component,
(String) submittedValue);
@@ -170,7 +170,7 @@
String styleClass = (String) calendar.getAttributes().get("styleClass");
if (styleClass != null && styleClass.length() != 0) {
ResponseWriter writer = context.getResponseWriter();
- writer.writeText(",\n className: " + styleClass, null);
+ writer.writeText(",\n className: '" + styleClass + "'", null);
}
}
@@ -354,7 +354,8 @@
DateTimeConverter converter = new DateTimeConverter();
converter.setPattern(input.getDatePattern());
- converter.setLocale(input.getLocale());
+ Object locale = input.getLocale();
+ converter.setLocale(input.getAsLocale(locale));
converter.setTimeZone(input.getTimeZone());
if (value == null) {
return converter.getAsString(context, input, curVal);
@@ -397,7 +398,7 @@
protected Map getSymbolsMap(FacesContext facesContext, UICalendar calendar) {
Map map = new HashMap();
- Locale locale = calendar.getLocale();
+ Locale locale = calendar.getAsLocale(calendar.getLocale());
Calendar cal = calendar.getCalendar();
int maximum = cal.getActualMaximum(Calendar.DAY_OF_WEEK);
int minimum = cal.getActualMinimum(Calendar.DAY_OF_WEEK);
17 years
JBoss Rich Faces SVN: r5177 - trunk/test-applications/facelets/src/main/java/inputNumberSlider.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2008-01-08 08:45:14 -0500 (Tue, 08 Jan 2008)
New Revision: 5177
Modified:
trunk/test-applications/facelets/src/main/java/inputNumberSlider/InputNumberSlider.java
Log:
http://jira.jboss.com/jira/browse/RF-1847
Modified: trunk/test-applications/facelets/src/main/java/inputNumberSlider/InputNumberSlider.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/inputNumberSlider/InputNumberSlider.java 2008-01-08 13:09:40 UTC (rev 5176)
+++ trunk/test-applications/facelets/src/main/java/inputNumberSlider/InputNumberSlider.java 2008-01-08 13:45:14 UTC (rev 5177)
@@ -19,6 +19,7 @@
private String inputStyle;
private String tipStyle;
private String handleStyle;
+ private String valueChangeListener;
private boolean immediate;
private boolean required;
private boolean showToolTip;
@@ -273,6 +274,11 @@
this.value = value;
}
+ public void valueChangeListener(ValueChangeEvent event) {
+ valueChangeListener = (String)event.getNewValue();
+ System.out.println("valueChangeListener: " + valueChangeListener);
+ }
+
public void bTest1(){
setMinValue("0");
setMaxValue("9");
@@ -285,6 +291,7 @@
setShowToolTip(true);
setShowBoundaryValues(true);
setShowInput(true);
+ setMaxlength(2);
}
public void bTest2(){
@@ -298,6 +305,7 @@
setStep("50");
setShowToolTip(false);
setShowBoundaryValues(true);
+ setMaxlength(5);
}
public void bTest3(){
@@ -311,6 +319,7 @@
setStep("2");
setShowToolTip(false);
setShowBoundaryValues(true);
+ setMaxlength(6);
}
public void bTest4(){
@@ -324,6 +333,7 @@
setStep("2");
setShowToolTip(false);
setShowBoundaryValues(true);
+ setMaxlength(2);
}
public void bTest5(){
@@ -337,5 +347,10 @@
setStep("2");
setShowToolTip(false);
setShowBoundaryValues(false);
+ setMaxlength(8);
}
+
+ public String getValueChangeListener() {
+ return valueChangeListener;
+ }
}
17 years
JBoss Rich Faces SVN: r5176 - in branches/3.1.x/ui/calendar/src/main: resources/org/richfaces/renderkit/html/css and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: akushunin
Date: 2008-01-08 08:09:40 -0500 (Tue, 08 Jan 2008)
New Revision: 5176
Modified:
branches/3.1.x/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/css/calendar.xcss
Log:
RF-1618
Modified: branches/3.1.x/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
===================================================================
--- branches/3.1.x/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2008-01-08 12:57:15 UTC (rev 5175)
+++ branches/3.1.x/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2008-01-08 13:09:40 UTC (rev 5176)
@@ -209,10 +209,8 @@
UIComponent facet = component.getFacet(facetName);
if (facet != null && facet.isRendered()) {
ResponseWriter writer = context.getResponseWriter();
- writer.writeText(",\n " + facetName + MARKUP_SUFFIX + ": "
- + "[new E('b',{},", null);
- writeMarkupScriptBody(context, facet, false);
- writer.writeText(")]", null);
+ writer.writeText(",\n " + facetName + MARKUP_SUFFIX + ": ", null);
+ writeMarkupScriptBody(context, facet, false);
}
}
Modified: branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/css/calendar.xcss
===================================================================
--- branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/css/calendar.xcss 2008-01-08 12:57:15 UTC (rev 5175)
+++ branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/css/calendar.xcss 2008-01-08 13:09:40 UTC (rev 5176)
@@ -14,6 +14,7 @@
border-bottom : 1px solid;
padding : 7px;
height : 22px;
+ font-weight: bold;
}
.rich-calendar-header{
@@ -84,6 +85,7 @@
border-right : 0px solid;
padding : 7px;
height : 22px;
+ font-weight: bold;
}
.rich-calendar-footer{
border-top : 1px solid;
17 years
JBoss Rich Faces SVN: r5175 - in trunk/framework/impl/src: main/java/org/ajax4jsf/resource and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-01-08 07:57:15 -0500 (Tue, 08 Jan 2008)
New Revision: 5175
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/css/CssCompressor.java
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/CountingOutputWriter.java
trunk/framework/impl/src/test/java/org/ajax4jsf/css/CssCompressorTest.java
Log:
RF-1843
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/css/CssCompressor.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/css/CssCompressor.java 2008-01-08 12:08:18 UTC (rev 5174)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/css/CssCompressor.java 2008-01-08 12:57:15 UTC (rev 5175)
@@ -15,6 +15,8 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import org.ajax4jsf.resource.CountingOutputWriter;
+
public class CssCompressor {
private StringBuffer srcsb = null;
@@ -146,7 +148,7 @@
// Trim the final string (for any leading or trailing white spaces)
css = css.trim();
- bytesLength = css.length() * 2;
+ bytesLength = css.length(); // * CountingOutputWriter.sizeOfChar;
// Write the output...
out.write(css);
return bytesLength;
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/resource/CountingOutputWriter.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/resource/CountingOutputWriter.java 2008-01-08 12:08:18 UTC (rev 5174)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/resource/CountingOutputWriter.java 2008-01-08 12:57:15 UTC (rev 5175)
@@ -20,10 +20,10 @@
private int written = 0;
/** Size of char type */
- private static final int sizeOfChar = 2;
+ public static final int sizeOfChar = 1;
/** Size of int type */
- private static final int sizeOfInt = 4;
+ public static final int sizeOfInt = 2;
/** Buffer to store bytes written */
private StringBuffer buffer;
@@ -32,6 +32,7 @@
* Default constructor
*/
public CountingOutputWriter() {
+
super();
this.buffer = new StringBuffer();
}
@@ -57,7 +58,7 @@
*/
public void write(char[] cbuf, int off, int len) throws IOException {
buffer.append(cbuf, off, len);
- written += len * sizeOfChar;
+ written += len; // * sizeOfChar;
}
/** Methods appends chars written to buffer
@@ -65,7 +66,7 @@
*/
public void write(char[] cbuf) throws IOException {
buffer.append(cbuf);
- written += cbuf.length * sizeOfChar;
+ written += cbuf.length; // * sizeOfChar;
}
/** Methods appends int written to buffer
@@ -83,7 +84,7 @@
*/
public void write(String str, int off, int len) throws IOException {
buffer.append(str, off, len);
- written += len * sizeOfChar;
+ written += len;// * sizeOfChar;
}
/** Methods appends string written to buffer
@@ -91,7 +92,7 @@
*/
public void write(String str) throws IOException {
buffer.append(str);
- written += str.length() * sizeOfChar;
+ written += str.length();// * sizeOfChar;
}
/** Methods gets written bytes count
Modified: trunk/framework/impl/src/test/java/org/ajax4jsf/css/CssCompressorTest.java
===================================================================
--- trunk/framework/impl/src/test/java/org/ajax4jsf/css/CssCompressorTest.java 2008-01-08 12:08:18 UTC (rev 5174)
+++ trunk/framework/impl/src/test/java/org/ajax4jsf/css/CssCompressorTest.java 2008-01-08 12:57:15 UTC (rev 5175)
@@ -20,7 +20,7 @@
public class CssCompressorTest extends TestCase {
/** Length of correctly compressed css example */
- private static final int lengthCompressed = 610;
+ private static final int lengthCompressed = 305;
/** css example to be comressed */
private static final String cssExample =
17 years