Author: abelevich
Date: 2010-10-15 13:07:02 -0400 (Fri, 15 Oct 2010)
New Revision: 19584
Modified:
trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractSelect.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/ClientSelectItem.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InputRendererBase.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/PopupConstants.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/SelectHelper.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/SelectRendererBase.java
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.ecss
trunk/ui/input/ui/src/main/templates/select.template.xml
Log:
fix css classes names, add/update license headers
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractSelect.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractSelect.java 2010-10-15
16:50:55 UTC (rev 19583)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractSelect.java 2010-10-15
17:07:02 UTC (rev 19584)
@@ -1,3 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
package org.richfaces.component;
import javax.faces.component.UISelectOne;
@@ -9,6 +31,10 @@
import org.richfaces.cdk.annotations.Tag;
+/**
+ * @author abelevich
+ *
+ */
@JsfComponent(
type = AbstractSelect.COMPONENT_TYPE,
family = AbstractSelect.COMPONENT_FAMILY,
@@ -76,13 +102,14 @@
@Attribute(events=@EventName("change"))
public abstract String getOnchange();
- @Attribute(defaultValue = "rf-au-opt")
+ @Attribute(defaultValue = "rf-sel-opt")
public abstract String getItemCss();
- @Attribute(defaultValue = "rf-au-sel")
+ //TODO: rename css class "rf-sel-opt-sel"
+ @Attribute(defaultValue = "rf-sel-sel")
public abstract String getSelectItemCss();
- @Attribute(defaultValue = "rf-au-lst-cord")
+ @Attribute(defaultValue = "rf-sel-lst-cord")
public abstract String getListCss();
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/ClientSelectItem.java
===================================================================
---
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/ClientSelectItem.java 2010-10-15
16:50:55 UTC (rev 19583)
+++
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/ClientSelectItem.java 2010-10-15
17:07:02 UTC (rev 19584)
@@ -1,3 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
package org.richfaces.renderkit;
import org.ajax4jsf.javascript.ScriptString;
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InputRendererBase.java
===================================================================
---
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InputRendererBase.java 2010-10-15
16:50:55 UTC (rev 19583)
+++
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InputRendererBase.java 2010-10-15
17:07:02 UTC (rev 19584)
@@ -1,22 +1,23 @@
-/**
- * License Agreement.
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
*
- * JBoss RichFaces - Ajax4jsf Component Library
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
*
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
+ * This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
package org.richfaces.renderkit;
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/PopupConstants.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/PopupConstants.java 2010-10-15
16:50:55 UTC (rev 19583)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/PopupConstants.java 2010-10-15
17:07:02 UTC (rev 19584)
@@ -1,3 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
package org.richfaces.renderkit;
/**
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/SelectHelper.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/SelectHelper.java 2010-10-15
16:50:55 UTC (rev 19583)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/SelectHelper.java 2010-10-15
17:07:02 UTC (rev 19584)
@@ -1,3 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
package org.richfaces.renderkit;
import java.io.IOException;
@@ -21,6 +43,12 @@
*/
public final class SelectHelper {
+ public static final String OPTIONS_SHOWCONTROL = "showControl";
+
+ public static final String OPTIONS_SELECT_ITEM_VALUE_INPUT =
"selValueInput";
+
+ public static final String OPTIONS_LIST_ITEMS = "items";
+
public static final Map<String, ComponentAttribute>
SELECT_LIST_HANDLER_ATTRIBUTES = Collections
.unmodifiableMap(ComponentAttribute.createMap(
new ComponentAttribute(HtmlConstants.ONCLICK_ATTRIBUTE)
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/SelectRendererBase.java
===================================================================
---
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/SelectRendererBase.java 2010-10-15
16:50:55 UTC (rev 19583)
+++
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/SelectRendererBase.java 2010-10-15
17:07:02 UTC (rev 19584)
@@ -1,3 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
package org.richfaces.renderkit;
import java.io.IOException;
@@ -25,15 +47,7 @@
@ResourceDependency(library = "org.richfaces", name =
"select.js"),
@ResourceDependency(library = "org.richfaces", name =
"select.ecss") })
public class SelectRendererBase extends InputRendererBase {
-
- //TODO: move to SelectHelper <!--
- public static final String OPTION_SHOWCONTROL = "showControl";
-
- public static final String OPTIONS_SELECT_ITEM_VALUE_INPUT =
"selValueInput";
- public static final String OPTION_LIST_ITEMS = "items";
- // -->
-
public void renderListHandlers(FacesContext facesContext, UIComponent component)
throws IOException {
RenderKitUtils.renderPassThroughAttributesOptimized(facesContext, component,
SelectHelper.SELECT_LIST_HANDLER_ATTRIBUTES);
}
@@ -62,8 +76,8 @@
String clientId = abstractSelect.getClientId(facesContext);
Map<String, Object> options = new HashMap<String, Object>();
- options.put(OPTION_SHOWCONTROL, abstractSelect.isShowButton());
- options.put(OPTION_LIST_ITEMS, selectItems);
+ options.put(SelectHelper.OPTIONS_SHOWCONTROL, abstractSelect.isShowButton());
+ options.put(SelectHelper.OPTIONS_LIST_ITEMS, selectItems);
options.put(PopupConstants.OPTIONS_ITEM_CLASS, abstractSelect.getItemCss());
options.put(PopupConstants.OPTIONS_SELECT_ITEM_CLASS,
abstractSelect.getSelectItemCss());
options.put(PopupConstants.OPTIONS_LIST_CLASS, abstractSelect.getListCss());
@@ -86,8 +100,4 @@
protected String getScriptName() {
return "new RichFaces.ui.Select";
}
-
- public String getListStyles(FacesContext facesContext, UIComponent component) {
- return "";
- }
}
Modified:
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.ecss
===================================================================
---
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.ecss 2010-10-15
16:50:55 UTC (rev 19583)
+++
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.ecss 2010-10-15
17:07:02 UTC (rev 19584)
@@ -1,17 +1,17 @@
-.rf-au-inp.rf-au-fnt, .rf-au-opt.rf-au-fnt{
+.rf-sel-inp.rf-s-fnt, .rf-sel-opt.rf-sel-fnt{
color: '#{richSkin.generalTextColor}';
font-size: '#{richSkin.generalSizeFont}';
font-family: '#{richSkin.generalFamilyFont}';
}
-input.rf-au-inp {
+input.rf-sel-inp {
border-width: 0px;
background: none;
width: 100%;
}
-.rf-au-fld{
+.rf-sel-fld{
width: 200px;
position: inline-block;
border-width: 1px;
@@ -24,7 +24,7 @@
background-color: '#{richSkin.controlBackgroundColor}';
}
-.rf-au-btn{
+.rf-sel-btn{
background-image:
"url(#{resource['org.richfaces.renderkit.html.images.AutocompleteButtonGradient']})";
background-repeat: repeat-x;
background-position: top left;
@@ -41,7 +41,7 @@
padding-top: 1px
}
-.rf-au-btn-arrow{
+.rf-sel-btn-arrow{
background-position: center;
background-repeat: no-repeat;
background-image:
"url(#{resource['org.richfaces:combo_down_button.gif']})";
@@ -50,13 +50,13 @@
height: 15px;
}
-.rf-au-lst-cord{
+.rf-sel-lst-cord{
position: absolute;
/* TODO nick - review: font-size: 0px; */
display: none;
}
-.rf-au-lst-dcrtn{
+.rf-sel-lst-dcrtn{
border-width: 1px;
border-style: solid;
border-color: '#{richSkin.panelBorderColor}';
@@ -64,7 +64,7 @@
background-color: '#{richSkin.tableBackgroundColor}';
}
-.rf-au-lst-scrl{
+.rf-sel-lst-scrl{
overflow: auto;
overflow-x: hidden;
width: 200px;
@@ -72,14 +72,14 @@
min-height: 20px;
}
-.rf-au-opt{
+.rf-sel-opt{
padding: 2px;
white-space: nowrap;
cursor: default;
list-style-type: none;
}
-.rf-au-sel{
+.rf-sel-sel{
padding: 1px;
width: 100%;
background-color: '#{richSkin.headerBackgroundColor}';
@@ -88,7 +88,7 @@
border-color: '#{richSkin.generalTextColor}';
}
-.rf-au-shdw{
+.rf-sel-shdw{
border: 0px solid red;
display: inline-block;
position: absolute;
@@ -98,7 +98,7 @@
left: -7px;
}
-.rf-au-shdw-t{
+.rf-sel-shdw-t{
background-image:
"url(#{resource['org.richfaces:combo_list_shadow.png']})";
background-position: top left;
position: absolute;
@@ -108,7 +108,7 @@
left: 0px
}
-.rf-au-shdw-l{
+.rf-sel-shdw-l{
background-image:
"url(#{resource['org.richfaces:combo_list_shadow.png']})";
background-position: bottom left;
position: absolute;
@@ -118,7 +118,7 @@
right: 6px;
}
-.rf-au-shdw-r{
+.rf-sel-u-shdw-r{
background-image:
"url(#{resource['org.richfaces:combo_list_shadow.png']})";
background-position: bottom right;
position: absolute;
@@ -128,7 +128,7 @@
right: 0px;
}
-.rf-au-shdw-b{
+.rf-sel-shdw-b{
background-image:
"url(#{resource['org.richfaces:combo_list_shadow.png']})";
background-position: right top;
position: absolute;
@@ -138,7 +138,7 @@
right: 0px;
}
-.rf-au-lst-ul{
+.rf-sel-lst-ul{
margin: 0px;
padding: 0px;
}
\ No newline at end of file
Modified: trunk/ui/input/ui/src/main/templates/select.template.xml
===================================================================
--- trunk/ui/input/ui/src/main/templates/select.template.xml 2010-10-15 16:50:55 UTC (rev
19583)
+++ trunk/ui/input/ui/src/main/templates/select.template.xml 2010-10-15 17:07:02 UTC (rev
19584)
@@ -19,7 +19,7 @@
<cdk:object type="java.lang.Object" name="disabled"
value="#{component.attributes['disabled']}" />
- <div id="#{clientId}" class="rf-au-fld">
+ <div id="#{clientId}" class="rf-sel-fld">
<div style="position : relative; overflow : hidden; text-align :
left; padding-right : 21px;">
<input id="#{clientId}selValue" name="#{clientId}"
type="hidden" value="#{getValue(facesContext, component)}"/>
<input cdk:passThroughWithExclusions="class autocomplete id value
disabled name type readonly"
@@ -27,34 +27,34 @@
value="#{getSelectInputLabel(facesContext, component)}"
disabled="#{disabled}"
type="text"
- class="rf-au-fnt rf-au-inp"
+ class="rf-sel-fnt rf-sel-inp"
autocomplete="off"
readonly="readonly"/>
<c:if
test="#{component.attributes['showButton']}">
<c:if
test="#{component.attributes['disabled']}">
- <div id="#{clientId}Button"
class="rf-au-btn">
- <div class="rf-au-btn-arrow"></div>
+ <div id="#{clientId}Button"
class="rf-sel-btn">
+ <div class="rf-sel-btn-arrow"></div>
</div>
</c:if>
<c:if
test="#{!component.attributes['disabled']}">
- <div id="#{clientId}Button"
class="rf-au-btn">
- <div class="rf-au-btn-arrow"></div>
+ <div id="#{clientId}Button"
class="rf-sel-btn">
+ <div class="rf-sel-btn-arrow"></div>
</div>
</c:if>
</c:if>
</div>
- <div id="#{clientId}List" class="rf-au-lst-cord">
+ <div id="#{clientId}List" class="rf-sel-lst-cord">
<cdk:call expression="renderListHandlers(facesContext,
component);"/>
- <div class="rf-au-shdw">
- <div class="rf-au-shdw-t"></div>
- <div class="rf-au-shdw-l"></div>
- <div class="rf-au-shdw-r"></div>
- <div class="rf-au-shdw-b"></div>
+ <div class="rf-sel-shdw">
+ <div class="rf-sel-shdw-t"></div>
+ <div class="rf-sel-shdw-l"></div>
+ <div class="rf-sel-shdw-r"></div>
+ <div class="rf-sel-shdw-b"></div>
- <div class="rf-au-lst-dcrtn">
- <div class="rf-au-lst-scrl">
+ <div class="rf-sel-lst-dcrtn">
+ <div class="rf-sel-lst-scrl">
<cdk:call expression="encodeItems(facesContext, component,
clientSelectItems);"/>
</div>
</div>