JBoss Rich Faces SVN: r5746 - trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/images.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-01-31 08:11:16 -0500 (Thu, 31 Jan 2008)
New Revision: 5746
Modified:
trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/images/ComboBoxListShadow.java
Log:
remove unnecessary imports
Modified: trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/images/ComboBoxListShadow.java
===================================================================
--- trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/images/ComboBoxListShadow.java 2008-01-31 11:47:44 UTC (rev 5745)
+++ trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/images/ComboBoxListShadow.java 2008-01-31 13:11:16 UTC (rev 5746)
@@ -7,23 +7,17 @@
import java.awt.Dimension;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
-import java.awt.geom.Rectangle2D;
-import java.awt.geom.RoundRectangle2D;
import java.awt.image.BufferedImage;
-import java.awt.image.ConvolveOp;
-import java.awt.image.Kernel;
import java.awt.image.RenderedImage;
import java.util.Date;
import javax.faces.context.FacesContext;
-import org.ajax4jsf.resource.GifRenderer;
import org.ajax4jsf.resource.ImageRenderer;
import org.ajax4jsf.resource.InternetResourceBuilder;
import org.ajax4jsf.resource.Java2Dresource;
import org.ajax4jsf.resource.PngRenderer;
import org.ajax4jsf.resource.ResourceContext;
-import org.ajax4jsf.util.Zipper2;
/**
* @author Anton Belevich
16 years, 11 months
JBoss Rich Faces SVN: r5745 - in trunk/sandbox/ui/combobox/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-01-31 06:47:44 -0500 (Thu, 31 Jan 2008)
New Revision: 5745
Modified:
trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/css/combobox.xcss
trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx
Log:
the latest changes
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-30 19:56:10 UTC (rev 5744)
+++ trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/css/combobox.xcss 2008-01-31 11:47:44 UTC (rev 5745)
@@ -76,10 +76,6 @@
font-size : 0px;
}
-.rich-combobox-list-width {
- width : 248px;
-}
-
.rich-combobox-item {
padding : 2px;
white-space : nowrap;
Modified: trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx
===================================================================
--- trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx 2008-01-30 19:56:10 UTC (rev 5744)
+++ trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx 2008-01-31 11:47:44 UTC (rev 5745)
@@ -204,7 +204,7 @@
</jsp:scriptlet>
<f:resource var="spacer" name="images/spacer.gif"/>
-<div id="control#{clientId}" class="rich-combobox-list-width rich-combobox-font rich-combobox #{styleClass}" style="width:#{listWidth};#{style}"
+<div id="control#{clientId}" class="rich-combobox-font rich-combobox #{styleClass}" style="width:#{listWidth};#{style}"
x:passThruWithExclusions="value,name,type,id,styleClass,class,style,size,autocomplete,disabled,onchange">
<input id="comboboxValue#{clientId}" name="comboboxValue#{clientId}" type="hidden"/>
<div class="rich-combobox-list-cord"></div>
@@ -249,7 +249,7 @@
</div>
<div id="listPosition#{clientId}" class="rich-combobox-list-position">
<div id="listDecoration#{clientId}" class="rich-combobox-list-decoration">
- <div id="list#{clientId}" class="rich-combobox-list-scroll rich-combobox-list-width" style="width:#{listWidth};">
+ <div id="list#{clientId}" class="rich-combobox-list-scroll">
<f:call name="encodeItems"/>
</div>
</div>
16 years, 11 months
JBoss Rich Faces SVN: r5744 - trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-01-30 14:56:10 -0500 (Wed, 30 Jan 2008)
New Revision: 5744
Modified:
trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
Log:
add support for shadow image (doesn't work in IE6)
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-30 19:55:30 UTC (rev 5743)
+++ trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-01-30 19:56:10 UTC (rev 5744)
@@ -4,7 +4,7 @@
Richfaces.ComboBox.prototype = {
- initialize: function(combobox, listId, parentListId, valueFieldId, fieldId, buttonId, buttonBGId, classes,
+ initialize: function(combobox, listId, parentListId, valueFieldId, fieldId, buttonId, buttonBGId, shadowId, classes,
listWidth, listHeight, itemsText, directInputSuggestions, filterNewValue,
selectFirstOnUpdate, onlistcall, onselected, defaultMessage, isDisabled, value,
showDelay, hideDelay) {
@@ -25,7 +25,7 @@
listWidth = (!listWidth) ? this.getCurrentWidth() : listWidth;
this.comboList = new Richfaces.ComboBoxList(listId, parentListId, selectFirstOnUpdate, classes.COMBO_LIST, listWidth,
- listHeight, itemsText, onlistcall, fieldId, showDelay, hideDelay);
+ listHeight, itemsText, onlistcall, fieldId, shadowId, showDelay, hideDelay);
this.defaultMessage = defaultMessage;
if (value) {
var item = this.comboList.findItemBySubstr(value);
@@ -353,7 +353,7 @@
Richfaces.ComboBoxList = Class.create();
Richfaces.ComboBoxList.prototype = {
- initialize: function(listId, parentListId, selectFirstOnUpdate, classes, width, height, itemsText, onlistcall, fieldId,
+ initialize: function(listId, parentListId, selectFirstOnUpdate, classes, width, height, itemsText, onlistcall, fieldId, shadowId,
showDelay, hideDelay) {
this.list = $(listId);
@@ -362,7 +362,7 @@
this.iframe = null;
this.fieldElem = $(fieldId);
this.itemsText = itemsText;
-
+ this.shadowElem = $(shadowId);
this.onlistcall = onlistcall;
if (this.onlistcall) {
@@ -503,6 +503,11 @@
this.iframe.style.height = height;
}
+ if (!Richfaces.browser.isIE6 && this.shadowElem) {
+ this.shadowElem.style.width = (parseInt(this.width) + 7) + "px";
+ this.shadowElem.style.height = (parseInt(height) + 9)+ "px";
+ }
+
this.setWidth(this.width);
},
@@ -514,6 +519,7 @@
var correction = parseInt(width) - Richfaces.getBorderWidth(positionElem.firstChild, "lr") - Richfaces.getPaddingWidth(positionElem.firstChild, "lr") + "px";
this.list.style.width = correction;
combobox.style.width = correction;
+
if (this.iframe) {
this.iframe.style.width = correction;
}
16 years, 11 months
JBoss Rich Faces SVN: r5743 - trunk/sandbox/ui/combobox/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-01-30 14:55:30 -0500 (Wed, 30 Jan 2008)
New Revision: 5743
Modified:
trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx
Log:
add support for shadow image
Modified: trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx
===================================================================
--- trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx 2008-01-30 19:55:00 UTC (rev 5742)
+++ trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx 2008-01-30 19:55:30 UTC (rev 5743)
@@ -16,7 +16,8 @@
<h:scripts>
new org.ajax4jsf.javascript.PrototypeScript(),
scripts/comboboxUtils.js,
- scripts/combobox.js
+ scripts/combobox.js,
+ /org/richfaces/renderkit/html/scripts/utils.js
</h:scripts>
<f:clientid var="clientId" />
@@ -227,7 +228,7 @@
<div id="listParent#{clientId}" class="rich-combobox-list-cord #{listClass}" style="display:none; #{listStyle};z-index: 3;position:absolute;">
<div class="rich-combobox-shadow">
- <table cellpadding="0" cellspacing="0" border="0" width="255" height="109">
+ <table id="shadow#{clientId}" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="rich-combobox-shadow-tl">
<img src="#{spacer}" width="10" height="1" alt="" border="0"></img><br></br>
@@ -304,6 +305,7 @@
"comboboxField#{clientId}",
"comboboxButton#{clientId}",
"comboBoxButtonBG#{clientId}",
+ "shadow#{clientId}",
Richfaces.ComboBox.CLASSES,
"#{listWidth}", "#{listHeight}",
#{this:getItemsTextAsJSArray(context, component)},
16 years, 11 months
JBoss Rich Faces SVN: r5742 - trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/css.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-01-30 14:55:00 -0500 (Wed, 30 Jan 2008)
New Revision: 5742
Modified:
trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/css/combobox.xcss
Log:
remove dotted border style from item class
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-30 19:54:20 UTC (rev 5741)
+++ trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/css/combobox.xcss 2008-01-30 19:55:00 UTC (rev 5742)
@@ -88,7 +88,7 @@
.rich-combobox-item-selected {
padding : 1px;
- border : 1px dotted #4a75b5;
+ border : 1px solid #4a75b5;
background-color: #4a75b5;
width : 100%;
cursor:pointer;
@@ -195,15 +195,56 @@
border-style : solid;
}
-.rich-combobox-shadow{ top:10; left:0; position : absolute;}
-.rich-combobox-shadow-tl{repeat-x top left;}
-.rich-combobox-shadow-tr{repeat-x top right;}
-.rich-combobox-shadow-bl{repeat-x bottom left;}
-.rich-combobox-shadow-br{repeat-x bottom right;}
+.rich-combobox-shadow{
+ position : absolute;
+}
+
+.rich-combobox-shadow-tl{
+ background-position: top left;
+ background-repeat: repeat-x;
+
+}
+.rich-combobox-shadow-tr{
+ background-repeat: repeat-x;
+ background-position: top right;
+}
+.rich-combobox-shadow-bl{
+ background-repeat: repeat-x;
+ background-position: bottom left;
+}
+.rich-combobox-shadow-br{
+ background-repeat: repeat-x;
+ background-position: bottom right;
+}
]]>
</f:verbatim>
+ <u:selector name=".rich-combobox-shadow-tl">
+ <u:style name="background-image">
+ <f:resource f:key="org.richfaces.renderkit.images.ComboBoxListShadow" />
+ </u:style>
+ </u:selector>
+
+ <u:selector name=".rich-combobox-shadow-tr">
+ <u:style name="background-image">
+ <f:resource f:key="org.richfaces.renderkit.images.ComboBoxListShadow" />
+ </u:style>
+ </u:selector>
+
+ <u:selector name=".rich-combobox-shadow-bl">
+ <u:style name="background-image">
+ <f:resource f:key="org.richfaces.renderkit.images.ComboBoxListShadow" />
+ </u:style>
+ </u:selector>
+
+ <u:selector name=".rich-combobox-shadow-br">
+ <u:style name="background-image">
+ <f:resource f:key="org.richfaces.renderkit.images.ComboBoxListShadow" />
+ </u:style>
+ </u:selector>
+
+
<u:selector name=".rich-combobox-button-background">
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.images.ComboBoxButtonGradient" />
16 years, 11 months
JBoss Rich Faces SVN: r5741 - in trunk/sandbox/ui/combobox/src/main: java/org/richfaces/renderkit/images and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-01-30 14:54:20 -0500 (Wed, 30 Jan 2008)
New Revision: 5741
Added:
trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/images/ComboBoxListShadow.java
Modified:
trunk/sandbox/ui/combobox/src/main/config/resources/resource-config.xml
Log:
add shadow picture generate class
Modified: trunk/sandbox/ui/combobox/src/main/config/resources/resource-config.xml
===================================================================
--- trunk/sandbox/ui/combobox/src/main/config/resources/resource-config.xml 2008-01-30 19:53:23 UTC (rev 5740)
+++ trunk/sandbox/ui/combobox/src/main/config/resources/resource-config.xml 2008-01-30 19:54:20 UTC (rev 5741)
@@ -15,6 +15,9 @@
<resource class="org.richfaces.renderkit.images.ComboBoxArrowImageDisable">
<name>org.richfaces.renderkit.images.ComboBoxArrowImageDisable</name>
</resource>
+ <resource class="org.richfaces.renderkit.images.ComboBoxListShadow">
+ <name>org.richfaces.renderkit.images.ComboBoxListShadow</name>
+ </resource>
</resource-config>
Added: trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/images/ComboBoxListShadow.java
===================================================================
--- trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/images/ComboBoxListShadow.java (rev 0)
+++ trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/images/ComboBoxListShadow.java 2008-01-30 19:54:20 UTC (rev 5741)
@@ -0,0 +1,79 @@
+/**
+ *
+ */
+package org.richfaces.renderkit.images;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.Rectangle2D;
+import java.awt.geom.RoundRectangle2D;
+import java.awt.image.BufferedImage;
+import java.awt.image.ConvolveOp;
+import java.awt.image.Kernel;
+import java.awt.image.RenderedImage;
+import java.util.Date;
+
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.resource.GifRenderer;
+import org.ajax4jsf.resource.ImageRenderer;
+import org.ajax4jsf.resource.InternetResourceBuilder;
+import org.ajax4jsf.resource.Java2Dresource;
+import org.ajax4jsf.resource.PngRenderer;
+import org.ajax4jsf.resource.ResourceContext;
+import org.ajax4jsf.util.Zipper2;
+
+/**
+ * @author Anton Belevich
+ *
+ */
+public class ComboBoxListShadow extends Java2Dresource {
+
+ static final Dimension dimensions = new Dimension(1010, 1010);
+
+ public ComboBoxListShadow() {
+ setRenderer(new PngRenderer());
+ setLastModified(new Date(InternetResourceBuilder.getInstance().getStartTime()));
+ }
+
+ protected Dimension getDimensions(ResourceContext resourceContext) {
+ return dimensions;
+ }
+ public Dimension getDimensions(FacesContext facesContext, Object data) {
+ return dimensions;
+ }
+
+ protected RenderedImage getImage(ResourceContext context) {
+
+ ImageRenderer renderer = (ImageRenderer)getRenderer(null);
+ Dimension imageDimensions = getDimensions(context);
+
+ BufferedImage image = null;
+ if (imageDimensions.getHeight() > 0.0 && imageDimensions.getWidth() > 0.0) {
+
+ int cornerSize = 15;
+ int rectWidth = imageDimensions.width;
+ float shadowOpacity = 0.02f;
+
+ image = renderer.createImage(rectWidth,rectWidth);
+ Graphics2D g2d = image.createGraphics();
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
+ g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
+ g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
+ g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+ for (int i = 0; i < 10; i++) {
+ g2d.setColor(new Color(0.0f, 0.0f, 0.0f, shadowOpacity));
+ shadowOpacity = shadowOpacity * 1.4f;
+ g2d.fillRoundRect(i, i, rectWidth-2*i, rectWidth-2*i, cornerSize, cornerSize);
+ }
+ g2d.dispose();
+ }
+
+ return image;
+ }
+}
16 years, 11 months
JBoss Rich Faces SVN: r5740 - trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-01-30 14:53:23 -0500 (Wed, 30 Jan 2008)
New Revision: 5740
Modified:
trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/ComboBoxBaseRenderer.java
Log:
decode new id
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-30 16:09:49 UTC (rev 5739)
+++ trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/ComboBoxBaseRenderer.java 2008-01-30 19:53:23 UTC (rev 5740)
@@ -69,7 +69,7 @@
throw new NullPointerException("component " + comboBox.getClientId(context) + " client id is NULL" );
}
- clientId = "comboboxField" + clientId;
+ clientId = "comboboxValue" + clientId;
Map request = context.getExternalContext().getRequestParameterMap();
if (request.containsKey(clientId)) {
String newValue = (String)request.get(clientId);
16 years, 11 months
JBoss Rich Faces SVN: r5739 - in trunk: samples/calendar-sample/src/main/webapp/pages and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-01-30 11:09:49 -0500 (Wed, 30 Jan 2008)
New Revision: 5739
Modified:
trunk/samples/calendar-sample/src/main/java/org/richfaces/CalendarBean.java
trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp
trunk/ui/calendar/src/main/config/component/calendar.xml
trunk/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx
Log:
RF-2026
Modified: trunk/samples/calendar-sample/src/main/java/org/richfaces/CalendarBean.java
===================================================================
--- trunk/samples/calendar-sample/src/main/java/org/richfaces/CalendarBean.java 2008-01-30 15:28:09 UTC (rev 5738)
+++ trunk/samples/calendar-sample/src/main/java/org/richfaces/CalendarBean.java 2008-01-30 16:09:49 UTC (rev 5739)
@@ -55,6 +55,8 @@
private String direction;
private String boundary;
private String todayControlMode;
+ private boolean showHeader;
+ private boolean showFooter;
private int counter;
@@ -256,4 +258,20 @@
public void setTodayControlMode(String todayControlMode) {
this.todayControlMode = todayControlMode;
}
+
+ public boolean isShowHeader() {
+ return showHeader;
+ }
+
+ public void setShowHeader(boolean showHeader) {
+ this.showHeader = showHeader;
+ }
+
+ public boolean isShowFooter() {
+ return showFooter;
+ }
+
+ public void setShowFooter(boolean showFooter) {
+ this.showFooter = showFooter;
+ }
}
\ No newline at end of file
Modified: trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp
===================================================================
--- trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp 2008-01-30 15:28:09 UTC (rev 5738)
+++ trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp 2008-01-30 16:09:49 UTC (rev 5739)
@@ -21,6 +21,11 @@
background-color: #0087FF;
}
</style>
+ <script>
+ var statusStart = 0;
+ var statusStop = 0;
+ var supportComplete = 0;
+ </script>
</head>
<body>
<f:view>
@@ -28,6 +33,7 @@
<h:messages showDetail="true" showSummary="true"/>
</a4j:outputPanel>
<h:form>
+ <a4j:commandLink value="Click" oncomplete="alert('supportComplete: '+(++supportComplete));" />
<h:panelGroup id="counter">
<h:outputText value="#{calendarBean.counter}" />
</h:panelGroup>
@@ -59,6 +65,8 @@
boundaryDatesMode="#{calendarBean.boundary}"
currentDateChangeListener="#{calendarBean.dcl}"
valueChangeListener="#{calendarBean.ddd}"
+ showHeader="#{calendarBean.showHeader}"
+ showFooter="#{calendarBean.showFooter}"
reRender="counter"
inputClass="ic"
buttonClass="bc"
@@ -72,10 +80,7 @@
<f:facet name="optionalHeader">
<h:outputText value="optionalHeader Facet" />
</f:facet>
- <f:facet name="optionalFooter">
- <h:outputText value="optionalFooter Facet" />
- </f:facet>
-
+
<f:facet name="weekDay"><f:verbatim><span style="padding: 2px; font-size: 10px" >{weekDayLabelShort}</span></f:verbatim></f:facet>
<f:validator validatorId="org.richfaces.CalendarValidator" />
@@ -104,8 +109,13 @@
<h:selectBooleanCheckbox value="#{calendarBean.useCustomDayLabels}" onclick="submit()"/>
<h:outputText value="Show Apply Button:" />
<h:selectBooleanCheckbox value="#{calendarBean.showApplyButton}" onclick="submit()"/>
+ <h:outputText value="Show Header:" />
+ <h:selectBooleanCheckbox value="#{calendarBean.showHeader}" onclick="submit()"/>
+ <h:outputText value="Show Footer:" />
+ <h:selectBooleanCheckbox value="#{calendarBean.showFooter}" onclick="submit()"/>
<h:outputText value="Select Date Pattern:"/>
<h:selectOneMenu value="MMM d, yyyy" onchange="submit()" valueChangeListener="#{calendarBean.selectPattern}">
+ <f:selectItem itemLabel="yyyyMMdd" itemValue="yyyyMMdd"/>
<f:selectItem itemLabel="d/M/yy" itemValue="d/M/yy"/>
<f:selectItem itemLabel="dd/M/yy" itemValue="dd/M/yy"/>
<f:selectItem itemLabel="d/MMM/y" itemValue="d/MMM/y"/>
Modified: trunk/ui/calendar/src/main/config/component/calendar.xml
===================================================================
--- trunk/ui/calendar/src/main/config/component/calendar.xml 2008-01-30 15:28:09 UTC (rev 5738)
+++ trunk/ui/calendar/src/main/config/component/calendar.xml 2008-01-30 16:09:49 UTC (rev 5739)
@@ -510,14 +510,6 @@
<defaultvalue>true</defaultvalue>
</property>
<property>
- <name>showScrollerBar</name>
- <classname>boolean</classname>
- <description>
- If false this bar should not be shown
- </description>
- <defaultvalue>true</defaultvalue>
- </property>
- <property>
<name>todayControlMode</name>
<classname>java.lang.String</classname>
<description>
@@ -543,6 +535,22 @@
<classname>java.lang.String</classname>
<description>A localized user presentable name for this component.</description>
</property>
+ <property>
+ <name>showHeader</name>
+ <classname>boolean</classname>
+ <description>
+ If false Calendar's header should not be shown
+ </description>
+ <defaultvalue>true</defaultvalue>
+ </property>
+ <property>
+ <name>showFooter</name>
+ <classname>boolean</classname>
+ <description>
+ If false Calendar's footer should not be shown
+ </description>
+ <defaultvalue>true</defaultvalue>
+ </property>
</component>
&listeners;
Modified: trunk/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java
===================================================================
--- trunk/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java 2008-01-30 15:28:09 UTC (rev 5738)
+++ trunk/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java 2008-01-30 16:09:49 UTC (rev 5739)
@@ -188,10 +188,14 @@
public abstract void setShowWeeksBar(boolean showWeeksBar);
- public abstract boolean isShowScrollerBar();
+ public abstract boolean isShowHeader();
- public abstract void setShowScrollerBar(boolean showScrollerBar);
+ public abstract void setShowHeader(boolean showScrollerBar);
+ public abstract boolean isShowFooter();
+
+ public abstract void setShowFooter(boolean showScrollerBar);
+
public abstract String getTodayControlMode();
public abstract void setTodayControlMode(String todayControlMode);
Modified: trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
--- trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2008-01-30 15:28:09 UTC (rev 5738)
+++ trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2008-01-30 16:09:49 UTC (rev 5739)
@@ -132,7 +132,6 @@
els.display = originalDisplay;
els.position = originalPosition;
els.visibility = originalVisibility;
-
element.style.left = (ox + windowRect.left) + 'px';
element.style.top = (oy + windowRect.top) + 'px';
};
@@ -501,7 +500,6 @@
Calendar = Class.create();
Object.extend(Calendar.prototype, {
initialize: function(id,parameters) {
-
// dayListTableId, weekNumberBarId, weekDayBarId - 3 tables ids',
// dayListMarkup - day cell markup
@@ -525,6 +523,8 @@
// showWeekDaysBar - show WeekDays Bar [default value is true]
// showWeeksBar - show Weeks numbers bar [default value is true]
// showApplyButton
+ // showHeader
+ // showFooter
// POPUP description
// direction - [top-left, top-right, bottom-left, bottom-right, auto]
@@ -550,7 +550,7 @@
// className - table class
//var _d = new Date();
-
+
this.id = id;
this.params = parameters;
@@ -640,8 +640,8 @@
var colspan = (this.params.showWeeksBar ? "8" : "7");
var htmlHeaderOptional = (this.params.optionalHeaderMarkup) ? '<tr><td class="rich-calendar-header-optional" colspan="'+colspan+'" id="'+this.id+'HeaderOptional"></td></tr>' : '';
var htmlFooterOptional = (this.params.optionalFooterMarkup) ? '<tr><td class="rich-calendar-footer-optional" colspan="'+colspan+'" id="'+this.id+'FooterOptional"></td></tr>' : '';
- var htmlControlsHeader = '<tr><td class="rich-calendar-header" colspan="'+colspan+'" id="'+this.id+'Header"></td></tr>';
- var htmlControlsFooter = '<tr><td class="rich-calendar-footer" colspan="'+colspan+'" id="'+this.id+'Footer"></td></tr>';
+ var htmlControlsHeader = (this.params.showHeader ? '<tr><td class="rich-calendar-header" colspan="'+colspan+'" id="'+this.id+'Header"></td></tr>' : '');
+ var htmlControlsFooter = (this.params.showFooter ? '<tr><td class="rich-calendar-footer" colspan="'+colspan+'" id="'+this.id+'Footer"></td></tr>' : '');
var htmlTextFooter = '</tbody></table>\n'
var htmlTextIFrame = '<iframe src="javascript:\'\'" frameborder="0" scrolling="no" id="' + this.IFRAME_ID + '" style="display:none; position: absolute; width: 1px; height: 1px; background-color:white;">'+'</iframe>\n';
@@ -1053,6 +1053,7 @@
},
doCollapse: function() {
+
if (!this.params.popup || !this.isVisible) return;
if (this.isEditorVisible) this.hideEditor();
@@ -1127,7 +1128,6 @@
iframe.style.height = edim.height+'px';
Element.show(iframe);
}
-
Element.show(element);
this.isVisible = true;
@@ -1591,8 +1591,8 @@
renderHF: function()
{
- this.renderMarkup(this.params.headerMarkup, this.id+"Header", this.calendarContext);
- this.renderMarkup(this.params.footerMarkup, this.id+"Footer", this.calendarContext);
+ if (this.params.showHeader) this.renderMarkup(this.params.headerMarkup, this.id+"Header", this.calendarContext);
+ if (this.params.showFooter) this.renderMarkup(this.params.footerMarkup, this.id+"Footer", this.calendarContext);
},
renderHeaderOptional: function()
Modified: trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx
===================================================================
--- trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx 2008-01-30 15:28:09 UTC (rev 5738)
+++ trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx 2008-01-30 16:09:49 UTC (rev 5739)
@@ -184,7 +184,8 @@
firstWeekDay: #{this:getFirstWeekDay(context, component)},
minDaysInFirstWeek: #{this:getMinDaysInFirstWeek(context, component)},
todayControlMode:'#{component.attributes["todayControlMode"]}',
- showScrollerBar:#{component.attributes['showScrollerBar']},
+ showHeader:#{component.attributes['showHeader']},
+ showFooter:#{component.attributes['showFooter']},
showWeeksBar:#{component.attributes['showWeeksBar']},
showWeekDaysBar:#{component.attributes['showWeekDaysBar']},
showApplyButton:#{component.attributes['showApplyButton']}
16 years, 11 months
JBoss Rich Faces SVN: r5738 - in trunk/sandbox/ui/progressBAR/src/main: resources/org/richfaces/renderkit/html/js and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-01-30 10:28:09 -0500 (Wed, 30 Jan 2008)
New Revision: 5738
Modified:
trunk/sandbox/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java
trunk/sandbox/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/js/progressBar.js
Log:
fix error in case of absence of children components
Modified: trunk/sandbox/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java
===================================================================
--- trunk/sandbox/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java 2008-01-30 15:07:51 UTC (rev 5737)
+++ trunk/sandbox/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java 2008-01-30 15:28:09 UTC (rev 5738)
@@ -138,8 +138,10 @@
AbstractProgressBarRenderer renderer) {
JSLiteral literal = null;
try {
- literal = new JSLiteral(renderer.getMarkup(context, this)
- .toString());
+ StringBuffer markup = renderer.getMarkup(context, this);
+ if (markup != null) {
+ literal = new JSLiteral(markup.toString());
+ }
} catch (Exception e) {
}
Modified: trunk/sandbox/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/js/progressBar.js
===================================================================
--- trunk/sandbox/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/js/progressBar.js 2008-01-30 15:07:51 UTC (rev 5737)
+++ trunk/sandbox/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/js/progressBar.js 2008-01-30 15:28:09 UTC (rev 5738)
@@ -93,6 +93,9 @@
return context;
},
renderLabel: function (markup, context) {
+ if (!markup) {
+ return;
+ }
if (!context) {
context = this.getContext();
}
16 years, 11 months
JBoss Rich Faces SVN: r5737 - in trunk: ui/dataTable/src/main/resources/org/richfaces/renderkit/html/scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2008-01-30 10:07:51 -0500 (Wed, 30 Jan 2008)
New Revision: 5737
Modified:
trunk/framework/impl/src/main/java/org/richfaces/model/impl/expressive/ValueBindingExpression.java
trunk/ui/dataTable/src/main/resources/org/richfaces/renderkit/html/scripts/data-table.js
Log:
fixed ValueBindingExpression
Modified: trunk/framework/impl/src/main/java/org/richfaces/model/impl/expressive/ValueBindingExpression.java
===================================================================
--- trunk/framework/impl/src/main/java/org/richfaces/model/impl/expressive/ValueBindingExpression.java 2008-01-30 14:35:31 UTC (rev 5736)
+++ trunk/framework/impl/src/main/java/org/richfaces/model/impl/expressive/ValueBindingExpression.java 2008-01-30 15:07:51 UTC (rev 5737)
@@ -1,5 +1,7 @@
package org.richfaces.model.impl.expressive;
+import java.util.Map;
+
import javax.el.ELContext;
import javax.el.ExpressionFactory;
import javax.el.ValueExpression;
@@ -20,6 +22,7 @@
private ValueExpression valueExpression;
private VariableMapper mapper;
private ExpressionFactory factory;
+ private Map<String, Object> requestMap;
/**
* @param n
* @param application
@@ -36,6 +39,7 @@
valueExpression = expressionFactory.createValueExpression(context, expressionString, Object.class);
mapper = context.getVariableMapper();
factory = expressionFactory;
+ requestMap = faces.getExternalContext().getRequestMap();
}
ValueBindingExpression(FacesContext faces, ValueExpression valueExpression, String var) {
@@ -46,10 +50,12 @@
this.valueExpression = valueExpression;
mapper = context.getVariableMapper();
factory = expressionFactory;
+ requestMap = faces.getExternalContext().getRequestMap();
}
public Object evaluate(Object base) {
- mapper.setVariable(var, factory.createValueExpression(base, Object.class));
+ //mapper.setVariable(var, factory.createValueExpression(base, Object.class));
+ requestMap.put(var, base);
return valueExpression.getValue(context);
}
}
\ No newline at end of file
Modified: trunk/ui/dataTable/src/main/resources/org/richfaces/renderkit/html/scripts/data-table.js
===================================================================
--- trunk/ui/dataTable/src/main/resources/org/richfaces/renderkit/html/scripts/data-table.js 2008-01-30 14:35:31 UTC (rev 5736)
+++ trunk/ui/dataTable/src/main/resources/org/richfaces/renderkit/html/scripts/data-table.js 2008-01-30 15:07:51 UTC (rev 5737)
@@ -100,7 +100,7 @@
element.observe("click", this.onclick);
},
getElement : function () {
- return $($(this.id).parentNode);
+ return $($(this.id)/*.parentNode*/);
},
displaySortedAscending : function() {
this.getElement()
16 years, 11 months