JBoss Rich Faces SVN: r9964 - trunk/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-08-07 05:18:06 -0400 (Thu, 07 Aug 2008)
New Revision: 9964
Added:
trunk/docs/userguide/en/src/main/resources/images/richfaces_label2.png
Log:
https://jira.jboss.org/jira/browse/RF-4065 - The banner was added to RichFaces Guide
Added: trunk/docs/userguide/en/src/main/resources/images/richfaces_label2.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/richfaces_label2.png
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
16 years, 3 months
JBoss Rich Faces SVN: r9963 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-08-07 05:16:30 -0400 (Thu, 07 Aug 2008)
New Revision: 9963
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
Log:
https://jira.jboss.org/jira/browse/RF-3892 - State Manager API section fixed
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2008-08-07 09:14:10 UTC (rev 9962)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2008-08-07 09:16:30 UTC (rev 9963)
@@ -3773,83 +3773,6 @@
</section>
-
- <section>
- <title>Client-side script for extended skinning support</title>
-
- <para>As it was mentioned earlier in the guide,
- extended skinning of standard HTML controls is applied automatically:
- the browser type is detected and if a browser doesn't fully support
- extended skinning feature, only basic skinning is applied.
- </para>
-
- <para>
- However, if a develop doesn't want to
- the rich components and standard HTML
- controls to be skinned automatically and
- perform the skinnability implementation himself,
- he might encounter with a problem, i.e. standard
- HTML controls in such browsers as Opera and Safari are
- affected by standard controls skinning featured.
- ( <link linkend="ScriptsandStylesLoadStrategy">Here</link> you can get more details on how to disable skinnability.)
- </para>
-
- <para>
- In brief, to disable the skinnability mechanism of RichFaces you need to
- set the "org.richfaces.LoadStyleStrategy" parameter to "NONE" in web.xml.
-
- </para>
-
- <programlisting role="XML"><![CDATA[...
-<context-param>
- <param-name>org.richfaces.LoadStyleStrategy</param-name>
- <param-value>NONE</param-value>
-</context-param>
-...
-]]></programlisting>
-
- <para>
- Additionally, you should include the style sheets that perform skinning
- of the rich component and standard HTML controls.
- </para>
-
- <para>
- In order to resolve the problem with extended skinning in Opera and Safari a client script (skinning.js) is added to the RichFaces library.
- The script detects the browser type and enables extended skinning only for those browsers that fully support it.
-
- </para>
-
- <para>
- The script can be activated by inserting this JavaScript code to the page:
- </para>
-
- <programlisting role="XML"><![CDATA[
-<script type="text/javascript">
-window.RICH_FACES_EXTENDED_SKINNING_ON = true;
-</script>
-]]></programlisting>
-
-
- <para>
- You also need to specify "media" attribute in the
- <link> tag which includes the "extended_both.xcss" style sheet with "rich-extended-skinning".
-
- </para>
- <para>
- This is how you can include the style sheets to the page,
- in case automatic skinnability implementation is disabled.
-
- </para>
-
- <programlisting role="XML"><![CDATA[
-<link href='/YOUR_PROJECT_NAME/a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_both.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf' type='text/css' rel='stylesheet' class='component' />
-<link media='rich-extended-skinning' href='/ YOUR_PROJECT_NAME /a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/extended_both.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf' type='text/css' rel='stylesheet' class='component' />
-<link href='/ YOUR_PROJECT_NAME /a4j_3_2_2-SNAPSHOT/org/richfaces/skin.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf' type='text/css' rel='stylesheet' class='component' />
-]]></programlisting>
-
-
-
- </section>
<section id="XCSSfileformat">
<title>XCSS file format</title>
<para>
@@ -4463,9 +4386,10 @@
JSF has an advanced navigation mechanism that allows you to define navigation from view to view.
Navigation happens in a Web Application when a user tries to switch from one page to another page
either by clicking a button, a hyperlink, or another command component.
- But there is no switch mechanism between some states/views inside a page.
+ But there is no switch mechanism between some logical states of the same view.
For example in <property>Login/Register dialog</property> an existing user signs in with his user name and password,
- but if a new user registers an additional field "Confirm" is displayed when the user clicks "To register" link:
+ but if a new user registers an additional field "Confirm" is displayed,
+ buttons labels and methods are changed when the user clicks "To register" link:
</para>
<figure>
<title>
@@ -4491,10 +4415,10 @@
<property>RichFaces State API</property> allows easily define some set of states for the pages and any properties for this states.
</para>
<para>
- You could imagine one State as a set of named value bindings, method bindings, and some additional properties
- that are used after the state activation.
- So you could define input fields values, controls labels, actions, rendering conditions, etc.
- using the same state variables which have different values for every State.
+ Actually States is a <property>map</property> where the entry key is name of the State and the value is a State map.
+ Concrete State map has entries with some names as keys and any objects as values that are used after the state activation.
+ So, in the State map you could define any values, method bindings, or just some simple state varialbes (constants)
+ which have different values for every State.
</para>
<figure>
<title>
@@ -4507,11 +4431,6 @@
</mediaobject>
</figure>
<para>
- Actually States is a <property>map</property> where the entry key is name of the State and the value is a State map.
- Concrete State map has entries with some names as keys and any objects as values.
- So any values, method bindings, or just some simple state varialbes (constants) could be saved in the State map.
- </para>
- <para>
One of the most convenience features of the <property>RichFaces State API</property> is a navigation between states.
The <property>RichFaces State API</property> implements states change as the standard JSF navigation.
Action component just returns outcome and the RichFaces State API
16 years, 3 months
JBoss Rich Faces SVN: r9962 - in trunk/samples/richfaces-demo/src/main: webapp/richfaces/suggestionBox and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-08-07 05:14:10 -0400 (Thu, 07 Aug 2008)
New Revision: 9962
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/calendar/CalendarBean.java
trunk/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/usage.xhtml
Log:
https://jira.jboss.org/jira/browse/RF-3602
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/calendar/CalendarBean.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/calendar/CalendarBean.java 2008-08-07 08:14:04 UTC (rev 9961)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/calendar/CalendarBean.java 2008-08-07 09:14:10 UTC (rev 9962)
@@ -43,7 +43,7 @@
locale = Locale.US;
popup = true;
- pattern = "MMM d, yyyy, HH:mm";
+ pattern = "d/M/yy HH:mm";
}
public void selectLocale(ValueChangeEvent event) {
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/usage.xhtml 2008-08-07 08:14:04 UTC (rev 9961)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/usage.xhtml 2008-08-07 09:14:10 UTC (rev 9962)
@@ -30,20 +30,6 @@
</ui:include>
</div>
</fieldset>
- <p>
- Description
- </p>
- <fieldset class="demo_fieldset">
- <legend class="demo_legend">Mail Editor sample</legend>
- <div class="sample-container">
- <ui:include src="/richfaces/suggestionBox/examples/mailWizard.xhtml"/>
- <ui:include src="/templates/include/sourceview.xhtml">
- <ui:param name="sourcepath" value="/richfaces/suggestionBox/examples/mailWizard.xhtml"/>
- </ui:include>
- </div>
- </fieldset>
-
-
</ui:define>
</ui:composition>
16 years, 3 months
JBoss Rich Faces SVN: r9961 - in trunk/test-applications/seleniumTest/src: main/webapp/pages/ajaxCommandButton and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-08-07 04:14:04 -0400 (Thu, 07 Aug 2008)
New Revision: 9961
Modified:
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/A4JCommandTestBean.java
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommandButton/ajaxButtonTest.xhtml
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommandLink/ajaxLinkTest.xhtml
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxCommandButtonTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java
Log:
Add test of rerendering to ajax commands
Modified: trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/A4JCommandTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/A4JCommandTestBean.java 2008-08-06 18:43:50 UTC (rev 9960)
+++ trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/A4JCommandTestBean.java 2008-08-07 08:14:04 UTC (rev 9961)
@@ -1,5 +1,6 @@
package org.ajax4jsf.bean;
+import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@@ -77,5 +78,9 @@
public void setRendered(boolean rendered) {
this.rendered = rendered;
}
+
+ public String getDate () {
+ return String.valueOf(Math.random());
+ }
}
Modified: trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommandButton/ajaxButtonTest.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommandButton/ajaxButtonTest.xhtml 2008-08-06 18:43:50 UTC (rev 9960)
+++ trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommandButton/ajaxButtonTest.xhtml 2008-08-07 08:14:04 UTC (rev 9961)
@@ -116,7 +116,7 @@
actionListener="#{commandBean.actionListener}"
oncomplete="onCompleteHandler(data);"
onmousedown="setValidation(true)"
- reRender="_value"
+ reRender="_value, _rerender"
>
<a4j:ajaxListener type="org.ajax4jsf.bean.TestListener"></a4j:ajaxListener>
</a4j:commandButton>
@@ -202,6 +202,7 @@
</tbody>
</table>
<h:inputHidden id="_value" required="true" value="#{commandBean.value}"></h:inputHidden>
+ <h:outputText id="_rerender" value="#{commandBean.date}"></h:outputText>
</h:form>
</ui:define>
</ui:composition>
Modified: trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommandLink/ajaxLinkTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxCommandButtonTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxCommandButtonTest.java 2008-08-06 18:43:50 UTC (rev 9960)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxCommandButtonTest.java 2008-08-07 08:14:04 UTC (rev 9961)
@@ -15,6 +15,9 @@
String parentId = getParentId() + "_form:";
String buttonId = parentId + "b1";
+
+ String rerenderId = parentId + "_rerender";
+ String rerenderStr = getTextById(rerenderId);
boolean ajaxSingle = false;
boolean immediate = false;
writeStatus("Click button 1");
@@ -23,6 +26,7 @@
waitForAjaxCompletion();
waitForOnCompleteHndler();
checkButton(buttonId, true, ajaxSingle, immediate, true, true, true, true);
+ checkRerendering(rerenderStr, rerenderId);
buttonId = parentId + "b2";
ajaxSingle = false;
@@ -67,6 +71,13 @@
runScript("_onCompleteHandler = false;");
}
+ private void checkRerendering(String oldRerender, String rerenderId) {
+ String newRerender = getTextById(rerenderId);
+ if (oldRerender.equals(newRerender)) {
+ Assert.fail("<a4j:commandButton> failed. Rerender does not work.");
+ }
+ }
+
private void checkButton(String id, boolean testData, boolean ajaxSingle, boolean immediate, boolean testAction, boolean testActionListener, boolean testFListener, boolean testInput) {
writeStatus("Checking button...");
StringBuffer buffer = new StringBuffer("checkButton('");
Modified: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java 2008-08-06 18:43:50 UTC (rev 9960)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java 2008-08-07 08:14:04 UTC (rev 9961)
@@ -13,6 +13,9 @@
renderPage(template);
String parentId = getParentId() + "_form:";
+
+ String rerenderId = parentId + "_rerender";
+ String rerenderStr = getTextById(rerenderId);
String linkId = parentId + "l1";
boolean ajaxSingle = false;
@@ -23,6 +26,7 @@
waitForAjaxCompletion();
waitForOnCompleteHndler();
checkButton(linkId, true, ajaxSingle, immediate, true, true, true, true);
+ checkRerendering(rerenderStr, rerenderId);
linkId = parentId + "l2";
ajaxSingle = false;
@@ -69,6 +73,13 @@
runScript("_onCompleteHandler = false;");
}
+ private void checkRerendering(String oldRerender, String rerenderId) {
+ String newRerender = getTextById(rerenderId);
+ if (oldRerender.equals(newRerender)) {
+ Assert.fail("<a4j:commandButton> failed. Rerender does not work.");
+ }
+ }
+
private void checkButton(String id, boolean testData, boolean ajaxSingle, boolean immediate, boolean testAction, boolean testActionListener, boolean testFListener, boolean testInput) {
writeStatus("Checking link...");
StringBuffer buffer = new StringBuffer("checkLink('");
16 years, 3 months
JBoss Rich Faces SVN: r9960 - trunk/test-applications/seleniumTest/src/test/java/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-08-06 14:43:50 -0400 (Wed, 06 Aug 2008)
New Revision: 9960
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBase.java
Log:
from here AUT always will be run in embedded frame
Modified: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBase.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBase.java 2008-08-06 16:42:32 UTC (rev 9959)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBase.java 2008-08-06 18:43:50 UTC (rev 9960)
@@ -27,6 +27,7 @@
import org.ajax4jsf.bean.Configurator;
import org.ajax4jsf.javascript.ScriptUtils;
import org.ajax4jsf.template.Template;
+import org.openqa.selenium.server.RemoteControlConfiguration;
import org.openqa.selenium.server.SeleniumServer;
import org.testng.Assert;
import org.testng.annotations.AfterClass;
@@ -93,7 +94,9 @@
@BeforeSuite
public void startSeleniumServer() throws Exception {
- seleniumServer = new SeleniumServer();
+ RemoteControlConfiguration config = new RemoteControlConfiguration();
+ config.setMultiWindow(false);
+ seleniumServer = new SeleniumServer(false, config);
seleniumServer.start();
}
16 years, 3 months
JBoss Rich Faces SVN: r9959 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-08-06 12:42:32 -0400 (Wed, 06 Aug 2008)
New Revision: 9959
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
Log:
https://jira.jboss.org/jira/browse/RF-3990
A skinning sript is descripbed
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2008-08-06 16:36:22 UTC (rev 9958)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2008-08-06 16:42:32 UTC (rev 9959)
@@ -3773,6 +3773,83 @@
</section>
+
+ <section>
+ <title>Client-side script for extended skinning support</title>
+
+ <para>As it was mentioned earlier in the guide,
+ extended skinning of standard HTML controls is applied automatically:
+ the browser type is detected and if a browser doesn't fully support
+ extended skinning feature, only basic skinning is applied.
+ </para>
+
+ <para>
+ However, if a develop doesn't want to
+ the rich components and standard HTML
+ controls to be skinned automatically and
+ perform the skinnability implementation himself,
+ he might encounter with a problem, i.e. standard
+ HTML controls in such browsers as Opera and Safari are
+ affected by standard controls skinning featured.
+ ( <link linkend="ScriptsandStylesLoadStrategy">Here</link> you can get more details on how to disable skinnability.)
+ </para>
+
+ <para>
+ In brief, to disable the skinnability mechanism of RichFaces you need to
+ set the "org.richfaces.LoadStyleStrategy" parameter to "NONE" in web.xml.
+
+ </para>
+
+ <programlisting role="XML"><![CDATA[...
+<context-param>
+ <param-name>org.richfaces.LoadStyleStrategy</param-name>
+ <param-value>NONE</param-value>
+</context-param>
+...
+]]></programlisting>
+
+ <para>
+ Additionally, you should include the style sheets that perform skinning
+ of the rich component and standard HTML controls.
+ </para>
+
+ <para>
+ In order to resolve the problem with extended skinning in Opera and Safari a client script (skinning.js) is added to the RichFaces library.
+ The script detects the browser type and enables extended skinning only for those browsers that fully support it.
+
+ </para>
+
+ <para>
+ The script can be activated by inserting this JavaScript code to the page:
+ </para>
+
+ <programlisting role="XML"><![CDATA[
+<script type="text/javascript">
+window.RICH_FACES_EXTENDED_SKINNING_ON = true;
+</script>
+]]></programlisting>
+
+
+ <para>
+ You also need to specify "media" attribute in the
+ <link> tag which includes the "extended_both.xcss" style sheet with "rich-extended-skinning".
+
+ </para>
+ <para>
+ This is how you can include the style sheets to the page,
+ in case automatic skinnability implementation is disabled.
+
+ </para>
+
+ <programlisting role="XML"><![CDATA[
+<link href='/YOUR_PROJECT_NAME/a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_both.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf' type='text/css' rel='stylesheet' class='component' />
+<link media='rich-extended-skinning' href='/ YOUR_PROJECT_NAME /a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/extended_both.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf' type='text/css' rel='stylesheet' class='component' />
+<link href='/ YOUR_PROJECT_NAME /a4j_3_2_2-SNAPSHOT/org/richfaces/skin.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf' type='text/css' rel='stylesheet' class='component' />
+]]></programlisting>
+
+
+
+ </section>
<section id="XCSSfileformat">
<title>XCSS file format</title>
<para>
16 years, 3 months
JBoss Rich Faces SVN: r9958 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-08-06 12:36:22 -0400 (Wed, 06 Aug 2008)
New Revision: 9958
Modified:
trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml
Log:
https://jira.jboss.org/jira/browse/RF-3890
A description for Flash module
Modified: trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2008-08-06 16:30:57 UTC (rev 9957)
+++ trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2008-08-06 16:36:22 UTC (rev 9958)
@@ -262,13 +262,44 @@
<listitem><para>By means of JavaScript on the client side. Use the following syntax for that <code>entries[i].propertyName</code>. For example <code>entries[0].state</code> will return the state of the file the is being processed or has just been processed. A full list of properties can be found <link linkend="objectProperties">here</link>. </para></listitem>
- <listitem><para>The properties of <code>FileUploadEntry</code> object can be retrieved using the <code>entry.propertyName</code> expression in the specific event attributes. For example, <code>onupload="alert(entry.fileName)"</code> will display a message with the name of the file at the moment when upload operation begins.</para></listitem>
+ <listitem><para>The properties of <code>FileUploadEntry</code> object can be retrieved using the <code>entry.propertyName</code> expression in the specific event attributes. For example, <code>onupload="alert(event.memo.entry.fileName);" </code> will display a message with the name of the file at the very moment when upload operation starts. A full list of properties can be found <link linkend="objectPropertiesWithAttributes">here</link>.</para></listitem>
</itemizedlist>
+<para>The given bellow code sample demonstrates how the properties can be used. Please study it carefully. </para>
+ <programlisting role="XML"><![CDATA[...
+ <head>
+ <script>
+ function _onaddHandler (e) {
+ var i = 0;
+ for (; i < e.memo.entries.lenght; i++) {
+ alert(e.memo.entries[i].creator); //Shows creators of the added files
+ }
+ }
+ function _onerrorhandle(e) {
+ alert(e.memo.entry.fileName + "file was not uploaded due transfer error");
+ }
+ </script>
+ </head>
+ ...]]></programlisting>
+
+
+ <para> Moreover, embedded Flash module provides a smoother representation of progress bar during the uploading process: the polling is performed is not by AJAX, but my means of the flash module.
+ </para>
+ <figure>
+ <title>
+ Uploading using Flash module <emphasis role="bold"><property><rich:fileUpload></property></emphasis>
+ </title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/flash_fileUpload.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Though, the Flash module doens't perform any visual representation.</para>
<!--End of Flash Module-->
@@ -583,7 +614,7 @@
- <table d="objectPropertiesWithAttributes">
+ <table id="objectPropertiesWithAttributes">
<title>Client side object properties available with specific <link linkend="fileUploadEventAttributes"> event attributes</link></title>
<tgroup cols="2">
<thead>
16 years, 3 months
JBoss Rich Faces SVN: r9957 - trunk/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-08-06 12:30:57 -0400 (Wed, 06 Aug 2008)
New Revision: 9957
Added:
trunk/docs/userguide/en/src/main/resources/images/flash_fileUpload.png
Log:
https://jira.jboss.org/jira/browse/RF-3890
A picture for FileUpload is added
Added: trunk/docs/userguide/en/src/main/resources/images/flash_fileUpload.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/flash_fileUpload.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 3 months
JBoss Rich Faces SVN: r9956 - in trunk/framework/impl/src/main/java/org/ajax4jsf: context and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-08-06 11:34:57 -0400 (Wed, 06 Aug 2008)
New Revision: 9956
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/application/AjaxViewHandler.java
trunk/framework/impl/src/main/java/org/ajax4jsf/context/ViewResources.java
Log:
https://jira.jboss.org/jira/browse/RF-4083
https://jira.jboss.org/jira/browse/RF-4103
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/application/AjaxViewHandler.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/application/AjaxViewHandler.java 2008-08-06 15:34:52 UTC (rev 9955)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/application/AjaxViewHandler.java 2008-08-06 15:34:57 UTC (rev 9956)
@@ -213,7 +213,21 @@
ViewResources viewResources = new ViewResources();
- viewResources.setExtendedSkinningAllowed(true);
+ boolean extendedSkinningAllowed = true;
+ String skinningLevel = getInitParameterValue(context, InternetResourceBuilder.CONTROL_SKINNING_LEVEL);
+ if (skinningLevel != null && skinningLevel.length() > 0) {
+ if (InternetResourceBuilder.BASIC.equals(skinningLevel)) {
+ extendedSkinningAllowed = false;
+ } else if (!InternetResourceBuilder.EXTENDED.equals(skinningLevel)) {
+ throw new IllegalArgumentException("Value: " + skinningLevel +
+ " of " + InternetResourceBuilder.CONTROL_SKINNING_LEVEL
+ + " init parameter is invalid! Only " + InternetResourceBuilder.EXTENDED
+ + ", " + InternetResourceBuilder.BASIC + " can be used");
+ }
+ }
+
+ viewResources.setExtendedSkinningAllowed(extendedSkinningAllowed);
+
viewResources.setScriptStrategy(getInitParameterValue(context,
InternetResourceBuilder.LOAD_SCRIPT_STRATEGY_PARAM));
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/context/ViewResources.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/context/ViewResources.java 2008-08-06 15:34:52 UTC (rev 9955)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/context/ViewResources.java 2008-08-06 15:34:57 UTC (rev 9956)
@@ -22,6 +22,7 @@
package org.ajax4jsf.context;
import java.io.IOException;
+import java.io.StringWriter;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
@@ -79,8 +80,12 @@
private Object[] result = null;
+ private static final String EXTENDED_SKINNING_ON_NO_SCRIPTS_INFO_KEY = ViewResources.class.getName() + "EXTENDED_SKINNING_ON_NO_SCRIPTS_INFO_KEY";
+
private static final InternetResource EXTENDED_SKINNING_ON_RESOURCE = new InternetResourceBase() {
+ private final String RESOURCE_KEY = this.getClass().getName();
+
@Override
public void encode(FacesContext context, Object data)
throws IOException {
@@ -92,20 +97,25 @@
public void encode(FacesContext context, Object data,
Map<String, Object> attributes) throws IOException {
- ResponseWriter writer = context.getResponseWriter();
- writer.startElement(HTML.SCRIPT_ELEM, null);
-
- if (!attributes.containsKey(HTML.TYPE_ATTR)) {
- writer.writeAttribute(HTML.TYPE_ATTR, "text/javascript", null);
+ Map<String, Object> requestMap = context.getExternalContext().getRequestMap();
+ if (requestMap.get(RESOURCE_KEY) == null) {
+ ResponseWriter writer = context.getResponseWriter();
+ writer.startElement(HTML.SCRIPT_ELEM, null);
+
+ if (!attributes.containsKey(HTML.TYPE_ATTR)) {
+ writer.writeAttribute(HTML.TYPE_ATTR, "text/javascript", null);
+ }
+
+ for (Map.Entry<String, Object> entry : attributes.entrySet()) {
+ writer.writeAttribute(entry.getKey(), entry.getValue(), null);
+ }
+
+ writer.writeText("window.RICH_FACES_EXTENDED_SKINNING_ON=true;", null);
+
+ writer.endElement(HTML.SCRIPT_ELEM);
+
+ requestMap.put(RESOURCE_KEY, Boolean.TRUE);
}
-
- for (Map.Entry<String, Object> entry : attributes.entrySet()) {
- writer.writeAttribute(entry.getKey(), entry.getValue(), null);
- }
-
- writer.writeText("window.RICH_FACES_EXTENDED_SKINNING_ON=true;", null);
-
- writer.endElement(HTML.SCRIPT_ELEM);
}
};
@@ -152,7 +162,7 @@
public static final String SKINNING_STYLES_PATH = "/org/richfaces/renderkit/html/css/";
- private boolean extendedSkinningAllowed = true;
+ private boolean extendedSkinningAllowed;
private boolean processScripts;
@@ -322,6 +332,8 @@
renderKit = rkFactory.getRenderKit(context, context
.getViewRoot().getRenderKitId());
+ boolean scriptsOff = false;
+
processStyles = true;
processScripts = true;
useSkinning = false;
@@ -371,6 +383,7 @@
if (null != scriptStrategy) {
if (InternetResourceBuilder.LOAD_NONE
.equals(scriptStrategy)) {
+ scriptsOff = true;
processScripts = false;
} else if (InternetResourceBuilder.LOAD_ALL
.equals(scriptStrategy)) {
@@ -457,17 +470,46 @@
useSkinning = true;
}
- if (!ajaxRequest && useSkinning && extendedSkinningAllowed) {
- //skinning levels aren't dynamic, page-level setting cannot be changed
- //by AJAX request
- EXTENDED_SKINNING_ON_RESOURCE.encode(context, null);
- }
+ if (useSkinning && extendedSkinningAllowed) {
+ if (!ajaxRequest) {
+ if (!scriptsOff) {
+ //skinning levels aren't dynamic, page-level setting cannot be changed
+ //by AJAX request
+ EXTENDED_SKINNING_ON_RESOURCE.encode(context, null);
+ } else {
+
+ Map<String, Object> applicationMap = context.getExternalContext().getApplicationMap();
+ if (applicationMap.get(EXTENDED_SKINNING_ON_NO_SCRIPTS_INFO_KEY) == null) {
+ //do it once per application life - strategies can be changed dynamically
+ ResponseWriter writer = context.getResponseWriter();
+ try {
+ StringWriter stringWriter = new StringWriter();
+ context.setResponseWriter(oldResponseWriter.cloneWithWriter(stringWriter));
+
+ EXTENDED_SKINNING_ON_RESOURCE.encode(context, null);
- if (processScripts) {
- InternetResource resource = resourceBuilder.createResource(null,
- "/org/richfaces/renderkit/html/scripts/skinning.js");
+ stringWriter.flush();
+
+ log.info("Extended skinning is on and NONE scripts loading strategy was detected. " +
+ "Do not forget that one of " + InternetResourceBuilder.SKINNING_SCRIPT + " or " +
+ InternetResourceBuilder.COMMON_FRAMEWORK_SCRIPT + " resources should be presented " +
+ "on the page together with the following code: \n" + stringWriter.getBuffer().toString() +
+ "\nfor extended level of skinning to work.");
+ } finally {
+ context.setResponseWriter(writer);
+ }
- resource.encode(context, null);
+ applicationMap.put(EXTENDED_SKINNING_ON_NO_SCRIPTS_INFO_KEY, Boolean.TRUE);
+ }
+ }
+ }
+
+ if (processScripts) {
+ InternetResource resource = resourceBuilder.createResource(null,
+ InternetResourceBuilder.SKINNING_SCRIPT);
+
+ resource.encode(context, null);
+ }
}
componentWriter.endDocument();
@@ -475,9 +517,7 @@
} catch (IOException e) {
throw new FacesException(e.getLocalizedMessage(), e);
} finally {
- if (oldResponseWriter != null) {
- context.setResponseWriter(oldResponseWriter);
- }
+ context.setResponseWriter(oldResponseWriter);
}
}
}
16 years, 3 months
JBoss Rich Faces SVN: r9955 - trunk/framework/api/src/main/java/org/ajax4jsf/resource.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-08-06 11:34:52 -0400 (Wed, 06 Aug 2008)
New Revision: 9955
Modified:
trunk/framework/api/src/main/java/org/ajax4jsf/resource/InternetResourceBuilder.java
Log:
https://jira.jboss.org/jira/browse/RF-4083
https://jira.jboss.org/jira/browse/RF-4103
Modified: trunk/framework/api/src/main/java/org/ajax4jsf/resource/InternetResourceBuilder.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/resource/InternetResourceBuilder.java 2008-08-06 14:44:19 UTC (rev 9954)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/resource/InternetResourceBuilder.java 2008-08-06 15:34:52 UTC (rev 9955)
@@ -41,6 +41,9 @@
private static final Log log = LogFactory.getLog(InternetResourceBuilder.class);
public static final String LOAD_NONE = "NONE";
public static final String LOAD_ALL = "ALL";
+
+ public static final String SKINNING_SCRIPT = "/org/richfaces/renderkit/html/scripts/skinning.js";
+
public static final String COMMON_FRAMEWORK_SCRIPT = "/org/ajax4jsf/framework.pack.js";
public static final String COMMON_UI_SCRIPT = "/org/richfaces/ui.pack.js";
public static final String COMMON_STYLE_PREFIX = "/org/richfaces/skin";
@@ -53,6 +56,10 @@
public static final String STD_CONTROLS_SKINNING_CLASSES_PARAM = "org.richfaces.CONTROL_SKINNING_CLASSES";
public static final String ENABLE = "enable";
+ public static final String CONTROL_SKINNING_LEVEL = "org.richfaces.CONTROL_SKINNING_LEVEL";
+ public static final String BASIC = "basic";
+ public static final String EXTENDED = "extended";
+
/**
* Get application start time for check resources modification time.
*
16 years, 3 months