JBoss Rich Faces SVN: r8426 - in trunk/docs: highlight and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-05-03 06:55:16 -0400 (Sat, 03 May 2008)
New Revision: 8426
Modified:
trunk/docs/highlight/pom.xml
trunk/docs/pom.xml
trunk/docs/userguide/pom.xml
trunk/docs/xslt/pom.xml
Log:
http://jira.jboss.com/jira/browse/RF-3189 - snapshots repo was added, bug with build fixed
Modified: trunk/docs/highlight/pom.xml
===================================================================
--- trunk/docs/highlight/pom.xml 2008-05-03 10:50:14 UTC (rev 8425)
+++ trunk/docs/highlight/pom.xml 2008-05-03 10:55:16 UTC (rev 8426)
@@ -124,13 +124,13 @@
<version>1.0</version>
</dependency>
</dependencies>
- <build>
+ <!--build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>2.0</version>
+ <version>2.0.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
@@ -138,6 +138,6 @@
</plugin>
</plugins>
</pluginManagement>
- </build>
+ </build-->
</project>
\ No newline at end of file
Modified: trunk/docs/pom.xml
===================================================================
--- trunk/docs/pom.xml 2008-05-03 10:50:14 UTC (rev 8425)
+++ trunk/docs/pom.xml 2008-05-03 10:55:16 UTC (rev 8426)
@@ -26,19 +26,6 @@
<url>http://repository.jboss.com/maven2/</url>
<layout>default</layout>
</repository>
- <repository>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- <updatePolicy>always</updatePolicy>
- </snapshots>
- <id>maven2-snapshots.exadel.com</id>
- <name>Exadel Repository for Maven Snapshots</name>
- <url>http://maven.exadel.com/</url>
- <layout>default</layout>
- </repository>
<repository>
<id>eclipse</id>
<url>http://repo1.maven.org/eclipse/</url>
@@ -46,20 +33,8 @@
</repositories>
<pluginRepositories>
<pluginRepository>
- <id>maven2-snapshots.exadel.com</id>
- <name>Exadel Repository for Maven Snapshots</name>
- <url>http://maven.exadel.com/</url>
<releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
<enabled>true</enabled>
- <updatePolicy>always</updatePolicy>
- </snapshots>
- </pluginRepository>
- <pluginRepository>
- <releases>
- <enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
@@ -91,5 +66,20 @@
<module>faq</module>
<module>migrationguide</module>
- </modules>
+ </modules>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
</project>
\ No newline at end of file
Modified: trunk/docs/userguide/pom.xml
===================================================================
--- trunk/docs/userguide/pom.xml 2008-05-03 10:50:14 UTC (rev 8425)
+++ trunk/docs/userguide/pom.xml 2008-05-03 10:55:16 UTC (rev 8426)
@@ -25,7 +25,20 @@
<url>http://repository.jboss.com/maven2/</url>
<layout>default</layout>
</pluginRepository>
+ <pluginRepository>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <id>snapshots.jboss.org</id>
+ <name>Jboss Snapshots Repository for Maven</name>
+ <url>http://snapshots.jboss.org/maven2/</url>
+ <layout>default</layout>
+ </pluginRepository>
</pluginRepositories>
+
<build>
<pluginManagement>
<plugins>
Modified: trunk/docs/xslt/pom.xml
===================================================================
--- trunk/docs/xslt/pom.xml 2008-05-03 10:50:14 UTC (rev 8425)
+++ trunk/docs/xslt/pom.xml 2008-05-03 10:55:16 UTC (rev 8426)
@@ -14,4 +14,16 @@
<modules>
<module>en</module>
</modules>
+ <!--build>
+
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build-->
</project>
\ No newline at end of file
16 years, 8 months
JBoss Rich Faces SVN: r8425 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2008-05-03 06:50:14 -0400 (Sat, 03 May 2008)
New Revision: 8425
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCidesupport.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-318
Editing Red Had Developer Studio 1.0.0 name.
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCidesupport.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCidesupport.xml 2008-05-03 08:46:28 UTC (rev 8424)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCidesupport.xml 2008-05-03 10:50:14 UTC (rev 8425)
@@ -14,7 +14,7 @@
</keywordset>
</chapterinfo>
<title>IDE Support</title>
- <para><ulink url="http://www.redhat.com/developers/rhds/index.html">Red Had Developer Studio 1.0.0</ulink> is an <property>IDE</property> that provides full support for Java Server Faces, RichFaces, Facelets, Struts, and other Web technologies. In addition to this, it seamlessly combines visual and source-oriented development approaches.
+ <para><ulink url="http://www.redhat.com/developers/rhds/index.html">JBoss Developer Studio 1.0.0</ulink> is an <property>IDE</property> that provides full support for Java Server Faces, RichFaces, Facelets, Struts, and other Web technologies. In addition to this, it seamlessly combines visual and source-oriented development approaches.
One of the special support feature for <property>RichFaces</property> is that it is available as project "capabilities". These project capabilities can be added to any existing JSF project to make the project a RichFaces JSF project by automatically adding libraries and modifying configuration files as required.</para>
</chapter>
16 years, 8 months
JBoss Rich Faces SVN: r8424 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2008-05-03 04:46:28 -0400 (Sat, 03 May 2008)
New Revision: 8424
Modified:
trunk/docs/userguide/en/src/main/docbook/included/dataDefinitionList.xml
Log:
http://jira.jboss.com/jira/browse/RF-2905
Unifying screenshots names.
Correcting links to them in XML files.
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataDefinitionList.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataDefinitionList.xml 2008-05-03 08:15:49 UTC (rev 8423)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataDefinitionList.xml 2008-05-03 08:46:28 UTC (rev 8424)
@@ -108,7 +108,7 @@
</emphasis> facet</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/datadefinitionlist1.png"/>
+ <imagedata fileref="images/dataDefinitionList2.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -192,7 +192,7 @@
<title>Style classes</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/datadefinitionlist2.png"/>
+ <imagedata fileref="images/dataDefinitionList_cn.png"/>
</imageobject>
</mediaobject>
</figure>
16 years, 8 months
JBoss Rich Faces SVN: r8423 - in trunk/docs/userguide/en/src/main: resources/images and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2008-05-03 04:15:49 -0400 (Sat, 03 May 2008)
New Revision: 8423
Added:
trunk/docs/userguide/en/src/main/resources/images/dataDefinitionList_init.png
trunk/docs/userguide/en/src/main/resources/images/datalist_init.png
Removed:
trunk/docs/userguide/en/src/main/resources/images/datadefinitionlist1.png
trunk/docs/userguide/en/src/main/resources/images/datadefinitionlist2.png
trunk/docs/userguide/en/src/main/resources/images/datalist1.png
trunk/docs/userguide/en/src/main/resources/images/datalist2.png
trunk/docs/userguide/en/src/main/resources/images/datalist3.png
trunk/docs/userguide/en/src/main/resources/images/datalistClass.png
trunk/docs/userguide/en/src/main/resources/images/datalistStyle.png
trunk/docs/userguide/en/src/main/resources/images/dataorderedlist1.png
trunk/docs/userguide/en/src/main/resources/images/dataorderedlist2.png
Modified:
trunk/docs/userguide/en/src/main/docbook/included/dataDefinitionList.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/dataList.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/dataList.xml
trunk/docs/userguide/en/src/main/docbook/included/dataOrderedList.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/dataOrderedList.xml
Log:
http://jira.jboss.com/jira/browse/RF-2905
Unifying screenshots names.
Correcting links to them in XML files.
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataDefinitionList.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataDefinitionList.desc.xml 2008-05-03 01:59:03 UTC (rev 8422)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataDefinitionList.desc.xml 2008-05-03 08:15:49 UTC (rev 8423)
@@ -13,7 +13,7 @@
<title><emphasis role="bold"><property><rich:dataDefinitionList></property></emphasis> component</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/datadefinitionlist1.png"/>
+ <imagedata fileref="images/dataDefinitionList_init.png"/>
</imageobject>
</mediaobject>
</figure>
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataList.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataList.desc.xml 2008-05-03 01:59:03 UTC (rev 8422)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataList.desc.xml 2008-05-03 08:15:49 UTC (rev 8423)
@@ -13,7 +13,7 @@
<title><emphasis role="bold"><property><rich:dataList></property></emphasis> component</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/datalist1.png"/>
+ <imagedata fileref="images/dataList_init.png"/>
</imageobject>
</mediaobject>
</figure>
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataList.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataList.xml 2008-05-03 01:59:03 UTC (rev 8422)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataList.xml 2008-05-03 08:15:49 UTC (rev 8423)
@@ -111,7 +111,7 @@
</emphasis> attribute</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/datalist2.png"/>
+ <imagedata fileref="images/dataList2.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -134,7 +134,7 @@
</emphasis> attribute</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/dataList4.png"/>
+ <imagedata fileref="images/dataList3.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -204,7 +204,7 @@
<title>Style classes</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/dataorderedlist2.png"/>
+ <imagedata fileref="images/dataList_cn.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -252,7 +252,7 @@
<title>Redefinition styles with predefined classes</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/datalistClass.png"/>
+ <imagedata fileref="images/dataList_pc.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -286,7 +286,7 @@
<title>Redefinition styles with own classes and <emphasis><property>styleClass</property></emphasis> attributes</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/datalistStyle.png"/>
+ <imagedata fileref="images/dataList_oc.png"/>
</imageobject>
</mediaobject>
</figure>
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataOrderedList.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataOrderedList.desc.xml 2008-05-03 01:59:03 UTC (rev 8422)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataOrderedList.desc.xml 2008-05-03 08:15:49 UTC (rev 8423)
@@ -13,7 +13,7 @@
<title><emphasis role="bold"><property><rich:dataOderedList></property></emphasis> component</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/dataorderedlist1.png"/>
+ <imagedata fileref="images/dataOrderedList_init.png"/>
</imageobject>
</mediaobject>
</figure>
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataOrderedList.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataOrderedList.xml 2008-05-03 01:59:03 UTC (rev 8422)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataOrderedList.xml 2008-05-03 08:15:49 UTC (rev 8423)
@@ -110,7 +110,7 @@
</emphasis> attribute</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/dataorderedlist1.png"/>
+ <imagedata fileref="images/dataOrderedList2.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -190,7 +190,7 @@
<title>Style classes</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/datalist3.png"/>
+ <imagedata fileref="images/dataOrderedList_cn.png"/>
</imageobject>
</mediaobject>
</figure>
Copied: trunk/docs/userguide/en/src/main/resources/images/dataDefinitionList_init.png (from rev 8422, trunk/docs/userguide/en/src/main/resources/images/datadefinitionlist1.png)
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/datadefinitionlist1.png
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/datadefinitionlist2.png
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/datalist1.png
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/datalist2.png
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/datalist3.png
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/datalistClass.png
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/datalistStyle.png
===================================================================
(Binary files differ)
Copied: trunk/docs/userguide/en/src/main/resources/images/datalist_init.png (from rev 8422, trunk/docs/userguide/en/src/main/resources/images/datalist1.png)
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/dataorderedlist1.png
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/dataorderedlist2.png
===================================================================
(Binary files differ)
16 years, 8 months
JBoss Rich Faces SVN: r8422 - trunk/ui/dataTable/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-05-02 21:59:03 -0400 (Fri, 02 May 2008)
New Revision: 8422
Modified:
trunk/ui/dataTable/src/main/config/component/columnAttributes.ent
Log:
http://jira.jboss.com/jira/browse/RF-2915
Modified: trunk/ui/dataTable/src/main/config/component/columnAttributes.ent
===================================================================
--- trunk/ui/dataTable/src/main/config/component/columnAttributes.ent 2008-05-03 00:11:59 UTC (rev 8421)
+++ trunk/ui/dataTable/src/main/config/component/columnAttributes.ent 2008-05-03 01:59:03 UTC (rev 8422)
@@ -56,7 +56,7 @@
</property>
<property>
<name>sortBy</name>
- <classname>java.lang.String</classname>
+ <classname>java.lang.Object</classname>
<description>Attribute defines a bean property which is used for sorting of a column</description>
</property>
<property>
16 years, 8 months
JBoss Rich Faces SVN: r8421 - in trunk/ui/core/src/main: java/org/ajax4jsf/component and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-05-02 20:11:59 -0400 (Fri, 02 May 2008)
New Revision: 8421
Modified:
trunk/ui/core/src/main/config/component/actionParameter.xml
trunk/ui/core/src/main/java/org/ajax4jsf/component/UIActionParameter.java
trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/ActionParamHandler.java
trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/jsp/ActionParamTag.java
Log:
http://jira.jboss.com/jira/browse/RF-3110
Modified: trunk/ui/core/src/main/config/component/actionParameter.xml
===================================================================
--- trunk/ui/core/src/main/config/component/actionParameter.xml 2008-05-02 19:34:22 UTC (rev 8420)
+++ trunk/ui/core/src/main/config/component/actionParameter.xml 2008-05-03 00:11:59 UTC (rev 8421)
@@ -89,6 +89,11 @@
<property hidden="true">
<name>assignToBinding</name>
</property>
- </component>
+ <property exist="true" el="true" elonly="true" existintag="true">
+ <name>actionListener</name>
+ <classname>javax.el.MethodExpression</classname>
+ <methodargs>javax.faces.event.ActionEvent</methodargs>
+ </property>
+ </component>
</components>
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/component/UIActionParameter.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/component/UIActionParameter.java 2008-05-02 19:34:22 UTC (rev 8420)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/component/UIActionParameter.java 2008-05-03 00:11:59 UTC (rev 8421)
@@ -22,6 +22,7 @@
package org.ajax4jsf.component;
import javax.el.ELContext;
+import javax.el.MethodExpression;
import javax.el.ValueExpression;
import javax.faces.FacesException;
import javax.faces.component.UIComponentBase;
@@ -60,6 +61,21 @@
/** ********************************************************* */
/***************************************************************************
+ * Action listener to call after binding has been updated
+ */
+ private MethodExpression _actionListener = null;
+
+ public MethodExpression getActionListener() {
+ return _actionListener;
+ }
+
+ public void setActionListener(MethodExpression actionListener) {
+ this._actionListener = actionListener;
+ }
+
+ /** ********************************************************* */
+
+ /***************************************************************************
* Converter for update value with this parameter
*/
private Converter _converter = null;
@@ -156,7 +172,11 @@
}
if (null != requestValue) {
updateBinding.setValue(elContext, requestValue);
+ }
+ MethodExpression listener = getActionListener();
+ if (listener != null) {
+ listener.invoke(elContext, new Object[] {actionEvent});
}
}
}
@@ -196,7 +216,8 @@
_noEscape = (Boolean) values[2];
_converter = (Converter) UIComponentBase.restoreAttachedState(context,
values[3]);
- ;
+ _actionListener = (MethodExpression) UIComponentBase.restoreAttachedState(context,
+ values[4]);
}
@@ -206,13 +227,14 @@
* @see javax.faces.component.UIComponentBase#saveState(javax.faces.context.FacesContext)
*/
public Object saveState(FacesContext context) {
- Object values[] = new Object[4];
+ Object values[] = new Object[5];
values[0] = super.saveState(context);
// save fields values
values[1] = UIComponentBase
.saveAttachedState(context, _assignToBinding);
values[2] = _noEscape;
values[3] = UIComponentBase.saveAttachedState(context, _converter);
+ values[4] = UIComponentBase.saveAttachedState(context, _actionListener);
return ((Object) (values));
}
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/ActionParamHandler.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/ActionParamHandler.java 2008-05-02 19:34:22 UTC (rev 8420)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/ActionParamHandler.java 2008-05-03 00:11:59 UTC (rev 8421)
@@ -26,6 +26,7 @@
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
+import javax.faces.event.ActionEvent;
import org.ajax4jsf.Messages;
import org.ajax4jsf.component.UIActionParameter;
@@ -68,6 +69,8 @@
return new DynamicConverterMetadata(attribute);
}
+ } else if ("actionListener".equals(name)) {
+ return new ActionListenerMetadata(attribute);
}
}
@@ -119,10 +122,27 @@
}
}
+ final static class ActionListenerMetadata extends Metadata {
+ private static final Class[] SIGNATURE = new Class[] {ActionEvent.class};
+
+ private final TagAttribute attribute;
+
+ public ActionListenerMetadata(TagAttribute attribute) {
+ super();
+ this.attribute = attribute;
+ }
+
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((UIActionParameter) instance).setActionListener(
+ attribute.getMethodExpression(ctx, null, SIGNATURE));
+ }
+ };
+
private TagAttribute _assignTo;
private TagAttribute _converter;
-
+ private TagAttribute _actionListener;
+
/**
* @param config
*/
@@ -130,12 +150,19 @@
super(config);
_assignTo = getAttribute("assignTo");
_converter = getAttribute("converter");
+ _actionListener = getAttribute("actionListener");
+
if(null != _assignTo) {
if (_assignTo.isLiteral()) {
throw new TagAttributeException(this.tag, this._assignTo, Messages.getMessage(Messages.MUST_BE_EXPRESSION_ERROR));
}
-
}
+
+ if (null != _actionListener) {
+ if (_actionListener.isLiteral()) {
+ throw new TagAttributeException(this.tag, this._actionListener, Messages.getMessage(Messages.MUST_BE_EXPRESSION_ERROR));
+ }
+ }
// TODO Auto-generated constructor stub
}
/*
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/jsp/ActionParamTag.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/jsp/ActionParamTag.java 2008-05-02 19:34:22 UTC (rev 8420)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/jsp/ActionParamTag.java 2008-05-03 00:11:59 UTC (rev 8421)
@@ -21,6 +21,7 @@
package org.ajax4jsf.taglib.html.jsp;
+import javax.el.MethodExpression;
import javax.el.ValueExpression;
import javax.faces.component.ActionSource;
import javax.faces.component.UIComponent;
@@ -64,13 +65,17 @@
private ValueExpression _assignTo;
private ValueExpression _converter;
private ValueExpression _noEscape;
-
+ private MethodExpression _actionListener;
+
protected void setProperties(UIComponent component)
{
super.setProperties(component);
setStringProperty(component, "name", _name);
setBooleanProperty(component, "noEscape", _noEscape);
-
+ if (_actionListener != null) {
+ ((UIActionParameter) component).setActionListener(_actionListener);
+ }
+
//Find parent UIComponentTag
UIComponentClassicTagBase componentTag =
UIComponentClassicTagBase.getParentUIComponentClassicTagBase(pageContext);
@@ -134,6 +139,13 @@
{
this._assignTo = property;
}
+
+ /**
+ * @param property The property to set.
+ */
+ public void setActionListener(MethodExpression listener) {
+ this._actionListener = listener;
+ }
/* (non-Javadoc)
* @see org.apache.myfaces.taglib.UIComponentTagBase#release()
@@ -144,6 +156,7 @@
_assignTo = null;
_converter = null;
_noEscape = null;
+ _actionListener = null;
super.release();
}
16 years, 8 months
JBoss Rich Faces SVN: r8420 - in trunk: framework/impl/src/main/java/org/ajax4jsf/application and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2008-05-02 15:34:22 -0400 (Fri, 02 May 2008)
New Revision: 8420
Modified:
trunk/framework/api/src/main/java/org/ajax4jsf/resource/InternetResource.java
trunk/framework/impl/src/main/java/org/ajax4jsf/application/AjaxStateManager.java
trunk/framework/impl/src/main/java/org/ajax4jsf/context/ContextInitParameters.java
trunk/framework/impl/src/main/java/org/ajax4jsf/event/AjaxPhaseListener.java
trunk/framework/impl/src/main/java/org/ajax4jsf/event/InitPhaseListener.java
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/InternetResourceBase.java
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/InternetResourceService.java
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/TemplateCSSResource.java
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/UserResource.java
trunk/ui/paint2D/src/main/java/org/richfaces/renderkit/html/Paint2DResource.java
Log:
Implemented http://jira.jboss.com/jira/browse/RF-2506 feature.
fix http://jira.jboss.com/jira/browse/RF-3306
Modified: trunk/framework/api/src/main/java/org/ajax4jsf/resource/InternetResource.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/resource/InternetResource.java 2008-05-02 19:03:30 UTC (rev 8419)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/resource/InternetResource.java 2008-05-02 19:34:22 UTC (rev 8420)
@@ -49,6 +49,7 @@
public static final int RESOURCE_URI_PREFIX_LENGTH = RESOURCE_URI_PREFIX.length();
public static final String DATA_SEPARATOR = "/DATA/";
static public final long DEFAULT_EXPIRE = 1000L * 60L * 60L * 24L;// 1 day
+ public static final String DEFAULT_EXPITE_PARAMETER = "org.ajax4jsf.DEFAULT_EXPIRE";
/**
* @param resourceContext current {@link ResourceContext}
* @return Returns the contentLength.
@@ -59,7 +60,7 @@
* @param resourceContext current {@link ResourceContext}
* @return Returns the expired.
*/
- public Date getExpired(ResourceContext resourceContext);
+ public long getExpired(ResourceContext resourceContext);
/**
* @param resourceContext current {@link ResourceContext}
@@ -186,6 +187,6 @@
public abstract void setLastModified(Date lastModified);
- public abstract void setExpired(Date expired);
+ public abstract void setExpired(long expired);
}
\ No newline at end of file
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/application/AjaxStateManager.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/application/AjaxStateManager.java 2008-05-02 19:03:30 UTC (rev 8419)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/application/AjaxStateManager.java 2008-05-02 19:34:22 UTC (rev 8420)
@@ -197,8 +197,6 @@
if (_log.isDebugEnabled()) {
_log.debug("Write view state to the response");
}
- context.getExternalContext().getRequestMap().put(
- AjaxPhaseListener.VIEW_STATE_SAVED_PARAM, Boolean.TRUE);
}
/*
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/context/ContextInitParameters.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/context/ContextInitParameters.java 2008-05-02 19:03:30 UTC (rev 8419)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/context/ContextInitParameters.java 2008-05-02 19:34:22 UTC (rev 8420)
@@ -35,6 +35,8 @@
* If is it equals "true" , framework should proparate exception to client-side.
*/
public static final String HANDLE_VIEW_EXPIRED_ON_CLIENT="org.ajax4jsf.handleViewExpiredOnClient";
+
+
/**
* Get number of views for store in session by {@link AjaxStateManager}
* @param context - current faces context.
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/event/AjaxPhaseListener.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/event/AjaxPhaseListener.java 2008-05-02 19:03:30 UTC (rev 8419)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/event/AjaxPhaseListener.java 2008-05-02 19:34:22 UTC (rev 8420)
@@ -54,8 +54,6 @@
public static final String VIEW_BEAN_PREFIX = "org.ajax4jsf.viewbean:";
- public static final String VIEW_STATE_SAVED_PARAM = "org.ajax4jsf.VIEW_STATE_SAVED";
-
private static final Log log = LogFactory.getLog(AjaxPhaseListener.class);
public static final String AJAX_BEAN_PREFIX = "org.ajax4jsf.ajaxviewbean:";
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/event/InitPhaseListener.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/event/InitPhaseListener.java 2008-05-02 19:03:30 UTC (rev 8419)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/event/InitPhaseListener.java 2008-05-02 19:34:22 UTC (rev 8420)
@@ -79,13 +79,6 @@
}
FacesContext facesContext = event.getFacesContext();
Application application = facesContext.getApplication();
- StateManager stateManager = application.getStateManager();
- if(! (stateManager instanceof AjaxStateManager)){
- if(log.isDebugEnabled()){
- log.debug("Set AjaxStateManager on top of chain");
- }
- application.setStateManager(new AjaxStateManager(stateManager));
- }
ViewHandler viewHandler = application.getViewHandler();
if (!(viewHandler instanceof AjaxViewHandler)) {
if(log.isDebugEnabled()){
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/resource/InternetResourceBase.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/resource/InternetResourceBase.java 2008-05-02 19:03:30 UTC (rev 8419)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/resource/InternetResourceBase.java 2008-05-02 19:34:22 UTC (rev 8420)
@@ -57,7 +57,7 @@
private Date lastModified = new Date(System.currentTimeMillis());
- private Date expired;
+ private long expired = Long.MIN_VALUE;
private boolean cacheable = true;
@@ -91,7 +91,14 @@
*
* @see org.ajax4jsf.chameleon.resource.InternetResource#getExpired()
*/
- public Date getExpired(ResourceContext resourceContext) {
+ public long getExpired(ResourceContext resourceContext) {
+ if( expired == Long.MIN_VALUE ){
+ expired = -1;
+ String defaultExpireParameter = resourceContext.getInitParameter(InternetResource.DEFAULT_EXPITE_PARAMETER);
+ if(null != defaultExpireParameter){
+ expired = Long.parseLong(defaultExpireParameter)*1000L;
+ }
+ }
return expired;
}
@@ -99,7 +106,7 @@
* @param expired
* The expired to set.
*/
- public void setExpired(Date expired) {
+ public void setExpired(long expired) {
this.expired = expired;
}
@@ -396,15 +403,14 @@
context.setIntHeader("Content-Length",
contentLength);
}
- Date expired = getExpired(context);
- if (expired != null) {
- context.setDateHeader("Expires", expired.getTime());
- } else {
+ long expired = getExpired(context);
+ if (expired == Long.MIN_VALUE ) {
+ expired = DEFAULT_EXPIRE;
+ }
context.setDateHeader("Expires", System.currentTimeMillis()
- + DEFAULT_EXPIRE);
+ + expired);
context.setHeader("Cache-control", "max-age="
- + (DEFAULT_EXPIRE / 1000));
- }
+ + (expired / 1000L));
} else {
if (contentLength > 0) {
context.setIntHeader("Content-Length",
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/resource/InternetResourceService.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/resource/InternetResourceService.java 2008-05-02 19:03:30 UTC (rev 8419)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/resource/InternetResourceService.java 2008-05-02 19:34:22 UTC (rev 8420)
@@ -202,14 +202,15 @@
}
content.sendHeaders(response);
// Correct expires date for resource.
- Date expired = resource.getExpired(resourceContext);
- if (expired != null) {
- response.setDateHeader("Expires", expired.getTime());
- } else {
+ long expired = resource.getExpired(resourceContext);
+ if (expired < 0 ) {
+ expired = InternetResource.DEFAULT_EXPIRE;
+ }
response.setDateHeader("Expires", System
.currentTimeMillis()
- + InternetResource.DEFAULT_EXPIRE);
- }
+ + expired);
+// response.addHeader("Cache-control", "max-age="
+// + (expired / 1000L));
if (!request.getMethod().equals("HEAD")) {
content.send(response);
}
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/resource/TemplateCSSResource.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/resource/TemplateCSSResource.java 2008-05-02 19:03:30 UTC (rev 8419)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/resource/TemplateCSSResource.java 2008-05-02 19:34:22 UTC (rev 8420)
@@ -128,15 +128,15 @@
* @see org.ajax4jsf.resource.InternetResource#getContentType(ResourceContext)
*/
public String getContentType(ResourceContext resourceContext) {
- return _resource.getContentType(null);
+ return _resource.getContentType(resourceContext);
}
/**
* @return
* @see org.ajax4jsf.resource.InternetResource#getExpired(ResourceContext)
*/
- public Date getExpired(ResourceContext resourceContext) {
- return _resource.getExpired(null);
+ public long getExpired(ResourceContext resourceContext) {
+ return _resource.getExpired(resourceContext);
}
/**
@@ -267,9 +267,9 @@
/**
* @param expired
- * @see org.ajax4jsf.resource.InternetResource#setExpired(java.util.Date)
+ * @see org.ajax4jsf.resource.InternetResource#setExpired(long)
*/
- public void setExpired(Date expired) {
+ public void setExpired(long expired) {
_resource.setExpired(expired);
}
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/resource/UserResource.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/resource/UserResource.java 2008-05-02 19:03:30 UTC (rev 8419)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/resource/UserResource.java 2008-05-02 19:34:22 UTC (rev 8420)
@@ -26,6 +26,9 @@
import java.io.Serializable;
import java.util.Date;
+import javax.el.ELContext;
+import javax.el.MethodExpression;
+import javax.el.ValueExpression;
import javax.faces.component.UIComponent;
import javax.faces.component.UIComponentBase;
import javax.faces.context.FacesContext;
@@ -68,18 +71,18 @@
*/
public Object getDataToStore(FacesContext context, Object data) {
UriData dataToStore = null;
- if (data instanceof ResourceComponent) {
- ResourceComponent resource = (ResourceComponent) data;
+ if (data instanceof ResourceComponent2) {
+ ResourceComponent2 resource = (ResourceComponent2) data;
dataToStore = new UriData();
dataToStore.value = resource.getValue();
- dataToStore.createContent = UIComponentBase.saveAttachedState(context,resource.getCreateContent());
+ dataToStore.createContent = UIComponentBase.saveAttachedState(context,resource.getCreateContentExpression());
if (data instanceof UIComponent) {
UIComponent component = (UIComponent) data;
- ValueBinding expires = component.getValueBinding("expires");
+ ValueExpression expires = component.getValueExpression("expires");
if (null != expires) {
dataToStore.expires = UIComponentBase.saveAttachedState(context,expires);
}
- ValueBinding lastModified = component.getValueBinding("lastModified");
+ ValueExpression lastModified = component.getValueExpression("lastModified");
if (null != lastModified) {
dataToStore.modified = UIComponentBase.saveAttachedState(context,lastModified);
}
@@ -95,22 +98,61 @@
FacesContext facesContext = FacesContext.getCurrentInstance();
if (null != data && null != facesContext ) {
// Send headers
- if(data.expires != null){
- ValueBinding binding = (ValueBinding) UIComponentBase.restoreAttachedState(facesContext,data.expires);
- Date expires = (Date) binding.getValue(facesContext);
- context.setDateHeader("Expires",expires.getTime());
- }
- if(data.modified != null){
- ValueBinding binding = (ValueBinding) UIComponentBase.restoreAttachedState(facesContext,data.modified);
- Date modified = (Date) binding.getValue(facesContext);
- context.setDateHeader("Last-Modified",modified.getTime());
- }
+ ELContext elContext = facesContext.getELContext();
+// if(data.expires != null){
+// ValueExpression binding = (ValueExpression) UIComponentBase.restoreAttachedState(facesContext,data.expires);
+// Date expires = (Date) binding.getValue(elContext);
+// context.setDateHeader("Expires",expires.getTime());
+// }
+// if(data.modified != null){
+// ValueExpression binding = (ValueExpression) UIComponentBase.restoreAttachedState(facesContext,data.modified);
+// Date modified = (Date) binding.getValue(elContext);
+// context.setDateHeader("Last-Modified",modified.getTime());
+// }
// Send content
OutputStream out = context.getOutputStream();
- MethodBinding send = (MethodBinding) UIComponentBase.restoreAttachedState(facesContext,data.createContent);
- send.invoke(facesContext,new Object[]{out,data.value});
+ MethodExpression send = (MethodExpression) UIComponentBase.restoreAttachedState(facesContext,data.createContent);
+ send.invoke(elContext,new Object[]{out,data.value});
}
}
+
+
+ @Override
+ public Date getLastModified(ResourceContext resourceContext) {
+ UriData data = (UriData) restoreData(resourceContext);
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ if (null != data && null != facesContext ) {
+ // Send headers
+ ELContext elContext = facesContext.getELContext();
+ if(data.modified != null){
+ ValueExpression binding = (ValueExpression) UIComponentBase.restoreAttachedState(facesContext,data.modified);
+ Date modified = (Date) binding.getValue(elContext);
+ if (null != modified) {
+ return modified;
+ }
+ }
+ }
+ return super.getLastModified(resourceContext);
+ }
+
+
+ @Override
+ public long getExpired(ResourceContext resourceContext) {
+ UriData data = (UriData) restoreData(resourceContext);
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ if (null != data && null != facesContext ) {
+ // Send headers
+ ELContext elContext = facesContext.getELContext();
+ if(data.expires != null){
+ ValueExpression binding = (ValueExpression) UIComponentBase.restoreAttachedState(facesContext,data.expires);
+ Date expires = (Date) binding.getValue(elContext);
+ if (null != expires) {
+ return expires.getTime()-System.currentTimeMillis();
+ }
+ }
+ }
+ return super.getExpired(resourceContext);
+ }
/* (non-Javadoc)
* @see org.ajax4jsf.resource.InternetResourceBase#requireFacesContext()
*/
Modified: trunk/ui/paint2D/src/main/java/org/richfaces/renderkit/html/Paint2DResource.java
===================================================================
--- trunk/ui/paint2D/src/main/java/org/richfaces/renderkit/html/Paint2DResource.java 2008-05-02 19:03:30 UTC (rev 8419)
+++ trunk/ui/paint2D/src/main/java/org/richfaces/renderkit/html/Paint2DResource.java 2008-05-02 19:34:22 UTC (rev 8420)
@@ -54,7 +54,7 @@
private static final ImageRenderer[] _renderers= {new GifRenderer(), new JpegRenderer(), new PngRenderer()};
- private static final ThreadLocal threadLocalContentType = new ThreadLocal();
+// private static final ThreadLocal<String> threadLocalContentType = new ThreadLocal<String>();
/* (non-Javadoc)
@@ -205,13 +205,13 @@
/* (non-Javadoc)
* @see org.ajax4jsf.resource.InternetResourceBase#sendHeaders(org.ajax4jsf.resource.ResourceContext)
*/
- public void sendHeaders(ResourceContext context) {
- ImageData data = (ImageData) restoreData(context);
- ImageRenderer renderer = _renderers[data._format];
- threadLocalContentType.set(renderer.getContentType());
-
- super.sendHeaders(context);
-
- threadLocalContentType.set(null);
- }
+// public void sendHeaders(ResourceContext context) {
+// ImageData data = (ImageData) restoreData(context);
+// ImageRenderer renderer = _renderers[data._format];
+// threadLocalContentType.set(renderer.getContentType());
+//
+// super.sendHeaders(context);
+//
+// threadLocalContentType.set(null);
+// }
}
16 years, 8 months
JBoss Rich Faces SVN: r8419 - trunk/samples/laguna/src/main/resources/org/richfaces/laguna.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-05-02 15:03:30 -0400 (Fri, 02 May 2008)
New Revision: 8419
Modified:
trunk/samples/laguna/src/main/resources/org/richfaces/laguna/dropdownmenu.xcss
trunk/samples/laguna/src/main/resources/org/richfaces/laguna/modalPanel.xcss
Log:
opacity added
Modified: trunk/samples/laguna/src/main/resources/org/richfaces/laguna/dropdownmenu.xcss
===================================================================
--- trunk/samples/laguna/src/main/resources/org/richfaces/laguna/dropdownmenu.xcss 2008-05-02 19:00:35 UTC (rev 8418)
+++ trunk/samples/laguna/src/main/resources/org/richfaces/laguna/dropdownmenu.xcss 2008-05-02 19:03:30 UTC (rev 8419)
@@ -14,5 +14,10 @@
<u:selector name=".rich-ddmenu-label-unselect">
</u:selector>
-
+
+ <u:selector name=".rich-menu-list-border">
+ <u:style name="opacity" value="0.8" />
+ <u:style name="filter" value="progid:DXImageTransform.Microsoft.Alpha(opacity=80);}" />
+ </u:selector>
+
</f:template>
\ No newline at end of file
Modified: trunk/samples/laguna/src/main/resources/org/richfaces/laguna/modalPanel.xcss
===================================================================
--- trunk/samples/laguna/src/main/resources/org/richfaces/laguna/modalPanel.xcss 2008-05-02 19:00:35 UTC (rev 8418)
+++ trunk/samples/laguna/src/main/resources/org/richfaces/laguna/modalPanel.xcss 2008-05-02 19:03:30 UTC (rev 8419)
@@ -25,9 +25,19 @@
</u:selector>
<u:selector name=".rich-mp-content">
- <u:style name="padding" value="0px" />
+ <u:style name="padding" value="0px" />
+ <u:style name="background-color" value="transparent" />
</u:selector>
+ <u:selector name=".rich-mpnl-body">
+ <u:style name="background-color" skin="generalBackgroundColor" />
+ </u:selector>
+
+ <u:selector name=".rich-mpnl-header">
+ <u:style name="opacity" value="0.8" />
+ <u:style name="filter" value="progid:DXImageTransform.Microsoft.Alpha(opacity=80);}" />
+ </u:selector>
+
<u:selector name=".rich-mpnl-text">
</u:selector>
16 years, 8 months
JBoss Rich Faces SVN: r8418 - trunk/framework/impl/src/main/resources/META-INF.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-05-02 15:00:35 -0400 (Fri, 02 May 2008)
New Revision: 8418
Modified:
trunk/framework/impl/src/main/resources/META-INF/resources-config.xml
Log:
org.richfaces.renderkit.html.CustomizeableGradient registered in resources-config.xml
Modified: trunk/framework/impl/src/main/resources/META-INF/resources-config.xml
===================================================================
--- trunk/framework/impl/src/main/resources/META-INF/resources-config.xml 2008-05-02 17:17:54 UTC (rev 8417)
+++ trunk/framework/impl/src/main/resources/META-INF/resources-config.xml 2008-05-02 19:00:35 UTC (rev 8418)
@@ -30,6 +30,9 @@
<resource class="org.richfaces.renderkit.html.GradientA">
<name>org.richfaces.renderkit.html.GradientA</name>
</resource>
+ <resource class="org.richfaces.renderkit.html.CustomizeableGradient">
+ <name>org.richfaces.renderkit.html.CustomizeableGradient</name>
+ </resource>
<resource class="org.richfaces.renderkit.html.images.SliderArrowImage">
<name>org.richfaces.renderkit.html.images.SliderArrowImage</name>
</resource>
16 years, 8 months
JBoss Rich Faces SVN: r8417 - trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-05-02 13:17:54 -0400 (Fri, 02 May 2008)
New Revision: 8417
Modified:
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js
Log:
http://jira.jboss.com/jira/browse/RF-2332, http://jira.jboss.com/jira/browse/RF-3156
Modified: trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
===================================================================
--- trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-05-02 17:17:26 UTC (rev 8416)
+++ trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-05-02 17:17:54 UTC (rev 8417)
@@ -56,8 +56,10 @@
if (Richfaces.browser.isIE6) {
//http://jira.jboss.com/jira/browse/RF-3255
+// this.comboList.createIframe(this.comboList.listParent.parentNode, listWidth, this.combobox.id,
+// "rich-combobox-list-width rich-combobox-list-scroll rich-combobox-list-position");
this.comboList.createIframe(this.comboList.listParent.parentNode, listWidth, this.combobox.id,
- "rich-combobox-list-width rich-combobox-list-scroll rich-combobox-list-position");
+ "rich-combobox-list-width rich-combobox-list-scroll rich-combobox-list-position");
}
this.combobox.component = this;
this.initHandlers();
@@ -81,14 +83,14 @@
},
setInputWidth : function() {
- var width = (parseInt(this.field.parentNode.style.width) - this.BUTTON_WIDTH) + Richfaces.getBorderWidth(this.field, "r");
- if (Prototype.Browser.Gecko) {
+ var width = (parseInt(this.field.parentNode.style.width) - this.BUTTON_WIDTH) + Richfaces.getBorderWidth(this.field, "lr");
+// if (Prototype.Browser.Gecko) {
//border width and padding width not included in the general component width
- width -= Richfaces.getPaddingWidth(this.field, "lr")
- + Richfaces.getPaddingWidth(this.button, "lr")
- + Richfaces.getBorderWidth(this.field, "lr")
- + Richfaces.getBorderWidth(this.button, "lr");
- }
+// width -= Richfaces.getPaddingWidth(this.field, "lr")
+// + Richfaces.getPaddingWidth(this.button, "lr")
+// + Richfaces.getBorderWidth(this.field, "lr")
+// + Richfaces.getBorderWidth(this.button, "lr");
+// }
this.field.style.width = width + "px";
},
Modified: trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js
===================================================================
--- trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js 2008-05-02 17:17:26 UTC (rev 8416)
+++ trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js 2008-05-02 17:17:54 UTC (rev 8417)
@@ -7,6 +7,7 @@
this.list = $(listId);
this.listParent = $(parentListId);
+ this.listParentContainer = this.listParent.parentNode;
//this.iframe = $(iframeId);
this.iframe = null;
this.fieldElem = $(fieldId);
@@ -71,12 +72,19 @@
},
show : function() {
- this.fieldDimensions = Richfaces.ComboBoxList.getElemXY(this.fieldElem);
+ var pos = Position.cumulativeOffset(this.fieldElem);
+ this.fieldDimensions = {};
+ this.fieldDimensions.left = pos[0];
+ this.fieldDimensions.top = pos[1];
+
+// Richfaces.ComboBoxList.getElemXY(this.fieldElem);
this.fieldDimensions.height = this.fieldElem.parentNode.offsetHeight;
-
+
this.setSize();
this.setPosition(this.fieldDimensions.top, this.fieldDimensions.left, this.fieldDimensions.height);
-
+ //attach list to the document body
+ this.injectListToBody(this.listParent);
+
if (this.selectedItem) {
//was created new item list, so necessary to recreate selectedItem
this.doSelectItem(this.findItemBySubstr(this.selectedItem.innerHTML.unescapeHTML()));
@@ -106,6 +114,27 @@
},
+ injectListToBody: function(listElement) {
+ if (!this.listInjected) {
+ var parent = listElement.parentNode;
+ var child = document.body.insertBefore(parent.removeChild(listElement), null);
+ if (Richfaces.browser.isIE6 && this.iframe) {
+ document.body.insertBefore(parent.removeChild(this.iframe), child);
+ }
+ this.listInjected = true;
+ }
+ },
+
+ outjectListFromBody: function(parentElement, listElement) {
+ if (this.listInjected) {
+ var child = parentElement.appendChild(document.body.removeChild(listElement));
+ if (Richfaces.browser.isIE6 && this.iframe) {
+ parentElement.insertBefore(document.body.removeChild(this.iframe), child);
+ }
+ this.listInjected = false;
+ }
+ },
+
hideWithDelay : function() {
/*setTimeout(function(){
this.hide();
@@ -114,6 +143,7 @@
},
hide : function() {
+ this.outjectListFromBody(this.listParentContainer, this.listParent);
this.resetState();
if (this.iframe) {
this.iframe.hide();
@@ -201,33 +231,22 @@
component.style.position = "relative";
component.style.zIndex = 2;
-
var docHeight = Richfaces.getDocumentHeight();
- var comBottom = fieldTop + fieldHeight - document.documentElement.scrollTop;
+ var comBottom = fieldTop + fieldHeight;
var listHeight = parseInt(this.list.style.height) + Richfaces.getBorderWidth(this.list.parentNode, "tb");
-
- //var top = 0 ;//= -4;
- var top = fieldHeight;
-// var topIframe = comBottom;
-
+ var topPosition = comBottom;
+
if (parseInt(listHeight) > (docHeight - comBottom)) {
- if (fieldTop > (docHeight - comBottom)) {
- top = 0 - parseInt(listHeight);
-// topIframe = top;
- //var upPos = true;
+ if (topPosition > (docHeight - comBottom)) {
+ topPosition = fieldTop - parseInt(listHeight);
}
- }
+ }
+ this.listParent.style.left = fieldLeft + "px";
+ this.listParent.style.top = topPosition + "px";
- this.listParent.style.top = top + "px";
- this.listParent.style.left = 0 + "px";
-
- /*if (!upPos) {
- top = Richfaces.ComboBoxList.getElemXY(this.listParent).top + this.fieldDimensions.height;
- }*/
if (this.iframe) {
-// this.iframe.style.top = topIframe + "px";
- this.iframe.style.top = top + "px";
- this.iframe.style.left = 0 + "px";
+ this.iframe.style.top = topPosition + "px";
+ this.iframe.style.left = fieldLeft + "px";
}
},
16 years, 8 months