JBoss Rich Faces SVN: r4046 - in trunk/sandbox/ui/orderingList/src/main: java/org/richfaces/renderkit and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2007-11-16 12:39:20 -0500 (Fri, 16 Nov 2007)
New Revision: 4046
Modified:
trunk/sandbox/ui/orderingList/src/main/config/component/orderinglist.xml
trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingListRendererBase.java
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss
Log:
controls list was corrected
Modified: trunk/sandbox/ui/orderingList/src/main/config/component/orderinglist.xml
===================================================================
--- trunk/sandbox/ui/orderingList/src/main/config/component/orderinglist.xml 2007-11-16 17:09:28 UTC (rev 4045)
+++ trunk/sandbox/ui/orderingList/src/main/config/component/orderinglist.xml 2007-11-16 17:39:20 UTC (rev 4046)
@@ -30,15 +30,6 @@
&ui_component_attributes;
- <property>
- <name>onmousemove</name>
- <classname>java.lang.String</classname>
- <description>
- HTML: script expression; a pointer was moved within.
- </description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
-
<property>
<name>captionLabel</name>
<classname>java.lang.String</classname>
@@ -46,6 +37,13 @@
Defines caption representation text
</description>
</property>
+ <property>
+ <name>label</name>
+ <classname>java.lang.Boolean</classname>
+ <description>
+ </description>
+ <defaultvalue><![CDATA[true]]></defaultvalue>
+ </property>
<property>
<name>listWidth</name>
<classname>int</classname>
Modified: trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingListRendererBase.java
===================================================================
--- trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingListRendererBase.java 2007-11-16 17:09:28 UTC (rev 4045)
+++ trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingListRendererBase.java 2007-11-16 17:39:20 UTC (rev 4046)
@@ -61,6 +61,8 @@
private final static String CONTROL_TYPE_NONE = "none";
+ private final static String ATTRIBUTE_LABEL = "label";
+
private final static String ATTRIBUTE_CONTROLS_TYPE = "controlsType";
private final static String ATTRIBUTE_CE_ONORDERCHANGED = "onorderchanged";
@@ -347,10 +349,9 @@
}
}
- protected void encodeControlFacet(FacesContext context, UIOrderingList orderingList, ControlsHelper helper, String clientId, ResponseWriter writer,
- boolean enabled)
- throws IOException {
-
+ protected void encodeControlFacet(FacesContext context,
+ UIOrderingList orderingList, ControlsHelper helper,
+ String clientId, ResponseWriter writer, boolean enabled) throws IOException {
Locale locale = null;
UIViewRoot viewRoot = context.getViewRoot();
@@ -369,72 +370,82 @@
}
}
+ Map attributes = orderingList.getAttributes();
UIComponent facet = orderingList.getFacet(helper.getFacetName());
- boolean isButton = false;
boolean useFacet = (facet != null && facet.isRendered());
- Map attributes = orderingList.getAttributes();
-
String controlType = (String) attributes.get(ATTRIBUTE_CONTROLS_TYPE);
- String customEvent = null;
- if (helper.customEvent != null) {
- customEvent = (String) attributes.get(helper.customEvent);
- }
- String styleFromAttribute = (String) attributes.get(helper.styleFromAttribute);
- String currentStyle = helper.getStyleClassName();
- if (styleFromAttribute != null) {
- currentStyle = styleFromAttribute.concat(currentStyle);
- }
- String htmlElem = null;
- if (CONTROL_TYPE_BUTTON.equals(controlType)) {
- isButton = true;
- htmlElem = HTML.BUTTON;
- } else if (CONTROL_TYPE_LINK.equals(controlType)) {
- htmlElem = HTML.a_ELEMENT;
+
+ if (CONTROL_TYPE_NONE.equals(controlType)) {
+ if (useFacet) {
+ renderChild(context, facet);
+ }
} else {
- //none
+ renderDefaultControl(context, orderingList, writer, useFacet,
+ helper, clientId, bundle ,enabled);
}
+ }
- boolean encodeDiv = !isButton && (useFacet || htmlElem != null);
-
- if (encodeDiv) {
+ protected void renderDefaultControl(FacesContext context,
+ UIOrderingList orderingList, ResponseWriter writer,
+ boolean useFacet, ControlsHelper helper, String clientId, ResourceBundle bundle, boolean enabled)
+ throws IOException {
+ String htmlElem = HTML.a_ELEMENT;
+ UIComponent facet = orderingList.getFacet(helper.getFacetName());
+ String customEvent = null;
+ if (useFacet) {
+ renderChild(context, facet);
+ } else {
+ Map attributes = orderingList.getAttributes();
+ if (helper.customEvent != null) {
+ customEvent = (String) attributes.get(helper.customEvent);
+ }
+
+ String styleFromAttribute = (String) attributes
+ .get(helper.styleFromAttribute);
+ String currentStyle = helper.getStyleClassName();
+
+ if (styleFromAttribute != null) {
+ currentStyle = styleFromAttribute.concat(currentStyle);
+ }
+
writer.startElement(HTML.DIV_ELEM, orderingList);
writer.writeAttribute(HTML.id_ATTRIBUTE, clientId + helper.getIdSuffix(), null); //FIXME:
writer.writeAttribute(HTML.class_ATTRIBUTE, "ol_button_border " + (enabled ? "ol_control_shown" : "ol_control_hidden"), null);
writer.startElement(HTML.DIV_ELEM, orderingList);
writer.writeAttribute(HTML.class_ATTRIBUTE, "ol_button", null);
- writer.writeAttribute(HTML.onmouseover_ATTRIBUTE, "this.className='ol_button_light'", null);
- writer.writeAttribute(HTML.onmousedown_ATTRIBUTE, "this.className='ol_button_press'", null);
- writer.writeAttribute(HTML.onmouseup_ATTRIBUTE, "this.className='ol_button'", null);
- writer.writeAttribute(HTML.onmouseout_ATTRIBUTE, "this.className='ol_button'", null);
+ if (helper.enable) {
+ writer.writeAttribute(HTML.onmouseover_ATTRIBUTE, "this.className='ol_button_light'", null);
+ writer.writeAttribute(HTML.onmousedown_ATTRIBUTE, "this.className='ol_button_press'", null);
+ writer.writeAttribute(HTML.onmouseup_ATTRIBUTE, "this.className='ol_button'", null);
+ writer.writeAttribute(HTML.onmouseout_ATTRIBUTE, "this.className='ol_button'", null);
+ }
writer.startElement(HTML.DIV_ELEM, orderingList);
writer.writeAttribute(HTML.class_ATTRIBUTE, "ol_button_content", null);
-
- /*writer.writeAttribute("onmousedown",
- "Element.removeClassName(this, 'ol_button'); Element.addClassName(this, 'ol_button_clicked'); ", null);
- writer.writeAttribute("onmouseup",
- "Element.removeClassName(this, 'ol_button_clicked'); Element.addClassName(this, 'ol_button'); ", null);*/
- }
-
- if (htmlElem != null) {
+
writer.startElement(htmlElem, orderingList);
- //writer.writeAttribute(HTML.id_ATTRIBUTE, clientId + helper.getIdSuffix(), null);
+ // writer.writeAttribute(HTML.id_ATTRIBUTE, clientId +
+ // helper.getIdSuffix(), null);
if (customEvent != null) {
- writer.writeAttribute(HTML.onclick_ATTRIBUTE, customEvent, null);
+ writer
+ .writeAttribute(HTML.onclick_ATTRIBUTE, customEvent,
+ null);
}
- }
-
- if (useFacet) {
- renderChild(context, facet);
- } else {
- if (isButton) {
- currentStyle = helper.buttonStyle.concat(currentStyle);
- //writer.writeAttribute(HTML.class_ATTRIBUTE, currentStyle, null);
- if (!helper.enable) {
- writer.writeAttribute(HTML.DISABLED_ATTR, "true", null);
- }
-
+
+ // writer.writeAttribute(HTML.class_ATTRIBUTE, currentStyle, null);
+ writer.startElement(HTML.IMG_ELEMENT, orderingList);
+ writer.writeAttribute(HTML.width_ATTRIBUTE, "15", null);
+ writer.writeAttribute(HTML.height_ATTRIBUTE, "15", null);
+ writer.writeAttribute(HTML.border_ATTRIBUTE, "0", null);
+ writer.writeAttribute(HTML.alt_ATTRIBUTE, helper.getFacetName(),
+ null);
+ writer.writeAttribute(HTML.src_ATTRIBUTE, getResource(
+ helper.getImageURI()).getUri(context, null), null);
+
+ writer.endElement(HTML.IMG_ELEMENT);
+
+ if ((Boolean) attributes.get(ATTRIBUTE_LABEL)) {
String label = null;
if (bundle != null) {
@@ -450,29 +461,9 @@
}
writer.writeText(label, null);
- } else {
- //writer.writeAttribute(HTML.class_ATTRIBUTE, currentStyle, null);
- writer.startElement(HTML.IMG_ELEMENT, orderingList);
- writer.writeAttribute(HTML.width_ATTRIBUTE, "15", null);
- writer.writeAttribute(HTML.height_ATTRIBUTE, "15", null);
- writer.writeAttribute(HTML.border_ATTRIBUTE, "0", null);
- writer.writeAttribute(HTML.alt_ATTRIBUTE, helper.getFacetName(), null);
- writer.writeAttribute(HTML.src_ATTRIBUTE, getResource(helper.getImageURI()).getUri(context, null), null);
-
- writer.endElement(HTML.IMG_ELEMENT);
}
- }
-
- if (htmlElem != null) {
writer.endElement(htmlElem);
- }
-
- if (isButton) {
- writer.startElement("br", orderingList);
- writer.endElement("br");
- }
-
- if (encodeDiv) {
+
writer.endElement(HTML.DIV_ELEM);
writer.endElement(HTML.DIV_ELEM);
writer.endElement(HTML.DIV_ELEM);
Modified: trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss
===================================================================
--- trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss 2007-11-16 17:09:28 UTC (rev 4045)
+++ trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/orderingList.xcss 2007-11-16 17:39:20 UTC (rev 4046)
@@ -6,15 +6,15 @@
<f:verbatim><![CDATA[
-.ol_button_layout{padding : 15px 8px 15px 0px;}
+ol_button_layout{padding : 15px 8px 15px 0px;}
.ol_button_border{border : 1px solid #bfbfc0; margin-bottom : 3px;}
-.ol_button{background : none top left #C6D6EA repeat-x; cursor : pointer; padding : 2px; font-family : Arial; font-size :11px;}
-.ol_button_light{background : none top left #C6D6EA repeat-x; border : 1px solid #E79A00;cursor : pointer; padding : 1px; font-family : Arial; font-size :11px;}
+.ol_button{background : top left #C6D6EA repeat-x; cursor : pointer; padding : 2px; font-family : Arial; font-size :11px;}
+.ol_button_light{background : top left #C6D6EA repeat-x; border : 1px solid #E79A00;cursor : pointer; padding : 1px; font-family : Arial; font-size :11px;}
.ol_button_dis{background : #bfbfc0; border : 1px solid #bfbfc0; margin-bottom : 3px; padding : 1px}
-.ol_button_press{background : none top left repeat-x #EAF0F8; border : 1px solid #E79A00; padding : 2px 0px 0px 2px;font-family : Arial; font-size :11px;}
+.ol_button_press{background : top left repeat-x #EAF0F8; border : 1px solid #E79A00; padding : 2px 0px 0px 2px;font-family : Arial; font-size :11px;}
.ol_center_button_col_valign{vertical-align : middle}
.ol_right_button_col_valign{vertical-align : middle}
-.ol_button_content{font-family : Arial; font-size :11px; padding : 0px 0px 0px 0px; text-align : center;}
+.ol_button_content{font-family : Arial; font-size :11px; padding : 0px 4px 0px 1px; text-align : left;}
/*
.ol_button_clicked {
18 years, 5 months
JBoss Rich Faces SVN: r4045 - trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2007-11-16 12:09:28 -0500 (Fri, 16 Nov 2007)
New Revision: 4045
Modified:
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Selection.js
Log:
RF-1348
Modified: trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Selection.js
===================================================================
--- trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Selection.js 2007-11-16 16:13:02 UTC (rev 4044)
+++ trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Selection.js 2007-11-16 17:09:28 UTC (rev 4045)
@@ -235,6 +235,13 @@
this.setListeners();
this.eventKeyPress = this.processKeyDown.bindAsEventListener(this);
Event.observe(document, "keypress", this.eventKeyPress);
+ A4J.AJAX.AddListener({
+ onafterajax: function(req, event, data) {
+ if(!$(this.prefix + ":n")) {
+ Event.stopObserving(document, "keypress", this.eventKeyPress);
+ }
+ }.bind(this)
+ });
if (document.selection) {
Event.observe(gridElement, "click", this.resetSelection.bindAsEventListener(this));
}
18 years, 5 months
JBoss Rich Faces SVN: r4044 - branches/3.1.x/ui/core/src/main/templates/org/ajax4jsf/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-11-16 11:13:02 -0500 (Fri, 16 Nov 2007)
New Revision: 4044
Modified:
branches/3.1.x/ui/core/src/main/templates/org/ajax4jsf/renderkit/html/link.jspx
Log:
http://jira.jboss.com/jira/browse/RF-1320
Modified: branches/3.1.x/ui/core/src/main/templates/org/ajax4jsf/renderkit/html/link.jspx
===================================================================
--- branches/3.1.x/ui/core/src/main/templates/org/ajax4jsf/renderkit/html/link.jspx 2007-11-16 16:12:17 UTC (rev 4043)
+++ branches/3.1.x/ui/core/src/main/templates/org/ajax4jsf/renderkit/html/link.jspx 2007-11-16 16:13:02 UTC (rev 4044)
@@ -16,7 +16,7 @@
id="#{clientId}"
name="#{clientId}"
type="#{component.attributes['type']}"
- x:passThruWithExclusions="value,name,onclick,type,href,id"
+ x:passThruWithExclusions="value,name,onclick,type,href,id,class,styleClass"
onclick="#{this:getOnClick(context,component)}"
href="#"
class="#{component.attributes['styleClass']}"
@@ -27,4 +27,4 @@
</vcp:body>
</a>
-</f:root>
\ No newline at end of file
+</f:root>
18 years, 5 months
JBoss Rich Faces SVN: r4043 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-11-16 11:12:17 -0500 (Fri, 16 Nov 2007)
New Revision: 4043
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml
Log:
http://jira.jboss.com/jira/browse/RF-391, http://jira.jboss.com/jira/browse/RF-389 - updated FAQ.
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml 2007-11-16 16:07:44 UTC (rev 4042)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml 2007-11-16 16:12:17 UTC (rev 4043)
@@ -478,19 +478,6 @@
>here</ulink>.</para>
</section>
- <section id="RerenderingPartPage">
- <?dbhtml filename="RerenderingPartPage.html"?>
- <title>How to reRender only particular row(s) of dataTable?</title>
- <para> If you use dataTable then you may use <emphasis>
- <property>"ajaxKeys"</property>
- </emphasis> attribute to bind the rowKeys to be reRendered there. After you
- need to point reRender on the specific rows. See also <link
- linkend="IterationcomponentsAjaxattributes"
- >"Iteration components Ajax attributes section".</link>
- </para>
- </section>
-
-
<section>
<?dbhtml filename="Howtomakehtmlscrollbars.html"?>
<title>How to make html scrollbars in modalPanel?</title>
@@ -611,6 +598,67 @@
</emphasis> attribute.)</para>
</section>
+ <section>
+ <?dbhtml filename="Howtosetrich:dataTableborder.html"?>
+ <title>How to set <rich:dataTable> border to 0px?</title>
+ <para>Add the following code to your css file:</para>
+ <programlisting role="CSS"><![CDATA[...
+ .rich-table, .rich-table-header,.rich-table-headercell, .rich-table-cell,
+ .rich-subtable-cell, .rich-table-footercell, .rich-subtable-footercell {
+ border-width:0px;
+ }
+...
+]]></programlisting>
+ </section>
+
+ <section>
+ <?dbhtml filename="Howtosetrich:dataTableborder.html"?>
+ <title>How to create <rich:suggestionBox> dynamically?</title>
+ <para>This is a working example:</para>
+ <programlisting role="JAVA"><![CDATA[...
+ org.apache.myfaces.component.html.ext.HtmlInputText searchBox = new org.apache.myfaces.component.html.ext.HtmlInputText();
+ searchBox.setId( "inputQuery" );
+ bar.getChildren().add( searchBox );
+
+ org.richfaces.component.html.HtmlSuggestionBox suggestions = new org.richfaces.component.html.HtmlSuggestionBox();
+ suggestions.setId( "sugg" );
+ suggestions.setFor( "inputQuery" );
+ suggestions.setTokens( ",[" );
+ suggestions.setRules( "none" );
+
+ javax.faces.el.MethodBinding mb = app.createMethodBinding( "#{suggestionBox.autocomplete}", new Class[] { Object.class } );
+ suggestions.setSuggestionAction( mb );
+ suggestions.setVar( "result" );
+
+ suggestions.setRows( 0 );
+ suggestions.setFirst( 0 );
+ suggestions.setMinChars( "#{suggestionBox.minchars}" );
+ suggestions.setShadowOpacity( "4" );
+ suggestions.setBorder( "1" );
+ suggestions.setWidth( "200" );
+ suggestions.setHeight( "150" );
+ suggestions.setShadowDepth( "4" );
+ suggestions.setCellpadding( "2" );
+
+ org.apache.myfaces.custom.column.HtmlSimpleColumn column = new org.apache.myfaces.custom.column.HtmlSimpleColumn();
+ column.setId( "col1" );
+ org.apache.myfaces.component.html.ext.HtmlOutputText text = new org.apache.myfaces.component.html.ext.HtmlOutputText();
+ text.setId( "text1" );
+
+ javax.faces.el.ValueBinding vb = app.createValueBinding( "#{result.text}" );
+ text.setValueBinding( "value", vb );
+ column.getChildren().add( text );
+ suggestions.getChildren().add( column );
+ bar.getChildren().add( suggestions );
+...
+]]></programlisting>
+ <para> See also <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099047#..."
+ >RichFaces User Forum</ulink>.</para>
+ </section>
+
+
+
<section id="DecidingWhatToChangeOnTheServerSide">
<?dbhtml filename="DecidingWhatToChangeOnTheServerSide.html"?>
<title>What should I change on the server side?</title>
@@ -737,68 +785,7 @@
<para>To avoid exception, don't forget that the component stores beans in
serialized view, but your bean should implement java.io.Serializable.</para>
</section>
- <!--section id="FilterUsageDamagesAnApplicationLayout">
- <?dbhtml filename="FilterUsageDamagesAnApplicationLayout.html"?>
- <title>Why does filter usage damage an application layout?</title>
- <para>RichFaces uses <property>filters</property> for correction of xhtml code
- received on an Ajax response, because when a response is recieved from the
- server, RichFaces makes direct changes in DOM tree and browser
- doesn't make any corrections in generated xhtml. There are two ways
- for setting <property>filters</property> that could be used in an
- RichFaces-based application.</para>
- <para> The first one:</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[<context-param filter>
- <display-name>RichFaces Filter</display-name>
- <filter-name>richfaces</filter-name>
- <filter-class>org.ajax4jsf.Filter</filter-class>
-</filter>]]></programlisting>
- <para>This <property>filter</property> is based on Tidy Filter usage and recommended
- for applications with complicated or non-standard markup, as all the
- necessary xhtml code corrections are made by the filter when a response
- comes from the server.</para>
- <para> Anyway, some obvious errors could damage a layout, if it happens, make sure
- that the markup corresponds to the xhtml-strict specification. </para>
- <para>The second one:</para>
-
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[<filter>
- <display-name>RichFaces FastFilter</display-name>
- <filter-name>richfaces</filter-name>
- <filter-class>org.ajax4jsf.FastFilter</filter-class>
-</filter>]]></programlisting>
- <para>This <property>filter</property> is based on the Neko parser. In this case an
- output xhtml code isn't strictly verified and it also could cause
- lot's of errors and corrupt a layout as a result. Though if you
- sure that your application markup is really strict for this filter, the
- filter considerably accelerates all Ajax requests processing. </para>
- <para><emphasis role="bold">Extra information</emphasis>. </para>
- <para>forceParcer parameters setting for <property>filters</property>:</para>
-
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[<filter>
-...
-<init-param>
-<param-name>forceparser</param-name>
-<param-value>false</param-value>
-</init-param>
-...
-</filter>]]></programlisting>
- <para>The "false" setting for initialization parameter switches
- off application of filters for non-Ajax requests, if
- "true" is chosen, the filter checks all requests. <important>
- <title>Changes for Ajax4jsf 1.1.0</title>
- <property>forceparser parameter</property> default value is false
- from this version. </important>
- </para>
- </section-->
<section id="AFormIsNotSubmittedOrASetterIsNotCalledAfterAJAXrequest">
<?dbhtml filename="AFormIsNotSubmittedOrASetterIsNotCalledAfterAJAXrequest.html"?>
<title>Why form isn't submitted or setter isn't called after AJAX
@@ -836,7 +823,6 @@
</para>
</section>
-
<section id="IgnoreDupResponsesAndRequestDelay">
<?dbhtml filename="IgnoreDupResponsesAndRequestDelay.html"?>
@@ -865,8 +851,6 @@
</para>
</section>
-
-
<section id="EventQueueUsage">
<?dbhtml filename="EventQueueUsage.html"?>
<title>How to use "EventQueue" attribute?</title>
@@ -1030,4 +1014,16 @@
<para>The problem is solved with browser cash update (e.g. CTRL+F5).</para>
</section>
+
+ <section id="RerenderingPartPage">
+ <?dbhtml filename="RerenderingPartPage.html"?>
+ <title>How to reRender only particular row(s) of table?</title>
+ <para> If you use dataTable then you may use <emphasis>
+ <property>"ajaxKeys"</property>
+ </emphasis> attribute to bind the rowKeys to be reRendered there.
+ After you need to point reRender on the specific rows. See also
+ <link linkend="IterationcomponentsAjaxattributes"
+ >"Iteration components Ajax attributes
+ section"</link>. </para>
+ </section>
</chapter>
18 years, 5 months
JBoss Rich Faces SVN: r4042 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-11-16 11:07:44 -0500 (Fri, 16 Nov 2007)
New Revision: 4042
Modified:
trunk/docs/userguide/en/src/main/docbook/included/columnGroup.xml
trunk/docs/userguide/en/src/main/docbook/included/datascroller.xml
Log:
http://jira.jboss.com/jira/browse/RF-926 - cheked codes, fixed errors.
Modified: trunk/docs/userguide/en/src/main/docbook/included/columnGroup.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/columnGroup.xml 2007-11-16 15:32:58 UTC (rev 4041)
+++ trunk/docs/userguide/en/src/main/docbook/included/columnGroup.xml 2007-11-16 16:07:44 UTC (rev 4042)
@@ -47,17 +47,14 @@
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[...
- <rich:dataTable value="#{capitalsBean.capitals}" var="capitals"
- ajaxKeys="#{bean.ajaxSet}" binding="#{bean.tabe}" id="table">
- <!--...//Set of columns and header/footer facets-->
- <rich:column colspan="3">
- <f:facet name="header">State Flag</f:facet>
- <h:graphicImage value="#{cap.stateFlag}"/>
- </rich:column>
<rich:columnGroup>
- <!--...//Set of columns and header/footer facets-->
- </rich:columnGroup>
- </rich:dataTable>
+ <rich:column>
+ <h:outputText value="Column1"/>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="Column2"/>
+ </rich:column>
+ </rich:columnGroup>
...
]]></programlisting>
</section>
@@ -114,9 +111,15 @@
<f:facet name="header">State Flag</f:facet>
<h:graphicImage value="#{cap.stateFlag}"/>
</rich:column>
- <rich:column breakBefore="true">...</rich:column>
- <rich:column >...</rich:column>
- <rich:column >...</rich:column>
+ <rich:column breakBefore="true">
+ <h:outputText value="#{cap.state}"/>
+ </rich:column>
+ <rich:column breakBefore="true">
+ <h:outputText value="#{cap.name}"/>
+ </rich:column>
+ <rich:column >
+ <h:outputText value="#{cap.timeZone}"/>
+ </rich:column>
</rich:dataTable>
....
]]></programlisting>
Modified: trunk/docs/userguide/en/src/main/docbook/included/datascroller.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/datascroller.xml 2007-11-16 15:32:58 UTC (rev 4041)
+++ trunk/docs/userguide/en/src/main/docbook/included/datascroller.xml 2007-11-16 16:07:44 UTC (rev 4042)
@@ -123,7 +123,7 @@
<f:facet name="last">
<h:outputText value="Last"/>
</f:facet>
- </rich:Datascroller>
+ </rich:datascroller>
...
]]></programlisting>
<figure>
18 years, 5 months
JBoss Rich Faces SVN: r4041 - in trunk/ui/inputnumber-slider/src/main: resources/org/richfaces/renderkit/html/script and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-11-16 10:32:58 -0500 (Fri, 16 Nov 2007)
New Revision: 4041
Modified:
trunk/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml
trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js
trunk/ui/inputnumber-slider/src/main/templates/inputNumberSlider.jspx
Log:
add onsliding event
Modified: trunk/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml
===================================================================
--- trunk/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml 2007-11-16 15:23:04 UTC (rev 4040)
+++ trunk/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml 2007-11-16 15:32:58 UTC (rev 4041)
@@ -144,9 +144,17 @@
<property>
<name>onslide</name>
<classname>java.lang.String</classname>
+ <description>Event occur after on slid</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>onsliding</name>
+ <classname>java.lang.String</classname>
<description>Event occur on sliding</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
+ </property>
+
+
<property>
<name> onchange </name>
<classname>java.lang.String</classname>
Modified: trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js
===================================================================
--- trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js 2007-11-16 15:23:04 UTC (rev 4040)
+++ trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js 2007-11-16 15:32:58 UTC (rev 4041)
@@ -81,6 +81,10 @@
this.onSlideEvent = new Function("event",this.options.onslide).bindAsEventListener(this);
}
+ if (this.options.onsliding) {
+ this.onSlidingEvent = new Function("event",this.options.onsliding).bindAsEventListener(this);
+ }
+
if (this.options.onchange != ""){
this.eventChanged = new Function("event",this.options.onchange).bindAsEventListener(this);
}
@@ -250,7 +254,7 @@
var pointer = Event.pointerX(event);
var offsets = Position.cumulativeOffset(this.track);
this.updating = true;
- if(this.onSlideEvent) this.onSlideEvent(event);
+ if(this.onSlidingEvent) this.onSlidingEvent(event);
this.setValue(this.translateToValue( ( pointer - offsets[0] ) -(this.handleLength/2)));
this.updating = false;
var offsets = Position.cumulativeOffset(this.handle);
@@ -280,6 +284,7 @@
processMouseUp: function(event) {
this.endDrag(event);
this.fireClickIfNeeded(event);
+ if(this.onSlideEvent) this.onSlideEvent(event);
},
endDrag: function(event) {
Modified: trunk/ui/inputnumber-slider/src/main/templates/inputNumberSlider.jspx
===================================================================
--- trunk/ui/inputnumber-slider/src/main/templates/inputNumberSlider.jspx 2007-11-16 15:23:04 UTC (rev 4040)
+++ trunk/ui/inputnumber-slider/src/main/templates/inputNumberSlider.jspx 2007-11-16 15:32:58 UTC (rev 4041)
@@ -185,6 +185,7 @@
onerr : "#{component.attributes['onerror']}",
clientErrorMsg : "#{component.attributes['clientErrorMessage']}",
onslide : "#{component.attributes['onslide']}",
+ onsliding : "#{component.attributes['onsliding']}",
onchange : "#{component.attributes['onchange']}",
required : #{component.attributes['required']}
})
18 years, 5 months
JBoss Rich Faces SVN: r4040 - trunk/sandbox/ui.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-11-16 10:23:04 -0500 (Fri, 16 Nov 2007)
New Revision: 4040
Removed:
trunk/sandbox/ui/componentControl/
Modified:
trunk/sandbox/ui/pom.xml
Log:
http://jira.jboss.com/jira/browse/RF-1357
Modified: trunk/sandbox/ui/pom.xml
===================================================================
--- trunk/sandbox/ui/pom.xml 2007-11-16 15:20:47 UTC (rev 4039)
+++ trunk/sandbox/ui/pom.xml 2007-11-16 15:23:04 UTC (rev 4040)
@@ -21,7 +21,6 @@
<module>rex-resizable</module>
<module>rex-messageBox</module>
<!--module>rex-button</module-->
- <!--module>componentControl</module-->
<module>contextMenu</module>
</modules>
</project>
\ No newline at end of file
18 years, 5 months
JBoss Rich Faces SVN: r4039 - in branches/3.1.x/ui: componentControl and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-11-16 10:20:47 -0500 (Fri, 16 Nov 2007)
New Revision: 4039
Added:
branches/3.1.x/ui/componentControl/
branches/3.1.x/ui/componentControl/src/main/java/org/richfaces/renderkit/ComponentControlRendererBase.java
Removed:
branches/3.1.x/ui/componentControl/src/main/java/org/richfaces/renderkit/ComponentControlRendererBase.java
Modified:
branches/3.1.x/ui/componentControl/pom.xml
branches/3.1.x/ui/pom.xml
Log:
http://jira.jboss.com/jira/browse/RF-1357
Copied: branches/3.1.x/ui/componentControl (from rev 4037, trunk/sandbox/ui/componentControl)
Modified: branches/3.1.x/ui/componentControl/pom.xml
===================================================================
--- trunk/sandbox/ui/componentControl/pom.xml 2007-11-16 14:33:49 UTC (rev 4037)
+++ branches/3.1.x/ui/componentControl/pom.xml 2007-11-16 15:20:47 UTC (rev 4039)
@@ -1,11 +1,11 @@
<?xml version="1.0"?><project>
<parent>
<artifactId>ui</artifactId>
- <groupId>org.richfaces.sandbox</groupId>
- <version>3.2.0-SNAPSHOT</version>
+ <groupId>org.richfaces</groupId>
+ <version>3.1.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces.sandbox.ui</groupId>
+ <groupId>org.richfaces.ui</groupId>
<artifactId>componentControl</artifactId>
<name>componentControl</name>
<build>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.1.3-SNAPSHOT</version>
<executions>
<execution>
<phase>generate-sources</phase>
@@ -24,7 +24,7 @@
</executions>
<configuration>
<library>
- <prefix>org.richfaces.sandbox</prefix>
+ <prefix>org.richfaces</prefix>
<taglib>
<shortName>componentControl</shortName>
</taglib>
@@ -43,7 +43,7 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.1.3-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Deleted: branches/3.1.x/ui/componentControl/src/main/java/org/richfaces/renderkit/ComponentControlRendererBase.java
===================================================================
--- trunk/sandbox/ui/componentControl/src/main/java/org/richfaces/renderkit/ComponentControlRendererBase.java 2007-11-16 14:33:49 UTC (rev 4037)
+++ branches/3.1.x/ui/componentControl/src/main/java/org/richfaces/renderkit/ComponentControlRendererBase.java 2007-11-16 15:20:47 UTC (rev 4039)
@@ -1,39 +0,0 @@
-package org.richfaces.renderkit;
-
-import javax.faces.FacesException;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.renderkit.HeaderResourcesRendererBase;
-import org.richfaces.component.util.HtmlUtil;
-import org.richfaces.sandbox.component.UIComponentControl;
-
-
-public class ComponentControlRendererBase extends HeaderResourcesRendererBase {
-
- protected Class getComponentClass() {
- return UIComponentControl.class;
- }
-
- protected void checkValidity(String clientId, String name, String attachTiming, String forAttr, String operation) {
-
- if ( ! "onload".equals(attachTiming) &&
- ! "immediate".equals(attachTiming) ) {
- throw new FacesException(
- "The attachTiming attribute of the controlComponent (id='"+clientId+"') has an invalid value:'"+ attachTiming +
- "'. It may have only the following values: 'immediate', 'onload', 'onJScall'");
- }
-
- if (operation==null || "".equals(operation.trim())) {
- throw new FacesException(
- "The operation attribute of the controlComponent (id='"+clientId+"') must be specified" );
- }
-
-
- }
-
- protected String replaceClientIds(FacesContext context, UIComponent component, String selector) {
- return HtmlUtil.expandIdSelector(selector, component, context);
- }
-
-}
Copied: branches/3.1.x/ui/componentControl/src/main/java/org/richfaces/renderkit/ComponentControlRendererBase.java (from rev 4038, trunk/sandbox/ui/componentControl/src/main/java/org/richfaces/renderkit/ComponentControlRendererBase.java)
===================================================================
--- branches/3.1.x/ui/componentControl/src/main/java/org/richfaces/renderkit/ComponentControlRendererBase.java (rev 0)
+++ branches/3.1.x/ui/componentControl/src/main/java/org/richfaces/renderkit/ComponentControlRendererBase.java 2007-11-16 15:20:47 UTC (rev 4039)
@@ -0,0 +1,39 @@
+package org.richfaces.renderkit;
+
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.renderkit.HeaderResourcesRendererBase;
+import org.richfaces.component.util.HtmlUtil;
+import org.richfaces.sandbox.component.UIComponentControl;
+
+
+public class ComponentControlRendererBase extends HeaderResourcesRendererBase {
+
+ protected Class getComponentClass() {
+ return UIComponentControl.class;
+ }
+
+ protected void checkValidity(String clientId, String name, String attachTiming, String forAttr, String operation) {
+
+ if ( ! "onload".equals(attachTiming) &&
+ ! "immediate".equals(attachTiming) ) {
+ throw new FacesException(
+ "The attachTiming attribute of the controlComponent (id='"+clientId+"') has an invalid value:'"+ attachTiming +
+ "'. It may have only the following values: 'immediate', 'onload', 'onJScall'");
+ }
+
+ if (operation==null || operation.trim().length() == 0) {
+ throw new FacesException(
+ "The operation attribute of the controlComponent (id='"+clientId+"') must be specified" );
+ }
+
+
+ }
+
+ protected String replaceClientIds(FacesContext context, UIComponent component, String selector) {
+ return HtmlUtil.expandIdSelector(selector, component, context);
+ }
+
+}
Modified: branches/3.1.x/ui/pom.xml
===================================================================
--- branches/3.1.x/ui/pom.xml 2007-11-16 15:15:43 UTC (rev 4038)
+++ branches/3.1.x/ui/pom.xml 2007-11-16 15:20:47 UTC (rev 4039)
@@ -88,6 +88,7 @@
<module>treeModel</module>
<module>message</module>
<module>scrollableDataTable</module>
+ <module>componentControl</module>
<module>insert</module>
</modules>
<dependencies>
18 years, 5 months
JBoss Rich Faces SVN: r4038 - trunk/sandbox/ui/componentControl/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-11-16 10:15:43 -0500 (Fri, 16 Nov 2007)
New Revision: 4038
Modified:
trunk/sandbox/ui/componentControl/src/main/java/org/richfaces/renderkit/ComponentControlRendererBase.java
Log:
minor optimization for componentControl
Modified: trunk/sandbox/ui/componentControl/src/main/java/org/richfaces/renderkit/ComponentControlRendererBase.java
===================================================================
--- trunk/sandbox/ui/componentControl/src/main/java/org/richfaces/renderkit/ComponentControlRendererBase.java 2007-11-16 14:33:49 UTC (rev 4037)
+++ trunk/sandbox/ui/componentControl/src/main/java/org/richfaces/renderkit/ComponentControlRendererBase.java 2007-11-16 15:15:43 UTC (rev 4038)
@@ -24,7 +24,7 @@
"'. It may have only the following values: 'immediate', 'onload', 'onJScall'");
}
- if (operation==null || "".equals(operation.trim())) {
+ if (operation==null || operation.trim().length() == 0) {
throw new FacesException(
"The operation attribute of the controlComponent (id='"+clientId+"') must be specified" );
}
18 years, 5 months
JBoss Rich Faces SVN: r4037 - in trunk/ui/inputnumber-slider/src/main: resources/org/richfaces/renderkit/html/script and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-11-16 09:33:49 -0500 (Fri, 16 Nov 2007)
New Revision: 4037
Modified:
trunk/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml
trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js
trunk/ui/inputnumber-slider/src/main/templates/inputNumberSlider.jspx
Log:
add onslide event and clientErrorMessage attribute
Modified: trunk/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml
===================================================================
--- trunk/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml 2007-11-16 13:38:10 UTC (rev 4036)
+++ trunk/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml 2007-11-16 14:33:49 UTC (rev 4037)
@@ -136,7 +136,18 @@
</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
- <property>
+ <property>
+ <name>clientErrorMessage</name>
+ <classname>java.lang.String</classname>
+ <description>an error message to use in client side validation events</description>
+ </property>
+ <property>
+ <name>onslide</name>
+ <classname>java.lang.String</classname>
+ <description>Event occur on sliding</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
<name> onchange </name>
<classname>java.lang.String</classname>
<description>a JavaScript handler that is called when handle change position.
Modified: trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js
===================================================================
--- trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js 2007-11-16 13:38:10 UTC (rev 4036)
+++ trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js 2007-11-16 14:33:49 UTC (rev 4037)
@@ -73,13 +73,18 @@
this.eventInputChange = this.inputChange.bindAsEventListener(this);
this.eventWindowMouseOut= this.windowMouseOut.bindAsEventListener(this);
- if (this.options.onerr != ""){
- this.eventError = new Function(this.options.onerr).bindAsEventListener(this);
+ if (this.options.onerr) {
+ this.eventError = new Function("event","clientErrorMessage",this.options.onerr);
}
+
+ if (this.options.onslide) {
+ this.onSlideEvent = new Function("event",this.options.onslide).bindAsEventListener(this);
+ }
+
if (this.options.onchange != ""){
this.eventChanged = new Function("event",this.options.onchange).bindAsEventListener(this);
}
-
+
Event.observe(this.track, "mousedown", this.eventMouseDown);
Event.observe(tr, "mousedown", this.eventMouseDown);
Event.observe(this.input, "keydown", this.eventEditValidate);
@@ -245,6 +250,7 @@
var pointer = Event.pointerX(event);
var offsets = Position.cumulativeOffset(this.track);
this.updating = true;
+ if(this.onSlideEvent) this.onSlideEvent(event);
this.setValue(this.translateToValue( ( pointer - offsets[0] ) -(this.handleLength/2)));
this.updating = false;
var offsets = Position.cumulativeOffset(this.handle);
@@ -257,7 +263,6 @@
update: function(event) {
this.updating = true;
if(this.active) {
-
if(!this.dragging) this.dragging = true;
this.draw(event);
Event.stop(event);
@@ -320,7 +325,7 @@
} else {
if (this.outOfRange)
if (this.eventError)
- this.eventError();
+ this.eventError(e,this.options.clientErrorMessage);
this.setValue(Number(this.input.value));
}
this.value = this.input.value ? this.input.value : this.minimum;
@@ -349,7 +354,7 @@
this.input.value = this.value;
if (this.eventError){
- this.eventError();
+ this.eventError(e,this.options.clientErrorMsg);
}
} else {
if (!( e.keyCode > 37 && e.keyCode < 40 )){
Modified: trunk/ui/inputnumber-slider/src/main/templates/inputNumberSlider.jspx
===================================================================
--- trunk/ui/inputnumber-slider/src/main/templates/inputNumberSlider.jspx 2007-11-16 13:38:10 UTC (rev 4036)
+++ trunk/ui/inputnumber-slider/src/main/templates/inputNumberSlider.jspx 2007-11-16 14:33:49 UTC (rev 4037)
@@ -183,6 +183,8 @@
inputId : "#{clientId}Input",
arrowSelected : "#{arrowSelected}",
onerr : "#{component.attributes['onerror']}",
+ clientErrorMsg : "#{component.attributes['clientErrorMessage']}",
+ onslide : "#{component.attributes['onslide']}",
onchange : "#{component.attributes['onchange']}",
required : #{component.attributes['required']}
})
18 years, 5 months