JBoss Rich Faces SVN: r5133 - in trunk/sandbox/ui/combobox/src/main: java/org/richfaces/renderkit and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-01-04 07:33:17 -0500 (Fri, 04 Jan 2008)
New Revision: 5133
Modified:
trunk/sandbox/ui/combobox/src/main/config/component/combobox.xml
trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/ComboBoxBaseRenderer.java
trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/css/combobox.xcss
trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx
Log:
component's style was added
Modified: trunk/sandbox/ui/combobox/src/main/config/component/combobox.xml
===================================================================
--- trunk/sandbox/ui/combobox/src/main/config/component/combobox.xml 2008-01-03 20:46:24 UTC (rev 5132)
+++ trunk/sandbox/ui/combobox/src/main/config/component/combobox.xml 2008-01-04 12:33:17 UTC (rev 5133)
@@ -45,6 +45,7 @@
<description></description>
<defaultvalue>true</defaultvalue>
</property>
+
<property>
<name>defaultMessage</name>
<classname>java.lang.String</classname>
Modified: trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/ComboBoxBaseRenderer.java
===================================================================
--- trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/ComboBoxBaseRenderer.java 2008-01-03 20:46:24 UTC (rev 5132)
+++ trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/ComboBoxBaseRenderer.java 2008-01-04 12:33:17 UTC (rev 5133)
@@ -73,6 +73,7 @@
protected void encodeSuggestion(ResponseWriter writer, UIComboBox comboBox, String value) throws IOException{
writer.startElement(HTML.DIV_ELEM, comboBox);
+ writer.writeAttribute(HTML.class_ATTRIBUTE, "rich-combobox-item rich-combobox-item-normal", null);
writer.write(value);
writer.endElement(HTML.DIV_ELEM);
}
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-03 20:46:24 UTC (rev 5132)
+++ trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/css/combobox.xcss 2008-01-04 12:33:17 UTC (rev 5133)
@@ -12,28 +12,23 @@
white-space:nowrap;
}
+.cb_list_position{ position : absolute; top:-5px; left:0px;}
+.cb_list_decoration{ border : 1px solid #c0c0c0 /*panelBorderColor*/; padding : 0px; background : #FFFFFF; /*tableBackgroundColor*/}
+.cb_list_scroll{ overflow : auto;}
+.cb_list_cord{ position : relative; font-size : 0px; /*display:none;*/ top: 2px;}/*DDL is hidden!!!!!*/
+
.rich-combobox-item {
- border:1px solid #FFFFFF;
- font-family:tahoma,arial,helvetica,sans-serif;
- font-size:12px;
- font-size-adjust:none;
- font-stretch:normal;
- font-style:normal;
- font-variant:normal;
- font-weight:normal;
- line-height:normal;
- overflow:hidden;
- padding:2px;
- white-space:nowrap;
+ padding : 2px; white-space : nowrap;
+ font-size : 11px/*generalSizeFont*/; font-family : arial/*generalFamilyFont*/; color : #000000/*generalTextColor*/
}
.rich-combobox-item-normal {
-
}
.rich-combobox-item-selected {
- background:#DFE8F6 none repeat scroll 0%;
- border:1px dotted #A3BAE9 !important;
+ padding : 1px;
+ background : #C7D7EC;
+ border : 1px dotted #000000;/*generalTextColor*/
cursor:pointer;
}
Modified: trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx
===================================================================
--- trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx 2008-01-03 20:46:24 UTC (rev 5132)
+++ trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx 2008-01-04 12:33:17 UTC (rev 5133)
@@ -63,9 +63,13 @@
</input>
<input type="text" class="rich_cb_width rich_cb_strut rich_cb_font">
</input>
- <div id="listParent#{clientId}" style="display:none" class="rich-combobox-list">
- <div id="list#{clientId}">
- <f:call name="encodeItems"/>
+ <div class="cb_list_cord">
+ <div class="cb_list_position">
+ <div id="listParent#{clientId}" class="cb_list_decoration cb_list_scroll" style="display:none">
+ <div id="list#{clientId}">
+ <f:call name="encodeItems"/>
+ </div>
+ </div>
</div>
</div>
</div>
17 years
JBoss Rich Faces SVN: r5132 - trunk/ui/orderingList/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-01-03 15:46:24 -0500 (Thu, 03 Jan 2008)
New Revision: 5132
Modified:
trunk/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingList.java
Log:
http://jira.jboss.com/jira/browse/RF-1819
Modified: trunk/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingList.java
===================================================================
--- trunk/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingList.java 2008-01-03 20:45:41 UTC (rev 5131)
+++ trunk/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingList.java 2008-01-03 20:46:24 UTC (rev 5132)
@@ -542,6 +542,9 @@
try {
final ArrayList list = new ArrayList(getRowCount());
+ Object key = getRowKey();
+ captureOrigValue(context);
+
walk(context, new DataVisitor() {
public void process(FacesContext context, Object rowKey,
Object argument) throws IOException {
@@ -552,6 +555,9 @@
}, null);
+ setRowKey(key);
+ restoreOrigValue(context);
+
newValue = createContainer(list, previousValue);
} catch (IOException e) {
throw new ConverterException(e.getLocalizedMessage(), e);
17 years
JBoss Rich Faces SVN: r5131 - in trunk/ui/listShuttle/src/main: java/org/richfaces/renderkit and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-01-03 15:45:41 -0500 (Thu, 03 Jan 2008)
New Revision: 5131
Modified:
trunk/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java
trunk/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleRendererBase.java
trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
Log:
http://jira.jboss.com/jira/browse/RF-1819
Modified: trunk/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java
===================================================================
--- trunk/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java 2008-01-03 17:16:29 UTC (rev 5130)
+++ trunk/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java 2008-01-03 20:45:41 UTC (rev 5131)
@@ -8,13 +8,11 @@
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.Map.Entry;
-import javax.faces.FacesException;
import javax.faces.application.FacesMessage;
import javax.faces.component.UIInput;
import javax.faces.context.FacesContext;
@@ -563,6 +561,10 @@
final ArrayList targetList = new ArrayList();
try {
+
+ Object key = getRowKey();
+ captureOrigValue(context);
+
walk(context, new DataVisitor() {
public void process(FacesContext context, Object rowKey,
@@ -578,6 +580,10 @@
}
}
}, null);
+
+ setRowKey(key);
+ restoreOrigValue(context);
+
} catch (IOException e) {
throw new ConverterException(e.getLocalizedMessage(), e);
}
Modified: trunk/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleRendererBase.java
===================================================================
--- trunk/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleRendererBase.java 2008-01-03 17:16:29 UTC (rev 5130)
+++ trunk/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleRendererBase.java 2008-01-03 20:45:41 UTC (rev 5131)
@@ -5,7 +5,6 @@
import java.io.IOException;
import java.io.StringWriter;
-import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
@@ -115,7 +114,7 @@
if (source == listShuttleRowKey.isFacadeSource()) {
ResponseWriter writer = context.getResponseWriter();
- String clientId = holder.getTable().getClientId(context);
+ String clientId = table.getClientId(context);
writer.startElement(HTML.TR_ELEMENT, table);
writer.writeAttribute("id", clientId, null);
Modified: trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
===================================================================
--- trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2008-01-03 17:16:29 UTC (rev 5130)
+++ trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2008-01-03 20:45:41 UTC (rev 5131)
@@ -28,6 +28,7 @@
</h:scripts>
<f:clientId var="clientId"/>
+
<table id="#{clientId}" class="rich-list-shuttle #{component.attributes['styleClass']}"
cellspacing="0" cellpadding="0"
x:passThruWithExclusions="id, class, styleClass">
@@ -47,6 +48,8 @@
Boolean switchByClick = (Boolean) component.getAttributes().get("switchByClick");
variables.setVariable("switchByClick", switchByClick);
+
+ variables.setVariable("baseClientId", component.getBaseClientId(context));
]]>
</jsp:scriptlet>
@@ -121,7 +124,7 @@
</td>
<td>
<div class="rich-shuttle-target-items #{component.listClass}" >
- <input type="hidden" value=":" style="display: none;" name="#{clientId}" />
+ <input type="hidden" value=":" style="display: none;" name="#{baseClientId}" />
<input id="#{clientId}tlFocusKeeper" type="button" value="" style="width: 1px; position: absolute; left: -32767px;"/>
17 years
JBoss Rich Faces SVN: r5130 - trunk/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2008-01-03 12:16:29 -0500 (Thu, 03 Jan 2008)
New Revision: 5130
Modified:
trunk/docs/userguide/en/src/main/resources/images/dropDownMenu4.png
trunk/docs/userguide/en/src/main/resources/images/dropDownMenu5.png
trunk/docs/userguide/en/src/main/resources/images/menuGroup3.png
trunk/docs/userguide/en/src/main/resources/images/menuItem2.png
Log:
http://jira.jboss.com/jira/browse/RF-657 - updated pictures.
Modified: trunk/docs/userguide/en/src/main/resources/images/dropDownMenu4.png
===================================================================
(Binary files differ)
Modified: trunk/docs/userguide/en/src/main/resources/images/dropDownMenu5.png
===================================================================
(Binary files differ)
Modified: trunk/docs/userguide/en/src/main/resources/images/menuGroup3.png
===================================================================
(Binary files differ)
Modified: trunk/docs/userguide/en/src/main/resources/images/menuItem2.png
===================================================================
(Binary files differ)
17 years
JBoss Rich Faces SVN: r5129 - in trunk/sandbox/ui/combobox/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-01-03 11:23:55 -0500 (Thu, 03 Jan 2008)
New Revision: 5129
Modified:
trunk/sandbox/ui/combobox/src/main/config/component/combobox.xml
trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx
Log:
new component's attributes were added
Modified: trunk/sandbox/ui/combobox/src/main/config/component/combobox.xml
===================================================================
--- trunk/sandbox/ui/combobox/src/main/config/component/combobox.xml 2008-01-03 16:09:45 UTC (rev 5128)
+++ trunk/sandbox/ui/combobox/src/main/config/component/combobox.xml 2008-01-03 16:23:55 UTC (rev 5129)
@@ -45,6 +45,11 @@
<description></description>
<defaultvalue>true</defaultvalue>
</property>
+ <property>
+ <name>defaultMessage</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ </property>
<property>
<name>listWidth</name>
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-03 16:09:45 UTC (rev 5128)
+++ trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-01-03 16:23:55 UTC (rev 5129)
@@ -12,7 +12,7 @@
this.field = $(fieldId);
this.button = $(buttonId);
- this.defaultMessage = "Select a state..."; //defaultMessage;
+ this.defaultMessage = defaultMessage;
this.onselected = onselected;
@@ -35,6 +35,10 @@
if (this.onselected) {
this.combobox.observe("rich:onselected", this.onselected);
}
+
+ if (this.defaultMessage) {
+ this.applyDefaultText();
+ }
},
clickHandler : function(event) {
Modified: trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx
===================================================================
--- trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx 2008-01-03 16:09:45 UTC (rev 5128)
+++ trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx 2008-01-03 16:23:55 UTC (rev 5129)
@@ -46,6 +46,9 @@
inputSize = HtmlUtil.qualifySize(inputSize);
}
variables.setVariable("inputSize", inputSize);
+
+ String defaultMessage = (String) component.getAttributes().get("defaultMessage");
+ variables.setVariable("defaultMessage", defaultMessage);
]]>
@@ -78,6 +81,7 @@
#{directInputSuggestions},
#{filterNewValues},
#{this:getAsEventHandler(context, component, "onlistcall")},
- #{this:getAsEventHandler(context, component, "onselected")});
+ #{this:getAsEventHandler(context, component, "onselected")},
+ "#{defaultMessage}");
</script>
</f:root>
\ No newline at end of file
17 years
JBoss Rich Faces SVN: r5128 - in trunk/sandbox/ui/pickList/src/main: java/org/richfaces/component and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-01-03 11:09:45 -0500 (Thu, 03 Jan 2008)
New Revision: 5128
Modified:
trunk/sandbox/ui/pickList/src/main/config/component/picklist.xml
trunk/sandbox/ui/pickList/src/main/java/org/richfaces/component/UIPickList.java
trunk/sandbox/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java
Log:
add additional styles and styleClasses
Modified: trunk/sandbox/ui/pickList/src/main/config/component/picklist.xml
===================================================================
--- trunk/sandbox/ui/pickList/src/main/config/component/picklist.xml 2008-01-03 16:04:37 UTC (rev 5127)
+++ trunk/sandbox/ui/pickList/src/main/config/component/picklist.xml 2008-01-03 16:09:45 UTC (rev 5128)
@@ -75,40 +75,25 @@
&html_control_events;
<property>
- <name>enabledClass</name>
+ <name>enabledStyleClass</name>
<classname>java.lang.String</classname>
</property>
<property>
- <name>disabledClass</name>
+ <name>enabledStyle</name>
<classname>java.lang.String</classname>
</property>
<property>
- <name>forceId</name>
+ <name>disabledStyleClass</name>
<classname>java.lang.String</classname>
</property>
<property>
- <name>forceIndex</name>
+ <name>disabledStyle</name>
<classname>java.lang.String</classname>
</property>
-
- <property>
- <name>onSuccess</name>
- <classname>java.lang.String</classname>
- </property>
-
- <property>
- <name>onFailure</name>
- <classname>java.lang.String</classname>
- </property>
-
- <property>
- <name>onStart</name>
- <classname>java.lang.String</classname>
- </property>
-
+
</properties>
</component>
Modified: trunk/sandbox/ui/pickList/src/main/java/org/richfaces/component/UIPickList.java
===================================================================
--- trunk/sandbox/ui/pickList/src/main/java/org/richfaces/component/UIPickList.java 2008-01-03 16:04:37 UTC (rev 5127)
+++ trunk/sandbox/ui/pickList/src/main/java/org/richfaces/component/UIPickList.java 2008-01-03 16:09:45 UTC (rev 5128)
@@ -1,16 +1,9 @@
package org.richfaces.component;
import javax.faces.component.UISelectMany;
-import javax.faces.context.FacesContext;
public abstract class UIPickList extends UISelectMany{
-
- @Override
- public String getClientId(FacesContext context) {
- //TODO forceId?
- return super.getClientId(context);
- }
-
+
public abstract boolean isDisplayValueOnly();
public abstract void setDisplayValueOnly(boolean displayValueOnly);
Modified: trunk/sandbox/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java
===================================================================
--- trunk/sandbox/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java 2008-01-03 16:04:37 UTC (rev 5127)
+++ trunk/sandbox/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java 2008-01-03 16:09:45 UTC (rev 5128)
@@ -130,13 +130,14 @@
String selectedListClientId = picklist.getClientId(context) + SELECTED_SUFFIX;
String hiddenFieldCliendId = picklist.getClientId(context) + HIDDEN_SUFFIX;
- List selectItemList = SelectUtils.getSelectItems(context,picklist);
+ List <SelectItem> selectItemList = SelectUtils.getSelectItems(context,picklist);
Converter converter = PickListUtils.findUISelectManyConverterFailsafe(context, picklist);
Set lookupSet = PickListUtils.getSubmittedOrSelectedValuesAsSet(true, picklist, context, converter);
List selectItemsForSelectedValues = selectItemsForSelectedList(context, picklist, selectItemList, converter, lookupSet);
List selectItemsForAvailableList = selectItemsForAvailableList(context, picklist, selectItemList, selectItemsForSelectedValues, converter);
writer.startElement("table", picklist);
+ writer.writeAttribute(HTML.id_ATTRIBUTE, picklist.getClientId(context), null);
writer.startElement(HTML.TR_ELEMENT, picklist);
writer.startElement(HTML.td_ELEM, picklist);
@@ -176,16 +177,77 @@
writer.endElement("table");
}
- private void encodeSelect(FacesContext context, UIComponent component, String clientId, boolean disabled,
+ private void encodeSelect(FacesContext context, UIPickList picklist, String clientId, boolean disabled,
int size, List selectItemsToDisplay, Converter converter, ResponseWriter writer) throws IOException {
- writer.startElement("select", component);
+ writer.startElement("select", picklist);
writer.writeAttribute("id", clientId, "id");
writer.writeAttribute("name", clientId, null);
writer.writeAttribute("multiple", "true", null);
- writer.writeAttribute("class", "rich-pick-list rich-pick-list-outputlist", null);
- String outputStyle = (String)component.getAttributes().get("outputStyle");
- String outputStyleClass = (String)component.getAttributes().get("outputStyleClass");
+ getUtils().encodePassThruWithExclusions(context, picklist,"size,id,dir,multiple,name,class,style,styleClass,disabled");
+
+
+ String computeStyleClass = "rich-pick-list rich-pick-list-outputlist";
+
+ String outputStyle = (String)picklist.getAttributes().get("style");
+ String outputStyleClass = (String)picklist.getAttributes().get("styleClass");
+
+ if (outputStyle != null) {
+ outputStyle = outputStyle.trim();
+ if(!outputStyle.endsWith(";")) {
+ outputStyle = outputStyle + ";";
+ }
+ }
+
+ if(outputStyleClass != null) {
+ computeStyleClass = computeStyleClass + " " + outputStyleClass;
+ }
+
+ if (picklist.isDisplayValueOnly()) {
+ String displayValueOnlyStyleClass = picklist.getDisplayValueOnlyStyleClass();
+ String displayValueOnlyStyle = picklist.getDisplayValueOnlyStyle();
+
+ if (displayValueOnlyStyleClass != null) {
+ computeStyleClass = computeStyleClass != null ? computeStyleClass + " "
+ + displayValueOnlyStyleClass : computeStyleClass;
+ }
+
+ if (displayValueOnlyStyle != null) {
+
+ displayValueOnlyStyle = displayValueOnlyStyle.trim();
+ if(!displayValueOnlyStyle.endsWith(";")) {
+ displayValueOnlyStyle = displayValueOnlyStyle + ";";
+ }
+
+ outputStyle = outputStyle != null ? outputStyle + " " + displayValueOnlyStyle : outputStyle;
+ }
+ }
+
+ if (disabled) {
+ String disabledStyleClass = (String)picklist.getAttributes().get("disabledStyleClass");
+ if (disabledStyleClass != null) {
+ computeStyleClass = computeStyleClass + " " + disabledStyleClass;
+ }
+
+ String disabledStyle = (String)picklist.getAttributes().get("disabledStyle");
+ if (disabledStyle != null) {
+ outputStyle = outputStyle != null ? outputStyle + " " + disabledStyle : disabledStyle;
+ }
+ writer.writeAttribute(HTML.DISABLED_ATTR, Boolean.TRUE, null);
+
+ } else {
+ String enabledStyleClass = (String)picklist.getAttributes().get("enabledStyleClass");
+ if (enabledStyleClass != null) {
+ computeStyleClass = computeStyleClass + " " + enabledStyleClass;
+ }
+
+ String enabledStyle = (String)picklist.getAttributes().get("enabledStyle");
+ if(enabledStyle != null) {
+ outputStyle = outputStyle != null ? outputStyle + "; " + enabledStyle : enabledStyle;
+ }
+ }
+
+ writer.writeAttribute("class", computeStyleClass, null);
writer.writeAttribute(HTML.style_ATTRIBUTE, outputStyle, null);
writer.writeAttribute(HTML.STYLE_CLASS_ATTR, outputStyleClass, null);
@@ -194,11 +256,8 @@
} else {
writer.writeAttribute("size", Integer.toString(size), null);
}
- if (disabled) {
- writer.writeAttribute(HTML.DISABLED_ATTR, Boolean.TRUE, null);
- }
-
- renderSelectOptions(context, component, converter, Collections.EMPTY_SET, selectItemsToDisplay);
+
+ renderSelectOptions(context, picklist, converter, Collections.EMPTY_SET, selectItemsToDisplay);
writer.writeText("", null);
writer.endElement("select");
}
17 years
JBoss Rich Faces SVN: r5127 - trunk/sandbox/samples/combobox-sample/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-01-03 11:04:37 -0500 (Thu, 03 Jan 2008)
New Revision: 5127
Modified:
trunk/sandbox/samples/combobox-sample/src/main/webapp/pages/index.jsp
Log:
new component's attributes were added
Modified: trunk/sandbox/samples/combobox-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/combobox-sample/src/main/webapp/pages/index.jsp 2008-01-03 16:02:47 UTC (rev 5126)
+++ trunk/sandbox/samples/combobox-sample/src/main/webapp/pages/index.jsp 2008-01-03 16:04:37 UTC (rev 5127)
@@ -8,7 +8,10 @@
<body>
<f:view>
<h:form>
- <cmb:comboBox suggestionValues="#{bean.suggestions}">
+ <cmb:comboBox suggestionValues="#{bean.suggestions}"
+ listWidth="100"
+ listHeight="150"
+ inputSize="30">
</cmb:comboBox>
</h:form>
</f:view>
17 years
JBoss Rich Faces SVN: r5126 - in trunk/sandbox/ui/combobox/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-01-03 11:02:47 -0500 (Thu, 03 Jan 2008)
New Revision: 5126
Modified:
trunk/sandbox/ui/combobox/src/main/config/component/combobox.xml
trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx
Log:
new component's attributes were added
Modified: trunk/sandbox/ui/combobox/src/main/config/component/combobox.xml
===================================================================
--- trunk/sandbox/ui/combobox/src/main/config/component/combobox.xml 2008-01-03 15:34:26 UTC (rev 5125)
+++ trunk/sandbox/ui/combobox/src/main/config/component/combobox.xml 2008-01-03 16:02:47 UTC (rev 5126)
@@ -32,7 +32,47 @@
<name>suggestionValues</name>
<classname>java.util.List</classname>
</property>
-
</properties>
+ <property>
+ <name>filterNewValues</name>
+ <classname>java.lang.Boolean</classname>
+ <description></description>
+ <defaultvalue>true</defaultvalue>
+ </property>
+ <property>
+ <name>directInputSuggestions</name>
+ <classname>java.lang.Boolean</classname>
+ <description></description>
+ <defaultvalue>true</defaultvalue>
+ </property>
+
+ <property>
+ <name>listWidth</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ </property>
+ <property>
+ <name>listHeight</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ </property>
+ <property>
+ <name>inputSize</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ </property>
+
+ <property>
+ <name>onlistcall</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>onselected</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
</component>
</components>
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-03 15:34:26 UTC (rev 5125)
+++ trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-01-03 16:02:47 UTC (rev 5126)
@@ -211,8 +211,8 @@
},
setSize : function(width, height) {
- this.listParent.style.width = width + "px";
- this.listParent.style.height = height + "px";
+ this.listParent.style.width = width;
+ this.listParent.style.height = height;
},
scrolling : function(event) {
Modified: trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx
===================================================================
--- trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx 2008-01-03 15:34:26 UTC (rev 5125)
+++ trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx 2008-01-03 16:02:47 UTC (rev 5126)
@@ -10,6 +10,8 @@
class="org.richfaces.renderkit.html.ComboBoxRenderer"
component="org.richfaces.component.UIComboBox">
+ <jsp:directive.page import="org.richfaces.component.util.HtmlUtil" />
+
<h:styles>css/combobox.xcss</h:styles>
<h:scripts>
new org.ajax4jsf.javascript.PrototypeScript(),
@@ -18,9 +20,39 @@
</h:scripts>
<f:clientid var="clientId" />
-
+
+ <jsp:scriptlet>
+ <![CDATA[
+ Boolean directInputSuggestions = (Boolean) component.getAttributes().get("directInputSuggestions");
+ variables.setVariable("directInputSuggestions", directInputSuggestions);
+
+ Boolean filterNewValues = (Boolean) component.getAttributes().get("filterNewValues");
+ variables.setVariable("filterNewValues", filterNewValues);
+
+ String listHeight = (String) component.getAttributes().get("listHeight");
+ if (listHeight != null) {
+ listHeight = HtmlUtil.qualifySize(listHeight);
+ }
+ variables.setVariable("listHeight", listHeight);
+
+ String listWidth = (String) component.getAttributes().get("listWidth");
+ if (listWidth != null) {
+ listWidth = HtmlUtil.qualifySize(listWidth);
+ }
+ variables.setVariable("listWidth", listWidth);
+
+ String inputSize = (String) component.getAttributes().get("inputSize");
+ if (inputSize != null) {
+ inputSize = HtmlUtil.qualifySize(inputSize);
+ }
+ variables.setVariable("inputSize", inputSize);
+
+
+ ]]>
+ </jsp:scriptlet>
+
<div id="#{clientId}" class="rich_cb_width rich_cb_font rich_cb_shell">
- <input id="comboboxField#{clientId}" class="rich_cb_width rich_cb_font rich_cb_field" type="text" size="20" autocomplete="off">
+ <input id="comboboxField#{clientId}" class="rich_cb_width rich_cb_font rich_cb_field" type="text" size="#{inputSize}" autocomplete="off">
</input>
<input readonly="" type="text" value="" class="rich_cb_button rich_cb_font rich_cb_button_bg">
</input>
@@ -40,8 +72,11 @@
var combobox = new Richfaces.ComboBox("#{clientId}",
"list#{clientId}",
"comboboxField#{clientId}",
- "comboboxButton#{clientId}", Richfaces.ComboBoxList.CLASSES, 100, 150,
- #{this:getItemsTextAsJSArray(context, component)}, false, false,
+ "comboboxButton#{clientId}", Richfaces.ComboBoxList.CLASSES,
+ "#{listWidth}", "#{listHeight}",
+ #{this:getItemsTextAsJSArray(context, component)},
+ #{directInputSuggestions},
+ #{filterNewValues},
#{this:getAsEventHandler(context, component, "onlistcall")},
#{this:getAsEventHandler(context, component, "onselected")});
</script>
17 years
JBoss Rich Faces SVN: r5125 - trunk/framework/impl/src/main/resources/org/ajax4jsf.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-01-03 10:34:26 -0500 (Thu, 03 Jan 2008)
New Revision: 5125
Modified:
trunk/framework/impl/src/main/resources/org/ajax4jsf/messages.properties
Log:
Added missed message to properties file.
Modified: trunk/framework/impl/src/main/resources/org/ajax4jsf/messages.properties
===================================================================
--- trunk/framework/impl/src/main/resources/org/ajax4jsf/messages.properties 2008-01-03 12:03:32 UTC (rev 5124)
+++ trunk/framework/impl/src/main/resources/org/ajax4jsf/messages.properties 2008-01-03 15:34:26 UTC (rev 5125)
@@ -253,4 +253,5 @@
SKIN_ILLEGAL_REFERENCE=Reference for property "{0}" not present in Skin configuration
NULL_ATTRIBUTE_ERROR=Required attribute {0} for component {1} is null
UI_INSERT_RESOURCE_NOT_FOUND="Resource {1} not found, component {0}
-HIGHLIGHT_LIBRARY_NOT_FOUND="In order to use highlight attribute of the rich:insert component, add jhighlight.jar from https://jhighlight.dev.java.net/ into application."
\ No newline at end of file
+HIGHLIGHT_LIBRARY_NOT_FOUND="In order to use highlight attribute of the rich:insert component, add jhighlight.jar from https://jhighlight.dev.java.net/ into application."
+INVALID_VALUE="Component {0} has invalid value expression {1}"
\ No newline at end of file
17 years