JBoss Rich Faces SVN: r7008 - trunk/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-03-20 11:18:50 -0400 (Thu, 20 Mar 2008)
New Revision: 7008
Added:
trunk/docs/userguide/en/src/main/resources/images/inplaceInputChangedState_shadow.png
trunk/docs/userguide/en/src/main/resources/images/inplaceInputEditState_shadow.png
trunk/docs/userguide/en/src/main/resources/images/inplaceInputShowControls.png
trunk/docs/userguide/en/src/main/resources/images/inplaceInputShowControlsAlignLeft.png
trunk/docs/userguide/en/src/main/resources/images/inplaceInputViewState_shadow.png
Modified:
trunk/docs/userguide/en/src/main/resources/images/inplaceInput1.png
Log:
http://jira.jboss.com/jira/browse/RF-1226
Images: code results
Modified: trunk/docs/userguide/en/src/main/resources/images/inplaceInput1.png
===================================================================
(Binary files differ)
Added: trunk/docs/userguide/en/src/main/resources/images/inplaceInputChangedState_shadow.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/inplaceInputChangedState_shadow.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/docs/userguide/en/src/main/resources/images/inplaceInputEditState_shadow.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/inplaceInputEditState_shadow.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/docs/userguide/en/src/main/resources/images/inplaceInputShowControls.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/inplaceInputShowControls.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/docs/userguide/en/src/main/resources/images/inplaceInputShowControlsAlignLeft.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/inplaceInputShowControlsAlignLeft.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/docs/userguide/en/src/main/resources/images/inplaceInputViewState_shadow.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/inplaceInputViewState_shadow.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 10 months
JBoss Rich Faces SVN: r7007 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-03-20 11:13:53 -0400 (Thu, 20 Mar 2008)
New Revision: 7007
Added:
trunk/docs/userguide/en/src/main/docbook/included/inplaceInput.xml
Log:
http://jira.jboss.com/jira/browse/RF-1226
Attributes with codes samples and pictures were added.
Added: trunk/docs/userguide/en/src/main/docbook/included/inplaceInput.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/inplaceInput.xml (rev 0)
+++ trunk/docs/userguide/en/src/main/docbook/included/inplaceInput.xml 2008-03-20 15:13:53 UTC (rev 7007)
@@ -0,0 +1,641 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<section>
+ <sectioninfo>
+ <keywordset>
+ <keyword>rich:inplaceInput</keyword>
+ <keyword>inplaceInput</keyword>
+ </keywordset>
+ </sectioninfo>
+ <table>
+ <title>Component identification parameters</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Name</entry>
+ <entry>Value</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>component-type</entry>
+ <entry>org.richfaces.inplaceInput</entry>
+ </row>
+ <!--row>
+ <entry>component-class</entry>
+ <entry></entry>
+ </row-->
+ <row>
+ <entry>component-family</entry>
+ <entry>org.richfaces.inplaceInput</entry>
+ </row>
+ <row>
+ <entry>renderer-type</entry>
+ <entry>org.richfaces.renderkit.inplaceInputRenderer</entry>
+ </row>
+ <row>
+ <entry>tag-class</entry>
+ <entry>org.richfaces.taglib.inplaceInputTag</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <section>
+ <title>Creating the Component with a Page Tag</title>
+ <para>Here is a simple example of how the component can be used on a page: </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:inplaceInput value="#{bean.value}"/>
+...]]></programlisting>
+ </section>
+ <section>
+ <title>Creating the Component Dynamically Using Java</title>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.inplaceInput;
+...
+HtmlInpaceInput myInplaceInput = new InplaceInput();
+...]]></programlisting>
+ </section>
+
+
+
+
+
+ <!-- Start Details of Usage-->
+ <section>
+ <title>Details of Usage</title>
+
+ <para>
+ As it was mentioned earlier the
+ <emphasis role="bold"><property><rich:inplaceInput></property> </emphasis>
+ component was designed to facilitate inputting and editing some parts of a text.
+ </para>
+
+ <para>
+ The component has three logical states:
+ <itemizedlist>
+ <listitem>
+ <para><property>"View"</property> state displays the text containing in a <emphasis><property>"value"</property></emphasis> attribute;</para>
+ <figure>
+ <title>"View" state</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/inplaceInputViewState_shadow.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para><property>"Editable"</property>state - the text can be edited and saved;</para>
+ <figure>
+ <title>"Editable" state</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/inplaceInputEditState_shadow.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para><property>"Changed"</property>state - displays the edited text and indicates that it was edited, changed</para>
+ <figure>
+ <title>"Changed" state</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/inplaceInputChangedState_shadow.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ </itemizedlist>
+
+ </para>
+
+
+
+
+
+
+ <para>
+ The main attribute of the component is
+ <emphasis><property>"value"</property></emphasis>
+ it displays the text on a page, the text can be edited by clicking (default action, which can be redefined) on it.
+ </para>
+
+ <para>
+ However, if
+ <emphasis><property>"value"</property></emphasis>
+ attribute is not defined, you can use
+ <emphasis><property>"defaultLabel attribute "</property></emphasis>
+ which will display some default text while
+ <emphasis><property>"value"</property></emphasis>
+ attribute stays undefined.
+ </para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+
+ <programlisting role="XML"><![CDATA[...
+<rich:inplaceInput value="#{bean.value}" defaultLabel="click to edit"/>
+...]]> </programlisting>
+ <para>
+ In the shown example,
+ <emphasis><property>"value"</property></emphasis> attribute is not defined;
+ therefore default text "Click to edit" is displayed
+ since it is placed into the
+ <emphasis><property>"defaultLabel"</property></emphasis> attribute.
+ </para>
+
+
+ <para>
+ Input data is saved (submitted) automatically when the input field loses focus.
+ Nevertheless, you can use a
+ <emphasis><property>"showControls"</property></emphasis>
+ attribute, which make <property>"save"</property>and <property>"cancel" </property> buttons
+ appear next to the input field.
+ </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+
+ <programlisting role="XML"><![CDATA[...
+<rich:inplaceInput value="#{bean.value}" defaultLabel='click to edit' showControls="true"/>
+...]]> </programlisting>
+
+ <figure>
+ <title>Usage <emphasis><property>"showControls"</property></emphasis> attribute</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/inplaceInputShowControls.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>
+ You can also position the controls relatively to the input field, by means of
+ <emphasis><property>" controlsHorizontalPosition"</property></emphasis>
+ <emphasis><property>" controlsVerticalPosition "</property></emphasis>
+ attributes.
+
+ The
+ <emphasis><property>" controlsHorizontalPosition"</property></emphasis> attribute has
+ <property>"left"</property>, <property>"right"</property> and <property> "center"</property> definitions.
+
+ The
+ <emphasis><property>" controlsVerticalPosition "</property></emphasis>
+ attribute has <property>"bottom"</property>, <property>"center"</property> and <property>"top"</property> definitions.
+ </para>
+
+ <figure>
+ <title>Positioning of "save" and "cancel" buttons</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/inplaceInputShowControlsAlignLeft.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ Redefinition of the
+ "save" and "cancel" icons can be performed using
+ <emphasis><property>"saveControlIcon"</property></emphasis>
+ and
+ <emphasis><property>"cancelControlIcon"</property></emphasis>
+ attributes relatively. You need to define the path to where your images are located.
+ </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+
+ <programlisting role="XML"><![CDATA[...
+<rich:inplaceInput value="#{bean.incValue}" minValue="50" maxValue="400"/>
+...]]> </programlisting>
+
+
+
+
+
+
+
+ </section>
+ <!-- End. Details of Usage-->
+
+ <!-- JavaScript API-->
+ <section>
+ <title>JavaScript API</title>
+ <table>
+ <title>JavaScript API</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Function</entry>
+ <entry>Description</entry>
+
+ </row>
+ </thead>
+ <tbody>
+ <!--Sorting API -->
+ <row>
+ <entry>enable()</entry>
+ <entry>Begins polling for ajax mode </entry>
+
+ </row>
+ <row>
+ <entry>disable()</entry>
+ <entry>Stops polling for ajax mode</entry>
+
+ </row>
+
+ <row>
+ <entry>setValue(value)</entry>
+ <entry>Updates the progress of the process</entry>
+
+ </row>
+ <row>
+ <entry>setLabel(label)</entry>
+ <entry>Update the label for the process</entry>
+
+ </row>
+
+
+
+
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <!-- End of JavaScript API-->
+
+ <!-- Look-and-Feel Customization-->
+
+ <section>
+ <title>Look-and-Feel Customization</title>
+ <para>For skinnability implementation, the components use a <emphasis>
+ <property>style class redefinition method.</property>
+ </emphasis> Default style classes are mapped on <emphasis>
+ <property>skin parameters.</property>
+ </emphasis></para>
+ <para>There are two ways to redefine the appearance of all <emphasis role="bold">
+ <property><rich:progressBar></property>
+ </emphasis> components at once: <itemizedlist>
+ <listitem>Redefine the corresponding skin parameters</listitem>
+ <listitem> Add to your style sheets style classes used by a <emphasis role="bold">
+ <property><rich:progressBar></property>
+ </emphasis> component</listitem>
+ </itemizedlist>
+ </para>
+ </section>
+
+ <!-- Skin Parameters Redefinition-->
+ <section>
+ <title>Skin Parameters Redefinition</title>
+
+ <table>
+ <title>Skin parameters redefinition for the "completed" part of the bar with no label</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>selectControlColor</entry>
+
+ <entry>background-color</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Skin parameters redefinition for the "completed" part of the bar with a label used</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>panelBorderColor</entry>
+
+ <entry>border-color</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Skin parameters redefinition for the “completed” part of the bar with a label used</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>selectControlColor</entry>
+
+ <entry>background-color</entry>
+ </row>
+
+ <row>
+ <entry>controlBackgroundColor</entry>
+
+ <entry>color</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Skin parameters redefinition for the "remained" part of the bar</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>controlBackgroundColor</entry>
+
+ <entry>background-color</entry>
+ </row>
+
+ <row>
+ <entry>controlTextColor</entry>
+
+ <entry>color</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Skin parameters redefinition for the bar itself with a label used</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>panelBorderColor</entry>
+
+ <entry>border-color</entry>
+ </row>
+
+ <row>
+ <entry>generalFamilyFont</entry>
+
+ <entry>font-family</entry>
+ </row>
+
+ <row>
+ <entry>headerFamilyFont</entry>
+
+ <entry>font-family</entry>
+ </row>
+
+ <row>
+ <entry>generalSizeFont</entry>
+
+ <entry>font-size</entry>
+ </row>
+
+ <row>
+ <entry>controlTextColor</entry>
+
+ <entry>color</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Skin parameters redefinition for the bar itself with no label used</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Skin parameters</entry>
+
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>controlBackgroundColor</entry>
+
+ <entry>background-color</entry>
+ </row>
+
+ <row>
+ <entry>panelBorderColor</entry>
+
+ <entry>border-color</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+
+ </section>
+ <!-- END Skin Parameters Redefinition-->
+
+ <!-- Definition of Custom Style Classes-->
+
+ <section>
+ <title>Definition of Custom Style Classes</title>
+ <para>On the screenshot there are classes names that define styles for component elements.</para>
+
+ <figure>
+ <title>Classes names</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/progressbarClasses.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <table>
+ <title>Classes names for the bar</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>rich-progress-bar-shell</entry>
+ <entry>Defines styles for the background and the borders of the bar when label is not used</entry>
+ </row>
+
+ <row>
+ <entry>rich-progress-bar-shell-dig</entry>
+ <entry>Defines styles for background, font and border settings when label is used</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Classes names that define "completed" part of the bar</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+
+ <row>
+ <entry>rich-progress-bar-uploaded</entry>
+ <entry>Defines styles for of "completed" progress area with no labels used</entry>
+ </row>
+ <row>
+ <entry>rich-progress-bar-uploaded-dig</entry>
+ <entry>Defines styles for that "completed" progress area with labels used </entry>
+ </row>
+
+ <row>
+ <entry>rich-progress-bar-completed</entry>
+ <entry>Defines styles for the "completed" progress area with a label used</entry>
+ </row>
+
+
+ </tbody>
+ </tgroup>
+ </table>
+
+
+
+ <table>
+ <title>Classes names that define "remained" part of the progress area</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+
+ <row>
+ <entry>rich-progress-bar-remained</entry>
+ <entry>Defines styles for the "remained" part of the bar</entry>
+ </row>
+
+
+
+ </tbody>
+ </tgroup>
+ </table>
+ <para>In order to redefine styles for all <emphasis role="bold">
+ <property><rich:progressBar></property>
+ </emphasis> components on a page using CSS, it's enough to create classes with the
+ same names (possible classes could be found in the tables <link linkend="tab_cn3"> above</link>) and define necessary properties in them. </para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="CSS"><![CDATA[...
+.rich-progress-bar-remained{
+ background-color: #ebf3fd;
+}
+...]]></programlisting>
+
+ <para>This is the result:</para>
+
+ <figure>
+ <title>Redefinition styles with predefined classes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/progressbarRedefinedClasses.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>In the example the "remained" part of progress area is modified with a background-color CSS property.</para>
+
+
+
+
+
+ <para>It's aslo possible to change styles of a particular
+ <emphasis role="bold"> <property><rich:progressBar></property></emphasis> component. In this case you should create own style classes and use them in corresponding <emphasis role="bold"><property><rich:progressBar></property></emphasis> <property>styleClass</property> attributes. An example is placed below:</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="CSS"><![CDATA[...
+.RremainClass{ background-color: #ebf3fd;}
+...]]></programlisting>
+ <para>The <emphasis><property>"styleClass"</property></emphasis> attribute for <emphasis role="bold"
+ ><property><rich:progressBar> </property></emphasis> is defined as it’s shown in the example below:</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="CSS"><![CDATA[<rich:progressBar value="#{bean.incValue1}" styleClass="remainClass" />
+]]></programlisting>
+
+ <para>This is a result:</para>
+
+ <figure>
+ <title>Modificaton of a look and feel with own classes and <emphasis><property>styleClass</property></emphasis> attributes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/progressbarRedefinedClasses.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>As it could be seen on the picture above, the font style for output text was changed.</para>
+
+
+ </section>
+ <section>
+ <title>Relevant Resources Links</title>
+ <para>
+ <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/progressbar.jsf?c=pro...">Here</ulink>
+ you can see the example of <emphasis role="bold">
+ <property><rich:progressBar></property>
+ </emphasis> usage and sources for the given example. </para>
+
+ </section>
+</section>
\ No newline at end of file
16 years, 10 months
JBoss Rich Faces SVN: r7006 - in trunk/ui/columns/src/main: java/org/richfaces/taglib and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-03-20 10:52:19 -0400 (Thu, 20 Mar 2008)
New Revision: 7006
Modified:
trunk/ui/columns/src/main/config/component/columns.xml
trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsTag.java
Log:
RF-2476,RF-2481
Modified: trunk/ui/columns/src/main/config/component/columns.xml
===================================================================
--- trunk/ui/columns/src/main/config/component/columns.xml 2008-03-20 14:43:34 UTC (rev 7005)
+++ trunk/ui/columns/src/main/config/component/columns.xml 2008-03-20 14:52:19 UTC (rev 7006)
@@ -60,5 +60,13 @@
The last iteration item
</description>
</property>
+ <property hidden="true">
+ <name>rows</name>
+ <classname>java.lang.Object</classname>
+ </property>
+ <property hidden="true">
+ <name>first</name>
+ <classname>java.lang.Object</classname>
+ </property>
</component>
</components>
Modified: trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsTag.java
===================================================================
--- trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsTag.java 2008-03-20 14:43:34 UTC (rev 7005)
+++ trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsTag.java 2008-03-20 14:52:19 UTC (rev 7006)
@@ -6,7 +6,6 @@
package org.richfaces.taglib;
-import java.beans.FeatureDescriptor;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Collection;
@@ -14,37 +13,29 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.el.ELContext;
import javax.el.ELException;
import javax.el.ELResolver;
-import javax.el.ExpressionFactory;
import javax.el.FunctionMapper;
import javax.el.MethodExpression;
-import javax.el.PropertyNotFoundException;
import javax.el.ValueExpression;
import javax.el.VariableMapper;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.webapp.UIComponentClassicTagBase;
+import javax.faces.webapp.UIComponentTag;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspTagException;
import javax.servlet.jsp.PageContext;
import javax.servlet.jsp.tagext.BodyContent;
import javax.servlet.jsp.tagext.IterationTag;
-import org.jaxen.expr.Expr;
import org.richfaces.component.UIColumn;
import org.richfaces.iterator.ForEachIterator;
import org.richfaces.iterator.SimpleForEachIterator;
-import org.richfaces.model.Ordering;
-import com.sun.el.lang.ELSupport;
-import com.sun.el.lang.EvaluationContext;
-import com.sun.faces.el.ELContextImpl;
-
/**
* Class provides implementation for columns tag
*
@@ -1320,219 +1311,3 @@
}
}
-
-class ELContextWraper extends ELContext {
-
- VariableMapper vm;
-
- public ELContextWraper() {
- // TODO Auto-generated constructor stub
- }
-
- public ELContextWraper(ELResolver resolver) {
-
- }
-
- @Override
- public VariableMapper getVariableMapper() {
- // TODO Auto-generated method stub
- return vm;
- }
-
- @Override
- public ELResolver getELResolver() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public FunctionMapper getFunctionMapper() {
- // TODO Auto-generated method stub
- return null;
- }
-};
-
-class VariableWraper extends VariableMapper {
-
- @Override
- public ValueExpression resolveVariable(String variable) {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public ValueExpression setVariable(String variable,
- ValueExpression expression) {
- // TODO Auto-generated method stub
- return null;
- }
-
-}
-
-class ValueExpressioWraper extends ValueExpression {
-
- ValueExpression expression;
-
- ValueExpression value;
-
- // Object value;
-
- int i = 0;
-
- public ValueExpressioWraper(ValueExpression e, ValueExpression v) {
- expression = e;
- value = v;
- }
-
- private ELContext createElContext(final ELContext arg0) {
- return new ELContext() {
-
- @Override
- public Object getContext(Class key) {
- // TODO Auto-generated method stub
- return arg0.getContext(key);
- }
-
- @Override
- public ELResolver getELResolver() {
- return arg0.getELResolver();
- }
-
- @Override
- public FunctionMapper getFunctionMapper() {
- return arg0.getFunctionMapper();
- }
-
- @Override
- public VariableMapper getVariableMapper() {
- // return arg0.getVariableMapper();
- return new VariableMapper() {
-
- @Override
- public ValueExpression resolveVariable(String variable) {
- if ("col".equals(variable)) {
- return value;
- } else {
- return arg0.getVariableMapper().resolveVariable(
- variable);
- }
- }
-
- @Override
- public ValueExpression setVariable(String variable,
- ValueExpression expression) {
- return arg0.getVariableMapper().setVariable(variable,
- expression);
- }
-
- };
- // return arg0.getVariableMapper();
- }
-
- };
- }
-
- /*
- * (non-Javadoc)
- *
- * @see javax.el.ValueExpression#getExpectedType()
- */
- @Override
- public Class<?> getExpectedType() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public Class<?> getType(ELContext arg0) throws NullPointerException,
- PropertyNotFoundException, ELException {
- return expression.getType(arg0);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see javax.el.ValueExpression#getValue(javax.el.ELContext)
- */
- @Override
- public Object getValue(ELContext context) {
- ELContext context2 = createElContext(context);
- ValueExpression variable = context.getVariableMapper().resolveVariable(
- "col");
- // context2.getVariableMapper().setVariable("col", value);
- try {
- return expression.getValue(context2);
- } finally {
- // context2.getVariableMapper().setVariable("col", variable);
- }
- // return expression.getValue(createElContext(context));
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see javax.el.ValueExpression#isReadOnly(javax.el.ELContext)
- */
- @Override
- public boolean isReadOnly(ELContext context) {
- // TODO Auto-generated method stub
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see javax.el.ValueExpression#setValue(javax.el.ELContext,
- * java.lang.Object)
- */
- @Override
- public void setValue(ELContext context, Object value) {
- expression.setValue(context, value);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see javax.el.Expression#equals(java.lang.Object)
- */
- @Override
- public boolean equals(Object obj) {
- // TODO Auto-generated method stub
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see javax.el.Expression#getExpressionString()
- */
- @Override
- public String getExpressionString() {
- // TODO Auto-generated method stub
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see javax.el.Expression#hashCode()
- */
- @Override
- public int hashCode() {
- // TODO Auto-generated method stub
- return 0;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see javax.el.Expression#isLiteralText()
- */
- @Override
- public boolean isLiteralText() {
- // TODO Auto-generated method stub
- return false;
- }
-
-}
\ No newline at end of file
16 years, 10 months
JBoss Rich Faces SVN: r7005 - in trunk/ui/combobox/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-03-20 10:43:34 -0400 (Thu, 20 Mar 2008)
New Revision: 7005
Modified:
trunk/ui/combobox/src/main/config/component/combobox.xml
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
trunk/ui/combobox/src/main/templates/combobox.jspx
Log:
http://jira.jboss.com/jira/browse/RF-2604
Modified: trunk/ui/combobox/src/main/config/component/combobox.xml
===================================================================
--- trunk/ui/combobox/src/main/config/component/combobox.xml 2008-03-20 14:31:52 UTC (rev 7004)
+++ trunk/ui/combobox/src/main/config/component/combobox.xml 2008-03-20 14:43:34 UTC (rev 7005)
@@ -105,7 +105,7 @@
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
- <name>onitemselected</name>
+ <name>onselect</name>
<classname>java.lang.String</classname>
<description></description>
<defaultvalue><![CDATA[""]]></defaultvalue>
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-03-20 14:31:52 UTC (rev 7004)
+++ trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-03-20 14:43:34 UTC (rev 7005)
@@ -46,7 +46,7 @@
this.classes = classes;
this.isDisabled = isDisabled;
if (this.onselected) {
- this.combobox.observe("rich:onitemselected", this.onselected);
+ this.combobox.observe("rich:onselect", this.onselected);
}
if (this.isDisabled) {
this.doDisable();
@@ -297,7 +297,7 @@
this.field.value = value;
this.comboValue.value = value;
this.comboList.doSelectItem(this.comboList.activeItem);
- this.combobox.fire("rich:onitemselected", {});
+ this.combobox.fire("rich:onselect", {});
/*if (oV != value) {
this.combobox.fire("rich:onchange", {});
}*/
Modified: trunk/ui/combobox/src/main/templates/combobox.jspx
===================================================================
--- trunk/ui/combobox/src/main/templates/combobox.jspx 2008-03-20 14:31:52 UTC (rev 7004)
+++ trunk/ui/combobox/src/main/templates/combobox.jspx 2008-03-20 14:43:34 UTC (rev 7005)
@@ -194,8 +194,8 @@
]]>
</jsp:scriptlet>
<f:resource var="spacer" name="images/spacer.gif"/>
-
-<div id="#{clientId}" class="rich-combobox-font rich-combobox #{styleClass}" style="width:#{listWidth};#{style}"
+<div id="#{clientId}">
+<div id="#{clientId}combobox" 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="#{clientId}comboboxValue" name="#{clientId}comboboxValue" type="hidden"/>
<div class="rich-combobox-list-cord"></div>
@@ -207,8 +207,6 @@
value="#{value}"
size="#{inputSize}"
readonly="#{enableManualInput}"
- onchange="#{component.attributes['onchange']}"
- onselect="#{component.attributes['onselect']}"
onblur="#{component.attributes['onblur']}"
style="width:#{correction}; #{inputStyle}"
autocomplete="off"
@@ -295,7 +293,7 @@
}
}
- var combobox = new Richfaces.ComboBox( "#{clientId}",
+ var combobox = new Richfaces.ComboBox( "#{clientId}combobox",
"#{clientId}list",
"#{clientId}listParent",
"#{clientId}comboboxValue",
@@ -310,9 +308,10 @@
#{filterNewValues},
#{selectFirstOnUpdate},
#{this:getAsEventHandler(context, component, "onlistcall")},
- #{this:getAsEventHandler(context, component, "onitemselected")},
+ #{this:getAsEventHandler(context, component, "onselect")},
"#{defaultLabel}",
#{disabled}, "#{value}",
#{component.attributes["showDelay"]}, #{component.attributes["hideDelay"]});
</script>
+</div>
</f:root>
\ No newline at end of file
16 years, 10 months
JBoss Rich Faces SVN: r7004 - trunk/samples/contextMenuDemo/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: vbaranov
Date: 2008-03-20 10:31:52 -0400 (Thu, 20 Mar 2008)
New Revision: 7004
Modified:
trunk/samples/contextMenuDemo/src/main/webapp/pages/index.jsp
Log:
Test for http://jira.jboss.com/jira/browse/RF-1458
Modified: trunk/samples/contextMenuDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/samples/contextMenuDemo/src/main/webapp/pages/index.jsp 2008-03-20 14:31:34 UTC (rev 7003)
+++ trunk/samples/contextMenuDemo/src/main/webapp/pages/index.jsp 2008-03-20 14:31:52 UTC (rev 7004)
@@ -69,10 +69,6 @@
</f:facet>
<h:outputText value="#{row.first}">
</h:outputText>
- <cc:componentControl event="oncontextmenu" attachTo="c1" for=":f:m"
- operation="doShow">
- <f:param name="param" value="#{row.first}"></f:param>
- </cc:componentControl>
</dt:column>
<dt:column headerClass="header" footerClass="footer" id="x">
<f:facet name="header">
@@ -82,7 +78,7 @@
<h:outputText value="Description"></h:outputText>
</f:facet>
<h:outputText value="#{row.second}" />
- <cc:componentControl event="oncontextmenu" attachTo="x" for=":f:m"
+ <cc:componentControl event="oncontextmenu" attachTo="c1,x" for=":f:m"
operation="doShow">
<f:param name="param" value="#{row.first}"></f:param>
</cc:componentControl>
16 years, 10 months
JBoss Rich Faces SVN: r7003 - trunk/ui/componentControl/src/main/resources/org/richfaces/renderkit/html/script.
by richfaces-svn-commits@lists.jboss.org
Author: vbaranov
Date: 2008-03-20 10:31:34 -0400 (Thu, 20 Mar 2008)
New Revision: 7003
Modified:
trunk/ui/componentControl/src/main/resources/org/richfaces/renderkit/html/script/controlUtils.js
Log:
http://jira.jboss.com/jira/browse/RF-1458
Modified: trunk/ui/componentControl/src/main/resources/org/richfaces/renderkit/html/script/controlUtils.js
===================================================================
--- trunk/ui/componentControl/src/main/resources/org/richfaces/renderkit/html/script/controlUtils.js 2008-03-20 14:26:15 UTC (rev 7002)
+++ trunk/ui/componentControl/src/main/resources/org/richfaces/renderkit/html/script/controlUtils.js 2008-03-20 14:31:34 UTC (rev 7003)
@@ -30,13 +30,18 @@
};
Richfaces.componentControl.attachEvent = function(attachTo, aevent, forAttr, operation, params, disableDefault) {
- jQuery(attachTo).bind(Richfaces.effectEventOnOut(aevent),function(cevent) {
- Richfaces.componentControl.performOperation(cevent, forAttr, operation, params, disableDefault);
- }).each(function() {
- Richfaces.componentControl.applyDecorations(this, forAttr, function(element) {
- //TODO: handle component decoration
+ var pattern = /\s*,\s*/;
+ // "attachTo" attribute may contain several ids splitted by ","
+ result = attachTo.split(pattern);
+ for(i=0; i < result.length; i++) {
+ jQuery(result[i]).bind(Richfaces.effectEventOnOut(aevent),function(cevent) {
+ Richfaces.componentControl.performOperation(cevent, forAttr, operation, params, disableDefault);
+ }).each(function() {
+ Richfaces.componentControl.applyDecorations(this, forAttr, function(element) {
+ //TODO: handle component decoration
+ });
});
- });
+ }
};
Richfaces.componentControl.performOperation = function( cevent, forAttr, operation, params, disableDefault) {
16 years, 10 months
JBoss Rich Faces SVN: r7002 - trunk/framework/impl/src/main/java/org/ajax4jsf/util.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-03-20 10:26:15 -0400 (Thu, 20 Mar 2008)
New Revision: 7002
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/util/InputUtils.java
Log:
add converters processing methods
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/util/InputUtils.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/util/InputUtils.java 2008-03-20 14:25:28 UTC (rev 7001)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/util/InputUtils.java 2008-03-20 14:26:15 UTC (rev 7002)
@@ -23,8 +23,15 @@
import java.io.Serializable;
+import javax.el.ValueExpression;
import javax.faces.component.UIComponent;
+import javax.faces.component.ValueHolder;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.convert.ConverterException;
+import org.ajax4jsf.Messages;
+
/**
* @author Maksim Kaszynski
* @author Manfred Geiler
@@ -52,4 +59,60 @@
return isTrue(component.getAttributes().get("readonly"));
}
+ public static Object getConvertedValue(FacesContext context, UIComponent component, Object submittedValue) throws ConverterException {
+
+ String newValue = (String) submittedValue;
+
+ ValueExpression valueExpression = component.getValueExpression("value");
+ Converter converter = null;
+
+ if (component instanceof ValueHolder) {
+ converter = ((ValueHolder)component).getConverter();
+ }
+
+ if (converter == null && valueExpression != null) {
+ Class converterType = valueExpression.getType(context.getELContext());
+ if (converterType == null || converterType == Object.class || converterType == String.class) {
+ return newValue;
+ } else {
+ converter = context.getApplication().createConverter(converterType);
+ if (converter == null) {
+ throw new ConverterException(Messages.getMessage(Messages.NO_CONVERTER_FOUND_ERROR, converterType.getName()));
+ }
+ }
+ } else if (converter == null) {
+ return newValue;
+ }
+
+ return converter.getAsObject(context, component, newValue);
+ }
+
+ public static String getConvertedStringValue(FacesContext context, UIComponent component, Object value) {
+
+ Converter converter = null;
+
+ if (component instanceof ValueHolder) {
+ converter = ((ValueHolder)component).getConverter();
+ }
+
+ if (converter == null) {
+ if (value == null) {
+ return "";
+ } else if (value instanceof String) {
+ return (String) value;
+ }
+
+ Class converterType = value.getClass();
+ if (converterType != null ) {
+ converter = context.getApplication().createConverter(converterType);
+ }
+
+ if (converter == null) {
+ return value.toString();
+ }
+ }
+ return converter.getAsString(context, component, value);
+
+ }
+
}
16 years, 10 months
JBoss Rich Faces SVN: r7001 - trunk/ui/inplaceSelect/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-03-20 10:25:28 -0400 (Thu, 20 Mar 2008)
New Revision: 7001
Modified:
trunk/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java
Log:
remove converter processing methods
Modified: trunk/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java
===================================================================
--- trunk/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java 2008-03-20 14:24:32 UTC (rev 7000)
+++ trunk/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java 2008-03-20 14:25:28 UTC (rev 7001)
@@ -12,8 +12,6 @@
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
-import javax.faces.convert.Converter;
-import javax.faces.convert.ConverterException;
import javax.faces.model.SelectItem;
import org.ajax4jsf.util.InputUtils;
@@ -66,17 +64,6 @@
}
}
- @Override
- public Object getConvertedValue(FacesContext context, UIComponent component, Object submittedValue) throws ConverterException {
- UIInplaceSelect select = null;
- Converter converter = null;
- if (component instanceof UIInplaceSelect) {
- select = (UIInplaceSelect) component;
- converter = select.getConverter();
- }
- return getConvertedValue(context, component, submittedValue, converter);
- }
-
public void encodeItems(FacesContext context, UIComponent component) throws IOException {
List values = new ArrayList();
ResponseWriter writer = context.getResponseWriter();
@@ -108,17 +95,6 @@
return false;
}
- @Override
- protected String getConvertedStringValue(FacesContext context, UIComponent component, Object value) {
- UIInplaceSelect select = null;
- Converter converter = null;
- if (component instanceof UIInplaceSelect) {
- select = (UIInplaceSelect) component;
- converter = select.getConverter();
- }
- return getConvertedStringValue(context, component, value, converter);
- }
-
protected Class<? extends UIComponent> getComponentClass() {
return UIInplaceSelect.class;
}
16 years, 10 months
JBoss Rich Faces SVN: r7000 - trunk/ui/inplaceInput/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-03-20 10:24:32 -0400 (Thu, 20 Mar 2008)
New Revision: 7000
Modified:
trunk/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java
Log:
http://jira.jboss.com/jira/browse/RF-2642
Modified: trunk/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java
===================================================================
--- trunk/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java 2008-03-20 14:24:10 UTC (rev 6999)
+++ trunk/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java 2008-03-20 14:24:32 UTC (rev 7000)
@@ -5,7 +5,7 @@
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
-import javax.faces.convert.Converter;
+import javax.faces.convert.ConverterException;
import org.ajax4jsf.javascript.JSFunctionDefinition;
import org.ajax4jsf.renderkit.HeaderResourcesRendererBase;
@@ -229,25 +229,12 @@
return result;
}
+ @Override
+ public Object getConvertedValue(FacesContext context, UIComponent component, Object submittedValue) throws ConverterException {
+ return InputUtils.getConvertedValue(context, component, submittedValue);
+ }
+
protected String getConvertedStringValue(FacesContext context, UIInplaceInput component, Object value) {
- Converter converter = component.getConverter();
-
- if (converter == null) {
- if (value == null) {
- return "";
- } else if (value instanceof String) {
- return (String) value;
- }
-
- Class converterType = value.getClass();
- if (converterType != null ) {
- converter = context.getApplication().createConverter(converterType);
- }
-
- if (converter == null) {
- return value.toString();
- }
- }
- return converter.getAsString(context, component, value);
+ return InputUtils.getConvertedStringValue(context, component, value);
+ }
}
-}
16 years, 10 months
JBoss Rich Faces SVN: r6999 - trunk/ui/inplaceInput/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-03-20 10:24:10 -0400 (Thu, 20 Mar 2008)
New Revision: 6999
Modified:
trunk/ui/inplaceInput/src/main/config/component/inplaceinput.xml
Log:
http://jira.jboss.com/jira/browse/RF-2646
Modified: trunk/ui/inplaceInput/src/main/config/component/inplaceinput.xml
===================================================================
--- trunk/ui/inplaceInput/src/main/config/component/inplaceinput.xml 2008-03-20 14:23:02 UTC (rev 6998)
+++ trunk/ui/inplaceInput/src/main/config/component/inplaceinput.xml 2008-03-20 14:24:10 UTC (rev 6999)
@@ -80,7 +80,7 @@
<name>controlsVerticalPosition</name>
<classname>java.lang.String</classname>
<description></description>
- <defaultvalue><![CDATA["bottom"]]></defaultvalue>
+ <defaultvalue><![CDATA["center"]]></defaultvalue>
</property>
<property>
16 years, 10 months