JBoss Rich Faces SVN: r2056 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-08-03 11:59:04 -0400 (Fri, 03 Aug 2007)
New Revision: 2056
Modified:
trunk/docs/userguide/en/src/main/docbook/included/menuGroup.xml
Log:
fixed an error
Modified: trunk/docs/userguide/en/src/main/docbook/included/menuGroup.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/menuGroup.xml 2007-08-03 15:58:44 UTC (rev 2055)
+++ trunk/docs/userguide/en/src/main/docbook/included/menuGroup.xml 2007-08-03 15:59:04 UTC (rev 2056)
@@ -133,11 +133,11 @@
For skinnability implementation, the components use a style class redefinition method. Default style classes are mapped on skin parameters.
</para>
<para>
- There are two ways to redefine the appearance of all panelMenuGroups at once:
+ There are two ways to redefine the appearance of all menu groups at once:
</para>
<itemizedlist>
<listitem><para>Redefine corresponding skin parameters</para></listitem>
- <listitem><para>Add to user's styles heet style classes used by a panelMenuGroup</para></listitem>
+ <listitem><para>Add to user's styles heet style classes used by a menu group</para></listitem>
</itemizedlist>
</section>
<section>
@@ -271,10 +271,10 @@
</tgroup>
</table>
<para>
- In order to redefine the style for all panelMenuGroups on a page using CSS, it's enough to create classes with the same names and define the necessary properties in them.
+ In order to redefine the style for all menu groups on a page using CSS, it's enough to create classes with the same names and define the necessary properties in them.
</para>
<para>
- To change style aspects of particular panelMenuGroups define your own style classes in the corresponding panelMenuGroup attributes.
+ To change style aspects of particular panel menu groups define your own style classes in the corresponding menuGroup attributes.
</para>
</section>
</section>
17 years, 5 months
JBoss Rich Faces SVN: r2055 - in trunk/ui/modal-panel/src/main: java/org/richfaces/component and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-08-03 11:58:44 -0400 (Fri, 03 Aug 2007)
New Revision: 2055
Modified:
trunk/ui/modal-panel/src/main/config/component/modalPanel.xml
trunk/ui/modal-panel/src/main/java/org/richfaces/component/UIModalPanel.java
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
Log:
http://jira.jboss.com/jira/browse/RF-532
Modified: trunk/ui/modal-panel/src/main/config/component/modalPanel.xml
===================================================================
--- trunk/ui/modal-panel/src/main/config/component/modalPanel.xml 2007-08-03 15:57:16 UTC (rev 2054)
+++ trunk/ui/modal-panel/src/main/config/component/modalPanel.xml 2007-08-03 15:58:44 UTC (rev 2055)
@@ -197,7 +197,17 @@
<description>
</description>
<defaultvalue>false</defaultvalue>
- </property>
+ </property>
+ <property>
+ <name>tridentIVEngineSelectBehavior</name>
+ <classname>java.lang.String</classname>
+ <description>
+ How to handle HTML SELECT-based controls in IE 6?
+ - "disable" - default, handle as usual, use disabled="true" to hide SELECT controls
+ - "hide" - use visibility="hidden" to hide SELECT controls
+ </description>
+ <defaultvalue><![CDATA["disable"]]></defaultvalue>
+ </property>
</component>
</components>
Modified: trunk/ui/modal-panel/src/main/java/org/richfaces/component/UIModalPanel.java
===================================================================
--- trunk/ui/modal-panel/src/main/java/org/richfaces/component/UIModalPanel.java 2007-08-03 15:57:16 UTC (rev 2054)
+++ trunk/ui/modal-panel/src/main/java/org/richfaces/component/UIModalPanel.java 2007-08-03 15:58:44 UTC (rev 2055)
@@ -79,6 +79,9 @@
public abstract boolean isKeepVisualState();
public abstract void setKeepVisualState(boolean keepVisualState);
+
+ public abstract String getTridentIVEngineSelectBehavior();
+ public abstract void setTridentIVEngineSelectBehavior(String tridentIVEngineSelectBehavior);
public boolean getRendersChildren() {
return true;
Modified: trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
===================================================================
--- trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-08-03 15:57:16 UTC (rev 2054)
+++ trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-08-03 15:58:44 UTC (rev 2055)
@@ -171,6 +171,8 @@
this.firstHref = this.markerId + "FirstHref";
this.lastHref = this.markerId + "LastHref";
+
+ this.selectBehavior = options.selectBehavior;
},
destroy: function() {
@@ -222,32 +224,62 @@
for (var i = 0; i < selects.length; i++) {
var elt = selects[i];
-
- if (enable) {
- if (elt._mdwCount) {
- elt._mdwCount -= 1;
-
- if (elt._mdwCount == 0) {
- if (elt._mdwDisabled) {
- elt._mdwDisabled = undefined;
- } else {
- elt.disabled = false;
+
+ if (this.selectBehavior && "hide" == this.selectBehavior) {
+ if (enable) {
+ if (elt._mdwCount) {
+ elt._mdwCount -= 1;
+
+ if (elt._mdwCount == 0) {
+ if (elt._mdwHidden) {
+ Element.setStyle(elt, { "visibility" : elt._mdwHidden });
+ elt._mdwHidden = undefined;
+ } else {
+ Element.setStyle(elt, { "visibility" : "" });
+ }
+
+ elt._mdwCount = undefined;
}
-
- elt._mdwCount = undefined;
}
+ } else {
+ if (elt._mdwCount) {
+ elt._mdwCount += 1;
+ } else {
+ if (elt.style.visibility && "" != elt.style.visibility) {
+ elt._mdwHidden = elt.style.visibility;
+ }
+ Element.setStyle(elt, { "visibility" : "hidden" });
+
+ elt._mdwCount = 1;
+ }
}
} else {
- if (elt._mdwCount) {
- elt._mdwCount += 1;
+ if (enable) {
+ if (elt._mdwCount) {
+ elt._mdwCount -= 1;
+
+ if (elt._mdwCount == 0) {
+ if (elt._mdwDisabled) {
+ elt._mdwDisabled = undefined;
+ } else {
+ elt.disabled = false;
+ }
+
+ elt._mdwCount = undefined;
+ }
+ }
} else {
- if (elt.disabled) {
- elt._mdwDisabled = true;
+ if (elt._mdwCount) {
+ elt._mdwCount += 1;
} else {
- elt.disabled = true;
+ if (elt.disabled) {
+ elt._mdwDisabled = true;
+ } else {
+ elt.disabled = true;
+ }
+
+ elt._mdwCount = 1;
}
-
- elt._mdwCount = 1;
}
}
}
Modified: trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
===================================================================
--- trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2007-08-03 15:57:16 UTC (rev 2054)
+++ trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2007-08-03 15:58:44 UTC (rev 2055)
@@ -135,7 +135,8 @@
onhide: #{onhide},
keepVisualState: #{component.keepVisualState},
- showWhenRendered: #{component.showWhenRendered}
+ showWhenRendered: #{component.showWhenRendered},
+ selectBehavior: "#{component.tridentIVEngineSelectBehavior}"
});
</script>
</div>
17 years, 5 months
JBoss Rich Faces SVN: r2054 - trunk/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-08-03 11:57:16 -0400 (Fri, 03 Aug 2007)
New Revision: 2054
Added:
trunk/docs/userguide/en/src/main/resources/images/panelMenuGroup_icons.png
trunk/docs/userguide/en/src/main/resources/images/panelmenugroup1.png
trunk/docs/userguide/en/src/main/resources/images/panelmenugroup_col.png
trunk/docs/userguide/en/src/main/resources/images/panelmenugroup_exp.png
trunk/docs/userguide/en/src/main/resources/images/panelmenuitem.png
Log:
Added: trunk/docs/userguide/en/src/main/resources/images/panelMenuGroup_icons.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/panelMenuGroup_icons.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/docs/userguide/en/src/main/resources/images/panelmenugroup1.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/panelmenugroup1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/docs/userguide/en/src/main/resources/images/panelmenugroup_col.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/panelmenugroup_col.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/docs/userguide/en/src/main/resources/images/panelmenugroup_exp.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/panelmenugroup_exp.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/docs/userguide/en/src/main/resources/images/panelmenuitem.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/panelmenuitem.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 5 months
JBoss Rich Faces SVN: r2053 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-08-03 11:55:47 -0400 (Fri, 03 Aug 2007)
New Revision: 2053
Added:
trunk/docs/userguide/en/src/main/docbook/included/panelMenuGroup.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/panelMenuGroup.xml
trunk/docs/userguide/en/src/main/docbook/included/panelMenuItem.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/panelMenuItem.xml
Modified:
trunk/docs/userguide/en/src/main/docbook/included/menuGroup.xml
trunk/docs/userguide/en/src/main/docbook/included/panelMenu.xml
Log:
http://jira.jboss.com/jira/browse/RF-444
http://jira.jboss.com/jira/browse/RF-448
Modified: trunk/docs/userguide/en/src/main/docbook/included/menuGroup.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/menuGroup.xml 2007-08-03 15:25:47 UTC (rev 2052)
+++ trunk/docs/userguide/en/src/main/docbook/included/menuGroup.xml 2007-08-03 15:55:47 UTC (rev 2053)
@@ -133,11 +133,11 @@
For skinnability implementation, the components use a style class redefinition method. Default style classes are mapped on skin parameters.
</para>
<para>
- There are two ways to redefine the appearance of all menuGroups at once:
+ There are two ways to redefine the appearance of all panelMenuGroups at once:
</para>
<itemizedlist>
<listitem><para>Redefine corresponding skin parameters</para></listitem>
- <listitem><para>Add to user's styles heet style classes used by a menuGroup</para></listitem>
+ <listitem><para>Add to user's styles heet style classes used by a panelMenuGroup</para></listitem>
</itemizedlist>
</section>
<section>
@@ -271,10 +271,10 @@
</tgroup>
</table>
<para>
- In order to redefine the style for all menuGroups on a page using CSS, it's enough to create classes with the same names and define the necessary properties in them.
+ In order to redefine the style for all panelMenuGroups on a page using CSS, it's enough to create classes with the same names and define the necessary properties in them.
</para>
<para>
- To change style aspects of particular menuGroups define your own style classes in the corresponding menuGroup attributes.
+ To change style aspects of particular panelMenuGroups define your own style classes in the corresponding panelMenuGroup attributes.
</para>
</section>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/panelMenu.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/panelMenu.xml 2007-08-03 15:25:47 UTC (rev 2052)
+++ trunk/docs/userguide/en/src/main/docbook/included/panelMenu.xml 2007-08-03 15:55:47 UTC (rev 2053)
@@ -2,7 +2,7 @@
<section>
<sectioninfo>
<keywordset>
- <keyword>dropDownMenu</keyword>
+ <keyword>panelMenu</keyword>
</keywordset>
</sectioninfo>
@@ -181,7 +181,7 @@
<section>
<title>JavaScript API</title>
- <para>In Java Script code for expanding/collapsing group element creation it’s necessary to use
+ <para>In Java Script code for expanding/collapsing group element creation it's necessary to use
doExpand()/doCollapse() function.</para>
<table>
Added: trunk/docs/userguide/en/src/main/docbook/included/panelMenuGroup.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/panelMenuGroup.desc.xml (rev 0)
+++ trunk/docs/userguide/en/src/main/docbook/included/panelMenuGroup.desc.xml 2007-08-03 15:55:47 UTC (rev 2053)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<section>
+ <sectioninfo>
+ <keywordset>
+ <keyword>panelMenuGroup</keyword>
+ </keywordset>
+ </sectioninfo>
+ <section>
+ <para>The <emphasis role="bold">
+ <property><rich:panelMenuGroup></property>
+ </emphasis> component is used to define an expandable group of items inside the panel menu or other group.</para>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/panelmenu.png"/>
+ </imageobject>
+ </mediaobject>
+ </section>
+ <section>
+ <title>Key Features</title>
+ <itemizedlist>
+ <listitem>Highly customizable look-and-feel</listitem>
+ <listitem>Different submission modes inside every group</listitem>
+ <listitem>Optional submissions on expand collapse groups</listitem>
+ <listitem>Custom and predefined icons supported</listitem>
+ <listitem>Support for disabling</listitem>
+ </itemizedlist>
+ </section>
+</section>
Added: trunk/docs/userguide/en/src/main/docbook/included/panelMenuGroup.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/panelMenuGroup.xml (rev 0)
+++ trunk/docs/userguide/en/src/main/docbook/included/panelMenuGroup.xml 2007-08-03 15:55:47 UTC (rev 2053)
@@ -0,0 +1,432 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<section>
+ <sectioninfo>
+ <keywordset>
+ <keyword>panelMenuGroup</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.PanelMenuGroup</entry>
+ </row>
+
+ <row>
+ <entry>component-class</entry>
+
+ <entry>org.richfaces.component.html.HtmlPanelMenuGroup</entry>
+ </row>
+
+ <row>
+ <entry>component-family</entry>
+
+ <entry>org.richfaces.PanelMenuGroup</entry>
+ </row>
+
+ <row>
+ <entry>renderer-type</entry>
+
+ <entry>org.richfaces.PanelMenuGroupRenderer</entry>
+ </row>
+
+ <row>
+ <entry>tag-class</entry>
+
+ <entry>org.richfaces.taglib.PanelMenuGroupTag</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <section>
+ <title>Creating the Component with a Page Tag</title>
+
+ <para>To create the simplest variant on the page use the following syntax:</para>
+
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="xml">...
+ <rich:panelMenu>
+ <rich:panelMenuGroup label="Group1">
+ <!--Nested panelMenu components-->
+ </rich:panelMenuGroup>
+ </rich:panelMenu>
+...</programlisting>
+ </section>
+
+ <section>
+ <title>Creating the Component Dynamically Using Java</title>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="java">...
+ org.richfaces.component.html.HtmlPanelMenuGroup mypanelMenuGroup = new org.richfaces.component.html.HtmlPanelMenuGroup();
+...</programlisting>
+ </section>
+
+ <section>
+ <title>Details of Usage</title>
+
+ <para>All attributes except "label" are optional. The
+ "label" attribute defines text to be represented.</para>
+ <para>Switching mode could be chosen with the "expandMode" attribute for the
+ concrete panelMenu group.</para>
+ <para>The "expandMode" attribute could be used with three possible parameters:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Server (default)</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>The common submission of the form is performed and a page is completely refreshed.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Ajax</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Ajax form submission is performed additionally specified elements in the
+ "reRender" attribute are reRendered.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>None</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>"Action" and "ActionListener" attributes are ignored.
+ Items don't fire any submits itself. Behavior is fully defined by the components
+ nested to items.</para>
+
+ <para>There are three icon-related attributes. The "iconExpanded" attribute
+ defines an icon for an expanded state. The "iconCollapsed" attribute defines
+ an icon for a collapsed state. The "iconDisabled" attribute defines an icon
+ for a disabled state.</para>
+
+ <para>Default icons are shown on the picture below:</para>
+
+ <figure>
+ <title>Default icons</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/panelMenuGroup_icons.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Here is an example:</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="xml">...
+ <rich:panelMenu>
+ <rich:panelMenuGroup label="Group1" iconExpanded="disc" iconCollapsed="chevron">
+ <!--Nested panelMenu components-->
+ </rich:panelMenuGroup>
+ </rich:panelMenu>
+...</programlisting>
+ <para> As the result the pictures are shown below. The first one represents the collapsed state,
+ the second one - expanded state:</para>
+
+ <figure>
+ <title>Collapsed state</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/panelmenugroup_col.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure>
+ <title>Expanded state</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/panelmenugroup_exp.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>It's also possible to define a path to the icon. Simple code is placed below.</para>
+
+ <programlisting role="xml">...
+ <rich:panelMenu>
+ <rich:panelMenuGroup label="Group1" iconExpanded="\images\img1.gif" iconCollapsed=""\images\img2.gif"">
+ <!--Nested menu components-->
+ </rich:panelMenuGroup>
+ </rich:panelMenu>
+...</programlisting>
+
+ </section>
+
+ <section>
+ <title>JavaScript API</title>
+ <para>In Java Script code for expanding/collapsing group element creation it's
+ necessary to use doExpand()/doCollapse() function.</para>
+
+ <table>
+ <title>JavaScript API</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Function</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>doExpand()</entry>
+
+ <entry>Expand group element</entry>
+ </row>
+
+ <row>
+ <entry>doCollapse()</entry>
+
+ <entry>Collapse group element</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ </section>
+
+
+ <section>
+ <title>Look-and-Feel Customization</title>
+
+ <para>For skinnability implementation, the components use a style class redefinition method.
+ Default style classes are mapped on skin parameters.</para>
+
+ <para>There are two ways to redefine the appearance of all panel menu groups at once:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Redefine the corresponding skin parameters</para>
+ </listitem>
+
+ <listitem>
+ <para>Add to a user's style sheets style classes used by a panel menu group</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section>
+ <title> Skin parameters redefinition</title>
+
+ <table>
+ <title>Skin parameters redefinition for table element of the first level group</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Parameters for table element of the first level group</entry>
+
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>headerWeightFont</entry>
+
+ <entry>font-weight</entry>
+ </row>
+
+ <row>
+ <entry>generalFamilyFont</entry>
+
+ <entry>font-family</entry>
+ </row>
+
+ <row>
+ <entry>headerSizeFont</entry>
+
+ <entry>font-size</entry>
+ </row>
+
+ <row>
+ <entry>headerTextColor</entry>
+
+ <entry>color</entry>
+ </row>
+
+ <row>
+ <entry>headerBackgroundColor</entry>
+
+ <entry>background-color</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Skin parameters redefinition for table element of the second and next levels groups</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Parameters for table element of the second and next levels groups</entry>
+
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>headerWeightFont</entry>
+
+ <entry>font-weight</entry>
+ </row>
+
+ <row>
+ <entry>headerFamilyFont</entry>
+
+ <entry>font-family</entry>
+ </row>
+
+ <row>
+ <entry>headerSizeFont</entry>
+
+ <entry>font-size</entry>
+ </row>
+
+ <row>
+ <entry>generalTextColor</entry>
+
+ <entry>color</entry>
+ </row>
+
+ <row>
+ <entry>tableBorderColor</entry>
+
+ <entry>border-top-color</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Skin parameter redefinition for wrapped div element of the first level group</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Parameter for wrapped div element of the first level group</entry>
+
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>panelBorderColor</entry>
+
+ <entry>border-color</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+
+ <section>
+ <title>Definition of Custom Style Classes</title>
+
+ <figure>
+ <title>Classes names</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/panelmenugroup1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On the screenshot, there are classes names defining specified elements.</para>
+
+ <table>
+ <title>Component skin class</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>rich-pmenu-top-group-div</entry>
+
+ <entry>Defines top panel menu group common styleClass. It's used in the outside
+ <div> element</entry>
+ </row>
+
+ <row>
+ <entry>rich-pmenu-top-group</entry>
+
+ <entry>Defines top panel menu group wrapper table element</entry>
+ </row>
+
+ <row>
+ <entry>rich-pmenu-top-group-self-icon</entry>
+
+ <entry>Defines top panel menu group icon element</entry>
+ </row>
+
+ <row>
+ <entry>rich-pmenu-top-group-self-label</entry>
+
+ <entry>Defines top panel menu group label element</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>This classes set is related to upper level of nodes. For all nodes starting with the
+ second level there are similar classes:</para>
+
+ <itemizedlist>
+ <listitem>rich-pmenu-group-div</listitem>
+ <listitem>rich-pmenu-group</listitem>
+ <listitem>rich-pmenu-group-self-icon</listitem>
+ <listitem>rich-pmenu-group-self-label</listitem>
+ </itemizedlist>
+
+ <para>In order to redefine the style for all panel menu groups on a page using CSS,
+ it's enough to create classes with the same names and define the necessary properties
+ in them.</para>
+
+ <para>To change the style of particular panel menu groups components define your own style
+ classes in the corresponding panelMenuGroup attributes. </para>
+ </section>
+
+</section>
Added: trunk/docs/userguide/en/src/main/docbook/included/panelMenuItem.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/panelMenuItem.desc.xml (rev 0)
+++ trunk/docs/userguide/en/src/main/docbook/included/panelMenuItem.desc.xml 2007-08-03 15:55:47 UTC (rev 2053)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<section>
+ <sectioninfo>
+ <keywordset>
+ <keyword>panelMenuItem</keyword>
+ </keywordset>
+ </sectioninfo>
+ <section>
+ <para>The <emphasis role="bold">
+ <property><rich:panelMenuItem></property>
+ </emphasis> component is used to define a single item inside popup list.</para>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/panelmenu.png"/>
+ </imageobject>
+ </mediaobject>
+ </section>
+ <section>
+ <title>Key Features</title>
+ <itemizedlist>
+ <listitem>Highly customizable look-and-feel</listitem>
+ <listitem>Different submission modes</listitem>
+ <listitem>Optionally supports any content inside</listitem>
+ <listitem>Custom and predefined icons supported</listitem>
+ <listitem>Support for disabling</listitem>
+ </itemizedlist>
+ </section>
+</section>
Added: trunk/docs/userguide/en/src/main/docbook/included/panelMenuItem.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/panelMenuItem.xml (rev 0)
+++ trunk/docs/userguide/en/src/main/docbook/included/panelMenuItem.xml 2007-08-03 15:55:47 UTC (rev 2053)
@@ -0,0 +1,382 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<section>
+ <sectioninfo>
+ <keywordset>
+ <keyword>panelMenuItem</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.PanelMenuItem</entry>
+ </row>
+
+ <row>
+ <entry>component-class</entry>
+
+ <entry>org.richfaces.component.html.HtmlPanelMenuItem</entry>
+ </row>
+
+ <row>
+ <entry>component-family</entry>
+
+ <entry>org.richfaces.PanelMenuItem</entry>
+ </row>
+
+ <row>
+ <entry>renderer-type</entry>
+
+ <entry>org.richfaces.PanelMenuItemRenderer</entry>
+ </row>
+
+ <row>
+ <entry>tag-class</entry>
+
+ <entry>org.richfaces.taglib.PanelMenuItemTag</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <section>
+ <title>Creating the Component with a Page Tag</title>
+
+ <para>To create the simplest variant on the page use the following syntax:</para>
+
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="xml">...
+ <rich:panelMenu>
+ …
+ <rich:panelMenuItem value="Item1"/>
+ …
+ </rich:panelMenu>
+...</programlisting>
+ </section>
+
+ <section>
+ <title>Creating the Component Dynamically Using Java</title>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="java">...
+ org.richfaces.component.html.HtmlPanelMenuItem mypanelMenuItem = new org.richfaces.component.html.HtmlPanelMenuItem();
+...</programlisting>
+ </section>
+
+ <section>
+ <title>Details of Usage</title>
+
+ <para>All attributes except "label" are optional. The
+ "label" attribute defines text to be represented.</para>
+ <para>The "mode" attribute could be used with three possible parameters:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Server (default)</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>The common submission of the form is performed and a page is completely refreshed.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Ajax</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Ajax form submission is performed additionally specified elements in the
+ "reRender" attribute are reRendered.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>None</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>"Action" and "ActionListener" attributes are ignored.
+ Items don't fire any submits itself. Behavior is fully defined by the components
+ nested to items.</para>
+
+ <para>Here is an example for value "none":</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="xml">...
+ <rich:panelMenu>
+ …
+ <rich:panelMenuItem submitMode="none" onclick="document.location.href='http://labs.jboss.com/jbossrichfaces/">
+ <h:outputLink value="http://labs.jboss.com/jbossrichfaces/">
+ <h:outputText value="RichFaces Home Page"></h:outputText>
+ </h:outputLink>
+ </rich:panelMenuItem>
+ …
+ </rich:panelMenu>
+...</programlisting>
+
+ <para>There are two icon-related attributes. The "icon" attribute defines an
+ icon. The "iconDisabled" attribute defines an icon for a disabled item.</para>
+
+ <para>Default icons are shown on the picture below:</para>
+
+ <figure>
+ <title>Default icons</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/panelMenuGroup_icons.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Here is an example:</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="xml">...
+ <rich:panelMenu>
+ …
+ <rich:panelMenuItem ="Item 1.1" icon="chevronUp" />
+ …
+ </rich:panelMenu>
+...</programlisting>
+ <para> As the result the picture is shown below:</para>
+
+ <figure>
+ <title>Using an "icon" attribute</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/panelmenugroup_exp.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>It's also possible to define a path to the icon. Simple code is placed below.</para>
+
+ <programlisting role="xml">...
+ "rich:panelMenu"
+ …
+ "rich:panelMenuItem ="Item 1.1" icon="\images\img1.gif" /"
+ …
+ "/rich:panelMenu"
+...</programlisting>
+
+ </section>
+
+ <section>
+ <title>JavaScript API</title>
+ <para>In Java Script code for expanding/collapsing group element creation it's
+ necessary to use doExpand()/doCollapse() function.</para>
+
+ <table>
+ <title>JavaScript API</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Function</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>doExpand()</entry>
+
+ <entry>Expand group element</entry>
+ </row>
+
+ <row>
+ <entry>doCollapse()</entry>
+
+ <entry>Collapse group element</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ </section>
+
+
+ <section>
+ <title>Look-and-Feel Customization</title>
+
+ <para>For skinnability implementation, the components use a style class redefinition method.
+ Default style classes are mapped on skin parameters.</para>
+
+ <para>There are two ways to redefine the appearance of all panel menu items at once:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Redefine the corresponding skin parameters</para>
+ </listitem>
+
+ <listitem>
+ <para>Add to a user's style sheets style classes used by a panel menu item</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section>
+ <title> Skin parameters redefinition</title>
+
+ <table>
+ <title>Skin parameters redefinition for table element item of first level</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Parameters for table element item of first level</entry>
+
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>generalFamilyFont</entry>
+
+ <entry>font-family</entry>
+ </row>
+
+ <row>
+ <entry>generalWeightFont</entry>
+
+ <entry>font-weight</entry>
+ </row>
+
+ <row>
+ <entry>generalSizeFont</entry>
+
+ <entry>font-size</entry>
+ </row>
+
+ <row>
+ <entry>generalTextColor</entry>
+
+ <entry>color</entry>
+ </row>
+
+ <row>
+ <entry>panelBorderColor</entry>
+
+ <entry>border-top-color</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>General skin parameter redefinition for disabled item </title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Parameter for disabled item</entry>
+
+ <entry>CSS properties</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>panelBorderColor</entry>
+
+ <entry>color</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ </section>
+
+ <section>
+ <title>Definition of Custom Style Classes</title>
+
+ <figure>
+ <title>Classes names</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/panelmenuitem.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On the screenshot, there are classes names defining specified elements.</para>
+
+ <table>
+ <title>Component skin class</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>rich-pmenu-item</entry>
+
+ <entry>Defines panel menu item common styleClass</entry>
+ </row>
+
+ <row>
+ <entry>rich-pmenu-item-icon</entry>
+
+ <entry>Defines panel menu item icon</entry>
+ </row>
+
+ <row>
+ <entry>rich-pmenu-item-label</entry>
+
+ <entry>Defines panel menu item label element</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>This classes set is related to the second and all other lower levels of items. For all
+ items starting from the first level there are similar classes:</para>
+
+ <itemizedlist>
+ <listitem>rich-pmenu-top-item</listitem>
+ <listitem>rich-pmenu-top-item-icon</listitem>
+ <listitem>rich-pmenu-top-item-label</listitem>
+ </itemizedlist>
+
+ <para>In order to redefine the style for all panel menu items on a page using CSS,
+ it's enough to create classes with the same names and define the necessary properties
+ in them.</para>
+
+ <para>To change the style of particular panel menu items components define your own style
+ classes in the corresponding panelMenuItem attributes.</para>
+ </section>
+
+</section>
17 years, 5 months
JBoss Rich Faces SVN: r2052 - trunk/docs/ajaxguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkukharchuk
Date: 2007-08-03 11:25:47 -0400 (Fri, 03 Aug 2007)
New Revision: 2052
Added:
trunk/docs/ajaxguide/en/src/main/docbook/included/loadBundle.xml
Modified:
trunk/docs/ajaxguide/en/src/main/docbook/included/ajaxListener.xml
trunk/docs/ajaxguide/en/src/main/docbook/included/loadBundle.desc.xml
Log:
http://jira.jboss.com/jira/browse/AJSF-107
http://jira.jboss.com/jira/browse/AJSF-105
Modified: trunk/docs/ajaxguide/en/src/main/docbook/included/ajaxListener.xml
===================================================================
--- trunk/docs/ajaxguide/en/src/main/docbook/included/ajaxListener.xml 2007-08-03 15:12:46 UTC (rev 2051)
+++ trunk/docs/ajaxguide/en/src/main/docbook/included/ajaxListener.xml 2007-08-03 15:25:47 UTC (rev 2052)
@@ -1,11 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
-<root>
- <programlisting role="XML">
- <![CDATA[<a4j:region selfRendered="true" ajaxListener="#{bean.processAjax}" id="Region">
+<chapter>
+ <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.ajax4jsf.Listener</entry>
+ </row>
+ <row>
+ <entry>component-family</entry>
+ <entry>org.ajax4jsf.Listener</entry>
+ </row>
+ <row>
+ <entry>component-class</entry>
+ <entry>org.ajax4jsf.component.html.AjaxListener</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <!--
+ <section>
+ <title>Creating on a page</title>
+ <para>Simple Component definition on a page:</para>
- </a4j:region>]]>
- </programlisting>
- <para>
- Every time when AJAX request triggered from "region" method "processAjax" of "bean" will be called.
- </para>
-</root>
\ No newline at end of file
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+
+ <programlisting role="XML"><![CDATA[<a4j:ajaxListenet type=""/>
+]]></programlisting>
+ </section>
+ -->
+
+ <section>
+ <title>Dynamical creation of a component from Java code</title>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ <programlisting role="JAVA"><![CDATA[import org.ajax4jsf.component.html.AjaxListener;
+...
+AjaxListener myListener = new AjaxListener();
+...
+ ]]></programlisting>
+ </para>
+ </section>
+
+ <section>
+ <title>Key attributes and ways of usage</title>
+ <para>
+Additional to the listeners provided by JSF specification, RichFaces add one more: Ajax Listener (
+ <emphasis role="bold"><property><a4j:ajaxListener></property>
+ </emphasis>).
+Ajax Listener is invoked before the Render Response phase. Instead of Action Listener of Value Change Listener which are not
+invoked when Validation of Update Model phases failed, Ajax Listener is guarantied to be invoked for each Ajax response. So, it is
+a good place for update the list of re-rendered components, for example.
+Ajax Listener is not invoked for non-Ajax request and when RichFaces works in "Ajax Request generates
+Non-Ajax Response" mode. Therefore, Ajax Listener invocation is a good indicator that Ajax response is going to be processed.
+Attribute 'type' defines the fully qualified Java class name for listener. This class should implement org.ajax4jsf.events.AjaxListener interface.
+You can access to the source of the event (Ajax component) using event.getSource() call.
+ </para>
+
+ </section>
+</chapter>
\ No newline at end of file
Modified: trunk/docs/ajaxguide/en/src/main/docbook/included/loadBundle.desc.xml
===================================================================
--- trunk/docs/ajaxguide/en/src/main/docbook/included/loadBundle.desc.xml 2007-08-03 15:12:46 UTC (rev 2051)
+++ trunk/docs/ajaxguide/en/src/main/docbook/included/loadBundle.desc.xml 2007-08-03 15:25:47 UTC (rev 2052)
@@ -2,5 +2,6 @@
<section>
<para>The <emphasis role="bold">
<property><a4j:loadBundle></property>
- </emphasis> component is similar to the same component from the JSF Core library. The component loads a resource bundle localized for the Locale of the current view and exposes it (as a Map) in the request attributes of the current request.</para>
+ </emphasis> component is similar to the same component from the JSF Core library. The component loads a resource bundle
+ localized for the Locale of the current view and exposes it (as a Map) in the request attributes of the current request.</para>
</section>
\ No newline at end of file
Added: trunk/docs/ajaxguide/en/src/main/docbook/included/loadBundle.xml
===================================================================
--- trunk/docs/ajaxguide/en/src/main/docbook/included/loadBundle.xml (rev 0)
+++ trunk/docs/ajaxguide/en/src/main/docbook/included/loadBundle.xml 2007-08-03 15:25:47 UTC (rev 2052)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter>
+ <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.ajax4jsf.Bundle</entry>
+ </row>
+ <row>
+ <entry>component-family</entry>
+ <entry>org.ajax4jsf.Bundle</entry>
+ </row>
+ <row>
+ <entry>component-class</entry>
+ <entry>org.ajax4jsf.component.html.AjaxLoadBundle</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <section>
+ <title>Creating on a page</title>
+
+ <para>Simple component definition on a page:</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ <programlisting role="XML"><![CDATA[<a4j:loadBundle baseName="demo.bundle.Messages" var="Message"/>]]></programlisting>
+ </para>
+ </section>
+
+ <section>
+ <title>Dynamical creation of a component from Java code</title>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ <programlisting role="JAVA"><![CDATA[import org.ajax4jsf.component.html.AjaxLoadBundle;
+...
+LoadBundle myBundle = new LoadBundle();
+...
+ ]]></programlisting>
+ </para>
+ </section>
+
+ <section>
+ <title>Key attributes and ways of usage</title>
+ <para>
+
+ <emphasis role="bold"><property><a4j:loadBundle></property>
+ </emphasis>allows to use reference to bundle messages during the Ajax re-rendering.
+<emphasis role="bold"><property><a4j:loadBundle></property>
+ </emphasis> is a substitute for the
+<emphasis role="bold"><property><f:loadBundle></property>
+ </emphasis> in JSF 1.1 which is not a JSF component originally.
+
+<emphasis role="bold"><property><f:loadBundle></property>
+ </emphasis> is a jsp tag that load the bundle messages into the request scope when page is rendered. As soon as each Ajax request
+works in own request scope, the bundles loaded with
+<emphasis role="bold"><property><f:loadBundle></property>
+ </emphasis> are unavailable.
+Instead of
+<emphasis role="bold"><property><f:loadBundle></property>
+ </emphasis> that might be located anywhere on the page, the
+
+ <emphasis role="bold"><property><a4j:loadBundle></property>
+ </emphasis> should be declared inside the
+
+ <emphasis role="bold"><property><f:view></property>
+ </emphasis> (this does not matter in case on using Facelets)
+JSF 1.2 introduces the bundle registered in the faces-config.xml. This fixed the problem with
+ <emphasis role="bold"><property><f:loadBundle></property>
+ </emphasis>.
+Therefore, you can use this JSF 1.2 way to declare your bundles.
+
+ </para>
+ </section>
+</chapter>
\ No newline at end of file
17 years, 5 months
JBoss Rich Faces SVN: r2051 - trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2007-08-03 11:12:46 -0400 (Fri, 03 Aug 2007)
New Revision: 2051
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java
Log:
fixed incorrect row rendering
Modified: trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java
===================================================================
--- trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-08-03 14:30:44 UTC (rev 2050)
+++ trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-08-03 15:12:46 UTC (rev 2051)
@@ -340,8 +340,8 @@
row_id = baseClientId + ":f:" + state.getRowIndex();
writer.startElement("tr", grid);
+ getUtils().writeAttribute(writer, "class","dr-sgrid-rb " + state.getRowClass(state.getRowIndex()));
getUtils().writeAttribute(writer,"id",row_id);
- getUtils().writeAttribute(writer,"class", "dr-sgrid-rb");
collection.add(row_id);
}else if(!state.isFrozenColumn() && !normalTRRendered){
@@ -355,7 +355,7 @@
writer.startElement("tr", grid);
getUtils().writeAttribute(writer,"id",row_id);
- getUtils().writeAttribute(writer,"class", "dr-sgrid-rb");
+ getUtils().writeAttribute(writer, "class","dr-sgrid-rb " + state.getRowClass(state.getRowIndex()));
normalTRRendered = true;
collection.add(row_id);
@@ -364,6 +364,10 @@
UIScrollableGridColumn column = (UIScrollableGridColumn)kid;
columnsCount += cellRenderer.visit(context, column, writer, state);
// columnsCount += cellRenderer.visit(context, column, writer, state);
+
+
+
+
state.nextCell();
}
@@ -372,6 +376,12 @@
}
+// if(!state.isFrozenPart()){
+// writer.startElement("td", grid);
+// getUtils().writeAttribute(writer, "class","dr-sgrid-bc " + state.getColumnClass(state.getCellIndex()));
+// writer.endElement("td");
+// }
+
writer.endElement("tr");
state.setCellIndex(0);
state.nextRow();
17 years, 5 months
JBoss Rich Faces SVN: r2050 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkukharchuk
Date: 2007-08-03 10:30:44 -0400 (Fri, 03 Aug 2007)
New Revision: 2050
Modified:
trunk/docs/userguide/en/src/main/docbook/included/suggestionBox.xml
Log:
Modified: trunk/docs/userguide/en/src/main/docbook/included/suggestionBox.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/suggestionBox.xml 2007-08-03 14:08:28 UTC (rev 2049)
+++ trunk/docs/userguide/en/src/main/docbook/included/suggestionBox.xml 2007-08-03 14:30:44 UTC (rev 2050)
@@ -189,6 +189,50 @@
after which AJAX requests are called to perform suggestion.</para>
</section>
+
+ <section>
+ <para>
+There is possibility to define what be shown if the autocomplete returns empty list.
+Attribute "nothingLabel" or facet with the same name could be used for it.
+ </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+ <rich:suggestiobox nothingLabel="Empty" for="test" suggestionAction="#{bean.autocomplete}" var="cit">
+ <h:column>
+ <h:outputText value="#{cit.text}"/>
+ </h:column>
+ </rich:suggestionbox>
+...
+]]></programlisting>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:suggestiobox for="test" suggestionAction="#{bean.autocomplete}" var="cit">
+ <facet name="nothingLabel">
+ <h:outputText value="Empty"/>
+ </facet>
+ <h:column>
+ <h:outputText value="#{cit.text}"/>
+ </h:column>
+</rich:suggestionbox>
+...
+]]></programlisting>
+
+
+ <para>It looks on the page in the following way:</para>
+
+ <figure>
+ <title>SuggestionBox with empty list</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/suggestionbox5.gif"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+</section>
<section>
<title>Look-and-Feel Customization</title>
@@ -422,48 +466,7 @@
<para>To change the style of particular suggestionbox components define your own style classes in the corresponding suggestionbox attributes. </para>
</section>
- <section>
- <para>
-There is possibility to define what be shown if the autocomplete returns empty list.
-Attribute "nothingLabel" or facet with the same name could be used for it.
- </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
- <rich:suggestiobox nothingLabel="Empty" for="test" suggestionAction="#{bean.autocomplete}" var="cit">
- <h:column>
- <h:outputText value="#{cit.text}"/>
- </h:column>
- </rich:suggestionbox>
-...
-]]></programlisting>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
-<rich:suggestiobox for="test" suggestionAction="#{bean.autocomplete}" var="cit">
- <facet name="nothingLabel">
- <h:outputText value="Empty"/>
- </facet>
- <h:column>
- <h:outputText value="#{cit.text}"/>
- </h:column>
-</rich:suggestionbox>
-...
-]]></programlisting>
- </section>
- <para>It looks on the page in the following way:</para>
-
- <figure>
- <title>SuggestionBox with empty list</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/suggestionbox5.gif"/>
- </imageobject>
- </mediaobject>
- </figure>
<section>
<title>Relevant resources links</title>
17 years, 5 months
JBoss Rich Faces SVN: r2049 - in trunk/ui/tooltip/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: dbiatenia
Date: 2007-08-03 10:08:28 -0400 (Fri, 03 Aug 2007)
New Revision: 2049
Modified:
trunk/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java
trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
Log:
js variable will be stored in array now.
Modified: trunk/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java
===================================================================
--- trunk/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java 2007-08-03 13:53:34 UTC (rev 2048)
+++ trunk/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java 2007-08-03 14:08:28 UTC (rev 2049)
@@ -209,36 +209,19 @@
public void insertScript(FacesContext context, UIComponent component) throws IOException{
UIToolTip toolTip = (UIToolTip)component;
- String parentClientId = toolTip.getParent().getClientId(context);
+
StringBuffer ret = new StringBuffer();
ret.append("<script ");
ret.append("type=\"text/javascript\" ");
ret.append("id =\"script" + component.getClientId(context)+"\">\n");
- String comma = ",";
- String quot = "\"";
StringBuffer script = new StringBuffer();
//
- String event = toolTip.getEvent();
- if(event.startsWith("on")){
- event = event.substring(2);
- }
- String events = "{event:\"" + event + "\",onshow:\"" + toolTip.getOnshow() +
- "\",oncomplete:\"" + toolTip.getOncomplete() + "\",onhide:\"" + toolTip.getOnhide() +
- "\",delay:" + toolTip.getDelay() + ",jsVarName:\"" + getJsVarName(context, component) + "\"}";
- //script.append("var tooltip1 = ").
+ String jsVar = constructJSVariable(context, component);
- script.append(getJsVarName(context, toolTip) + " = ").
- append("new ToolTip(" + events).append(comma).append(quot).append( toolTip.getClientId(context)).append(quot).append(comma).
- append(quot).append(parentClientId).append(quot).append(comma).
- append(quot).append(toolTip.getMode()).append(quot).append(comma).
- append(toolTip.isDisabled()).append(comma).
- append(quot).append(toolTip.getDirection()).append(quot).append(comma).
- append(toolTip.isFollowMouse()).append(comma).
- append(toolTip.getHorizontalOffset()).append(comma).
- append(toolTip.getVerticalOffset()).append(comma).
- append("\"").append(insertAjaxFunction(context, component)).append("\");\n");
+ script.append(getJsVarName(context, toolTip) + " = ").append(jsVar).append(";\n");
+
ret.append(script.toString());
-
+ ret.append("Richfaces.tooltips[\"" + toolTip.getClientId(context) + "\"] = ").append(jsVar).append(";\n");
//
//ret.append("function toolTipAttach(){tooltip1.attachParentEvents() }\n");
@@ -248,6 +231,32 @@
}
+ public String constructJSVariable(FacesContext context, UIComponent component) {
+ UIToolTip toolTip = (UIToolTip)component;
+ String parentClientId = toolTip.getParent().getClientId(context);
+ StringBuffer ret = new StringBuffer();
+ String comma = ",";
+ String quot = "\"";
+ String event = toolTip.getEvent();
+ if(event.startsWith("on")){
+ event = event.substring(2);
+ }
+ String events = "{event:\"" + event + "\",onshow:\"" + toolTip.getOnshow() +
+ "\",oncomplete:\"" + toolTip.getOncomplete() + "\",onhide:\"" + toolTip.getOnhide() +
+ "\",delay:" + toolTip.getDelay() + ",jsVarName:\"" + getJsVarName(context, component) + "\"}";
+
+ ret.append("new ToolTip(" + events).append(comma).append(quot).append( toolTip.getClientId(context)).append(quot).append(comma).
+ append(quot).append(parentClientId).append(quot).append(comma).
+ append(quot).append(toolTip.getMode()).append(quot).append(comma).
+ append(toolTip.isDisabled()).append(comma).
+ append(quot).append(toolTip.getDirection()).append(quot).append(comma).
+ append(toolTip.isFollowMouse()).append(comma).
+ append(toolTip.getHorizontalOffset()).append(comma).
+ append(toolTip.getVerticalOffset()).append(comma).
+ append("\"").append(insertAjaxFunction(context, component)).append("\")");
+
+ return ret.toString();
+ }
private String getJsVarName(FacesContext context, UIComponent component){
return "window.tooltip" + component.getClientId(context).replaceAll("[^A-Za-z0-9_]", "_");
Modified: trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
===================================================================
--- trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2007-08-03 13:53:34 UTC (rev 2048)
+++ trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2007-08-03 14:08:28 UTC (rev 2049)
@@ -1,6 +1,6 @@
-// Detect if the browser is IE or not.
-// If it is not IE, we assume that the browser is NS.
-var IE = document.all?true:false;
+if(!Richfaces.tooltips){
+ Richfaces.tooltips = [];
+}
ToolTip = Class.create();
@@ -13,7 +13,6 @@
this.delay = events.delay;
this.jsVarName = events.jsVarName;
-
this.id = id;
this.parentId = parentId;
this.mode = mode;
@@ -48,7 +47,7 @@
// so, after DOM-element replaced, we should not display it
this.isMouseOvered = false;
- if(IE){
+ if(Richfaces.browser.isIE6){
var toolTipZindex = parseInt(this.toolTip.style.zIndex);
new Insertion.Before(this.toolTip,
"<iframe src=\"javascript:''\" frameborder=\"0\" scrolling=\"no\" id=\"" + this.id + "iframe\"" +
@@ -105,7 +104,7 @@
doShow: function(e){
- //alert('IE=' + IE);
+
if(this.onshow){
eval(this.onshow);
}
17 years, 5 months
JBoss Rich Faces SVN: r2048 - trunk/ui/calendar/design/funcspec.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2007-08-03 09:53:34 -0400 (Fri, 03 Aug 2007)
New Revision: 2048
Modified:
trunk/ui/calendar/design/funcspec/FuncSpec - RF Calendar Component.doc
Log:
Modified: trunk/ui/calendar/design/funcspec/FuncSpec - RF Calendar Component.doc
===================================================================
(Binary files differ)
17 years, 5 months
JBoss Rich Faces SVN: r2047 - trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2007-08-03 09:18:41 -0400 (Fri, 03 Aug 2007)
New Revision: 2047
Modified:
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
Log:
resetSelectedDate function and control added
other fixes
Modified: trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
--- trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-08-03 13:18:12 UTC (rev 2046)
+++ trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-08-03 13:18:41 UTC (rev 2047)
@@ -360,8 +360,8 @@
// direction - [top-left, top-right, bottom-left, bottom-right, auto]
// jointPoint - [top-left, top-right, bottom-left, bottom-right]
// popup - true
- // userClasses - inputClass, inputDisabledClass, inputInvalidClass, buttonClass, buttonDisabledClass
- // id+PopupButton, id+PopupInput,
+ // id+PopupButton, id+InputDate,
+ // inputType - [readonly-default, hidden, editable] - this parameter used only on server side
this.id = id;
@@ -1007,6 +1007,7 @@
d.setDate(1);
if (d.getMonth()==this.currentDate.getMonth() && d.getFullYear()==this.currentDate.getFullYear())
{
+ if (d.getDate()==this.currentDate.getDate()) return;
// find cell and call onklick event
var e = $(this.DATE_ELEMENT_ID+(this.firstDateIndex + this.selectedDate.getDate()-1));
if (e) Richfaces.createEvent ('click', e).fire();
@@ -1024,6 +1025,13 @@
this.selectedDate=null;
this.today(noUpdate);
}
+ },
+
+ resetSelectedDate: function()
+ {
+ if (!this.selectedDate) return;
+ this.selectedDate=null;
+ this.render();
}
});
@@ -1053,6 +1061,7 @@
CalendarView.currentMonthControl = function (context) { return context.calendar.getCurrentDate().format("MMMM, y", context.monthLabels, context.monthLabelsShort);};
CalendarView.todayControl = CalendarView.getControl("Today", "today");
CalendarView.selectedDateControl = function (context) { return CalendarView.getControl(context.calendar.getSelectedDateString(context.calendar.params.datePattern), "selectDate");};
+CalendarView.resetSelectedDateControl = function (context) { return (context.calendar.getSelectedDate() ? CalendarView.getControl("x", "resetSelectedDate") : "");};
CalendarView.helpControl = CalendarView.getControl("Help", "help");
CalendarView.header = [
@@ -1094,6 +1103,10 @@
[
new E('tr',{},
[
+ new E('td',{'class': 'calendar_toolfooter'},
+ [
+ new ET(function (context) { return Richfaces.evalMacro("resetSelectedDateControl", context)})
+ ]),
new E('td',{'class': 'calendar_toolfooter', 'style': 'white-space:nowrap'},
[
new ET(function (context) { return Richfaces.evalMacro("selectedDateControl", context)})
@@ -1130,5 +1143,6 @@
currentMonthControl: CalendarView.currentMonthControl,
todayControl: CalendarView.todayControl,
selectedDateControl: CalendarView.selectedDateControl,
+ resetSelectedDateControl: CalendarView.resetSelectedDateControl,
helpControl: CalendarView.helpControl
});
\ No newline at end of file
17 years, 5 months