JBoss Rich Faces SVN: r7338 - trunk/ui/inplaceInput/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-03-27 16:46:18 -0400 (Thu, 27 Mar 2008)
New Revision: 7338
Modified:
trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx
Log:
http://jira.jboss.com/jira/browse/RF-2791
Modified: trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx
===================================================================
--- trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2008-03-27 20:45:58 UTC (rev 7337)
+++ trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2008-03-27 20:46:18 UTC (rev 7338)
@@ -25,7 +25,10 @@
<f:clientid var="clientId" />
<jsp:scriptlet>
<![CDATA[
- Object value = component.getValue();
+ Object value = component.getSubmittedValue();
+ if (value == null) {
+ value = component.getValue();
+ }
Object fieldValue = value;
value = getConvertedStringValue(context, component,value);
if (value == null || value.equals("")) {
16 years, 9 months
JBoss Rich Faces SVN: r7337 - in trunk/ui/inplaceSelect/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-03-27 16:45:58 -0400 (Thu, 27 Mar 2008)
New Revision: 7337
Modified:
trunk/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
Log:
http://jira.jboss.com/jira/browse/RF-2791
http://jira.jboss.com/jira/browse/RF-2810
Modified: trunk/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java
===================================================================
--- trunk/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java 2008-03-27 20:08:31 UTC (rev 7336)
+++ trunk/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java 2008-03-27 20:45:58 UTC (rev 7337)
@@ -14,7 +14,6 @@
import javax.faces.context.ResponseWriter;
import javax.faces.model.SelectItem;
-import org.ajax4jsf.javascript.ScriptUtils;
import org.ajax4jsf.util.InputUtils;
import org.ajax4jsf.util.SelectUtils;
import org.apache.commons.logging.Log;
@@ -117,9 +116,12 @@
return attributes.toString();
}
- public String getSelectedItemLabel(FacesContext context, UIComponent component) {
+ public String getSelectedItemLabel(FacesContext context, UIInplaceSelect component) {
String defaultLabel = null;
- Object value = component.getAttributes().get("value");
+ Object value = component.getSubmittedValue();
+ if (value == null) {
+ value = component.getAttributes().get("value");
+ }
if (value == null) {
return createDefaultLabel(component);
}
Modified: trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
===================================================================
--- trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-03-27 20:08:31 UTC (rev 7336)
+++ trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-03-27 20:45:58 UTC (rev 7337)
@@ -145,7 +145,10 @@
if ((!this.comboList.isList || this.clickOnBar)) {
this.saveValue(this.currentItemValue, this.tempValueKeeper.value);
}
- this.comboList.hide();
+
+ if (this.attributes.showControls) {
+ this.comboList.hide();
+ }
},
applyTmpValue : function() {
Modified: trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
===================================================================
--- trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-03-27 20:08:31 UTC (rev 7336)
+++ trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-03-27 20:45:58 UTC (rev 7337)
@@ -27,8 +27,12 @@
<f:resource var="cancelIcon" name="org.richfaces.renderkit.html.images.CancelControlIcon"/>
<jsp:scriptlet>
<![CDATA[
- Object value = component.getAttributes().get("value");
- Object fieldValue = component.getAttributes().get("value");
+
+ Object value = component.getSubmittedValue();
+ if(value == null) {
+ Object value = component.getAttributes().get("value");
+ Object fieldValue = value;
+ }
String fieldLabel = getSelectedItemLabel(context, component);
value = getConvertedStringValue(context, component,value);
16 years, 9 months
JBoss Rich Faces SVN: r7336 - Reports/3.2.0 and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-03-27 16:08:31 -0400 (Thu, 27 Mar 2008)
New Revision: 7336
Added:
trunk/test-applications/qa/Test Reports/3.2.0/DailyReport320CR527032008mvitenkov.xls
Modified:
trunk/test-applications/qa/Test Reports/3.2.0/DailyReport320CR525032008mvitenkov.xls
Log:
Modified: trunk/test-applications/qa/Test Reports/3.2.0/DailyReport320CR525032008mvitenkov.xls
===================================================================
(Binary files differ)
Added: trunk/test-applications/qa/Test Reports/3.2.0/DailyReport320CR527032008mvitenkov.xls
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/qa/Test Reports/3.2.0/DailyReport320CR527032008mvitenkov.xls
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 9 months
JBoss Rich Faces SVN: r7335 - in trunk/samples/richfaces-demo/src/main/webapp/richfaces: include/examples and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-03-27 15:45:41 -0400 (Thu, 27 Mar 2008)
New Revision: 7335
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wizard.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/mediaOutput/examples/jpegSample.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/mediaOutput/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/outputPanel/examples/noneLayout.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/outputPanel/usage.xhtml
Log:
Demo site: Ajax output demos layout correction completed
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wizard.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wizard.xhtml 2008-03-27 19:33:32 UTC (rev 7334)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wizard.xhtml 2008-03-27 19:45:41 UTC (rev 7335)
@@ -29,16 +29,8 @@
}
</style>
-
- <rich:separator height="1" style="padding:10px"/>
+ <br/>
<h:panelGrid width="100%" columns="2" columnClasses="col1,col2">
- <f:verbatim>
- The demo shows the example of three-steps wizard created
- using a4j:include. The navigation rules defined in the
- faces-config.xml are used to navigate between the steps
- of the wizard.
-
- </f:verbatim>
<a4j:keepAlive beanName="profile" />
<rich:panel styleClass="wizard">
<f:facet name="header">
@@ -50,6 +42,6 @@
</rich:panel>
</h:panelGrid>
- <rich:separator height="1" style="padding:10px"/>
+ <br/>
</ui:composition>
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/usage.xhtml 2008-03-27 19:33:32 UTC (rev 7334)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/usage.xhtml 2008-03-27 19:45:41 UTC (rev 7335)
@@ -18,8 +18,16 @@
a full context-relative path of the resource in order to use as from-view and to-view in the
JSF navigation cases.
</p>
-
- <div class="sample-container">
+
+ <fieldset class="demo_fieldset">
+ <legend class="demo_legend">Include example</legend>
+ <div class="sample-container">
+ <p>
+ The demo shows the example of three-steps wizard created
+ using a4j:include. The navigation rules defined in the
+ faces-config.xml are used to navigate between the steps
+ of the wizard.
+ </p>
<ui:include src="/richfaces/include/examples/wizard.xhtml"/>
<ui:include src="/templates/include/sourceview.xhtml">
<ui:param name="sourcepath" value="/richfaces/include/examples/wizard.xhtml"/>
@@ -42,8 +50,8 @@
<ui:param name="openlabel" value="View faces-config.xml Navigation Rules" />
<ui:param name="sourcetype" value="xml" />
</ui:include>
- </div>
-
+ </div>
+ </fieldset>
<p>
The Ajax command component (button, link, jsFunction, etc) should be located inside the
a4j:include in order to have a partial navigation. When the navigation is
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/mediaOutput/examples/jpegSample.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/mediaOutput/examples/jpegSample.xhtml 2008-03-27 19:33:32 UTC (rev 7334)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/mediaOutput/examples/jpegSample.xhtml 2008-03-27 19:45:41 UTC (rev 7335)
@@ -6,9 +6,9 @@
xmlns:rich="http://richfaces.org/rich">
- <rich:separator height="1" style="padding:10px"/>
+ <br/>
<a4j:mediaOutput element="img" cacheable="false" session="true"
createContent="#{mediaBean.paint}" value="#{mediaData}" mimeType="image/jpeg" />
- <rich:separator height="1" style="padding:10px"/>
+ <br/><br/>
</ui:composition>
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/mediaOutput/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/mediaOutput/usage.xhtml 2008-03-27 19:33:32 UTC (rev 7334)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/mediaOutput/usage.xhtml 2008-03-27 19:45:41 UTC (rev 7335)
@@ -30,28 +30,29 @@
is set to false, the request will be cached. If it is set to true, it will be cached
and the serialized value of 'value' attribute plays the role of a cache key.
</p>
- <div class="sample-container" >
+ <fieldset class="demo_fieldset">
+ <legend class="demo_legend">MediaOutput example</legend>
+ <div class="sample-container">
- <ui:include src="/richfaces/mediaOutput/examples/jpegSample.xhtml"/>
- <ui:include src="/templates/include/sourceview.xhtml">
- <ui:param name="sourcepath" value="/richfaces/mediaOutput/examples/jpegSample.xhtml"/>
- <ui:param name="openlabel" value="View Page Source" />
- </ui:include>
+ <ui:include src="/richfaces/mediaOutput/examples/jpegSample.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath" value="/richfaces/mediaOutput/examples/jpegSample.xhtml"/>
+ <ui:param name="openlabel" value="View Page Source" />
+ </ui:include>
- <ui:include src="/templates/include/sourceview.xhtml">
- <ui:param name="sourcepath" value="/WEB-INF/src/org/richfaces/demo/media/MediaBean.java"/>
- <ui:param name="openlabel" value="View MediaBean.java Source" />
- <ui:param name="sourcetype" value="java" />
- </ui:include>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath" value="/WEB-INF/src/org/richfaces/demo/media/MediaBean.java"/>
+ <ui:param name="openlabel" value="View MediaBean.java Source" />
+ <ui:param name="sourcetype" value="java" />
+ </ui:include>
- <ui:include src="/templates/include/sourceview.xhtml">
- <ui:param name="sourcepath" value="/WEB-INF/src/org/richfaces/demo/media/MediaData.java"/>
- <ui:param name="openlabel" value="View MediaData.java Source" />
- <ui:param name="sourcetype" value="java" />
- </ui:include>
-
-
- </div>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath" value="/WEB-INF/src/org/richfaces/demo/media/MediaData.java"/>
+ <ui:param name="openlabel" value="View MediaData.java Source" />
+ <ui:param name="sourcetype" value="java" />
+ </ui:include>
+ </div>
+ </fieldset>
</ui:define>
</ui:composition>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/outputPanel/examples/noneLayout.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/outputPanel/examples/noneLayout.xhtml 2008-03-27 19:33:32 UTC (rev 7334)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/outputPanel/examples/noneLayout.xhtml 2008-03-27 19:45:41 UTC (rev 7335)
@@ -12,7 +12,7 @@
}
</style>
- <rich:separator height="1" style="10px 0"/>
+ <br/>
<h:panelGrid columns="2" width="100%" columnClasses="col">
@@ -34,7 +34,7 @@
<a4j:outputPanel layout="block">
<h:form>
- <h:outputText value="Enter Text:"/>
+ <h:outputText value="Enter Text: "/>
<h:inputText id="text1" label="text1" value="#{rsBean.text1}">
<f:validateLength maximum="10"/>
<a4j:support event="onkeyup" reRender="out1" />
@@ -56,7 +56,7 @@
<a4j:outputPanel layout="block">
<h:form>
- <h:outputText value="Enter Text:"/>
+ <h:outputText value="Enter Text: "/>
<h:inputText id="text2" label="text1" value="#{rsBean.text2}">
<f:validateLength maximum="10"/>
<a4j:support event="onkeyup" reRender="out2" />
@@ -69,7 +69,7 @@
</a4j:outputPanel>
</a4j:outputPanel>
</h:panelGrid>
-
- <rich:separator height="1" style="10px 0"/>
-
+
+ <br/>
+
</ui:composition>
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/outputPanel/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/outputPanel/usage.xhtml 2008-03-27 19:33:32 UTC (rev 7334)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/outputPanel/usage.xhtml 2008-03-27 19:45:41 UTC (rev 7335)
@@ -33,14 +33,15 @@
rendered and assigns the id of the child component if the component is not rendered.
Otherwise, it does not become rendered at all.<br/>
The following example shows the cases of usage described above:</p>
- <div class="sample-container" >
-
- <ui:include src="/richfaces/outputPanel/examples/noneLayout.xhtml"/>
- <ui:include src="/templates/include/sourceview.xhtml">
- <ui:param name="sourcepath" value="/richfaces/outputPanel/examples/noneLayout.xhtml"/>
- </ui:include>
-
- </div>
+ <fieldset class="demo_fieldset">
+ <legend class="demo_legend">OutputPanel example</legend>
+ <div class="sample-container">
+ <ui:include src="/richfaces/outputPanel/examples/noneLayout.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath" value="/richfaces/outputPanel/examples/noneLayout.xhtml"/>
+ </ui:include>
+ </div>
+ </fieldset>
</ui:define>
</ui:composition>
16 years, 9 months
JBoss Rich Faces SVN: r7334 - trunk/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: vsukhov
Date: 2008-03-27 15:33:32 -0400 (Thu, 27 Mar 2008)
New Revision: 7334
Added:
trunk/docs/userguide/en/src/main/resources/images/ico_important.gif
trunk/docs/userguide/en/src/main/resources/images/ico_note.gif
trunk/docs/userguide/en/src/main/resources/images/ico_tip.gif
Log:
http://jira.jboss.com/jira/browse/RF-2561 Reverted some images
Added: trunk/docs/userguide/en/src/main/resources/images/ico_important.gif
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/ico_important.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/docs/userguide/en/src/main/resources/images/ico_note.gif
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/ico_note.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/docs/userguide/en/src/main/resources/images/ico_tip.gif
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/ico_tip.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 9 months
JBoss Rich Faces SVN: r7333 - trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-03-27 15:30:16 -0400 (Thu, 27 Mar 2008)
New Revision: 7333
Modified:
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
Log:
add support for component control, fix js api http://jira.jboss.com/jira/browse/RF-2798,
Modified: trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
===================================================================
--- trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-03-27 19:21:31 UTC (rev 7332)
+++ trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-03-27 19:30:16 UTC (rev 7333)
@@ -5,11 +5,20 @@
this.comboList = listObj;
$super(clientId, temValueKeepId, valueKeepId, tabberId, attributes, events, classes, barParams);
this.clickOnBar = false;
-
+ this.inplaceSelect = $(clientId);
+ this.inplaceSelect.component = this;
+
this.currentItemValue = this.value;
this.button.style.top = Richfaces.getBorderWidth(this.tempValueKeeper, "t") + "px";
+ this["rich:destructor"] = "destroy";
+
},
+ destroy: function() {
+ this.inplaceSelect.component = null;
+ },
+
+
initHandlers : function($super) {
$super();
this.tempValueKeeper.observe("click", function(e){this.tempKeeperClickHandler(e);}.bindAsEventListener(this));
@@ -72,7 +81,7 @@
}
if (!this.attributes.showControls) {
- this.saveValue();
+ this.save();
} else {
this.applyTmpValue();
}
@@ -112,7 +121,7 @@
tmpValueKeyDownHandlerIn : function(event) {
switch (event.keyCode) {
case Event.KEY_RETURN :
- this.saveValue();
+ this.save();
this.comboList.hideWithDelay();
Event.stop(event);
break;
@@ -131,10 +140,10 @@
}
},
- saveValue : function($super) {
+ save : function($super) {
this.applyTmpValue();
- if ((!this.comboList.isList || this.clickOnBar) && this.tempValueKeeper.value) {
- this.save(this.currentItemValue, this.tempValueKeeper.value);
+ if ((!this.comboList.isList || this.clickOnBar)) {
+ this.saveValue(this.currentItemValue, this.tempValueKeeper.value);
}
this.comboList.hide();
},
@@ -171,12 +180,22 @@
cancel : function($super, e) {
var item = this.getLabelItem(this.valueKeeper.value);
+
+ if (this.comboList.selectedItem) {
+ this.comboList.doNormalItem(this.comboList.selectedItem);
+ }
+// this.comboList.doSelectItem(item);
if (item) {
this.comboList.resetSelection();
this.comboList.doSelectItem(item);
$super(e, item.innerHTML);
- this.comboList.hide();
+ } else {
+ $super(e, "");
+ this.comboList.resetSelection();
}
+
+ this.comboList.hide();
}
+});
-});
+
16 years, 9 months
JBoss Rich Faces SVN: r7332 - trunk/docs/faq/en/src/main/docbook/module.
by richfaces-svn-commits@lists.jboss.org
Author: vsukhov
Date: 2008-03-27 15:21:31 -0400 (Thu, 27 Mar 2008)
New Revision: 7332
Modified:
trunk/docs/faq/en/src/main/docbook/module/RFCfaq.xml
Log:
http://jira.jboss.com/jira/browse/RF-2720 I've updated info about problem.
Modified: trunk/docs/faq/en/src/main/docbook/module/RFCfaq.xml
===================================================================
--- trunk/docs/faq/en/src/main/docbook/module/RFCfaq.xml 2008-03-27 19:17:29 UTC (rev 7331)
+++ trunk/docs/faq/en/src/main/docbook/module/RFCfaq.xml 2008-03-27 19:21:31 UTC (rev 7332)
@@ -2265,12 +2265,23 @@
</section>
<section>
<?dbhtml filename="WhydoesJSScriptsconflict.html"?>
- <title>Why does J scripts conflict?</title>
+ <title>Why does Java scripts conflict?</title>
<para>Richfaces 3.1.3 uses 1.6.0 version of prototype.js script instead of 1.5.1
that's been used for earlier versions. There are 2 prototype versions included
(the first included implicitly as a dependency of toggle panel components and
the second one included explicitly as a link). Versions conflict is the cause of the problem.</para>
- <para>The solution of this problem is in upgrading jQuery.js to 1.2.3 version and prototype.js to 1.6.0.2 version.
+ <para>RichFaces 3.1.3 is bundled with the same ones as Prototype 1.6.0, Scriptaculous 1.8.0</para>
+ <para>
+ <emphasis role="bold">Example in web.xml::</emphasis>
</para>
+ <programlisting role="XML"><![CDATA[...
+<context-param>
+ <param-name>org.richfaces.ExcludeScripts</param-name>
+ <param-value>Prototype,Scriptaculous</param-value>
+</context-param>
+...]]></programlisting>
+ <para>RichFaces components use Prototype very hard. In particular, some patches has been removed that are already included into 1.6.0.
+ Adding feature with exclusion makes it possible to use Prototype with version less than 1.6.0. This will break some of the components.</para>
+
</section>
</chapter>
16 years, 9 months
JBoss Rich Faces SVN: r7331 - in trunk/docs/userguide/en/src/main: resources/images and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vsukhov
Date: 2008-03-27 15:17:29 -0400 (Thu, 27 Mar 2008)
New Revision: 7331
Added:
trunk/docs/userguide/en/src/main/resources/images/toolBar4.PNG
Modified:
trunk/docs/userguide/en/src/main/docbook/included/toolBar.xml
Log:
http://jira.jboss.com/jira/browse/RF-2768 I've added information about possibility of custom separator definition for toolBar
Modified: trunk/docs/userguide/en/src/main/docbook/included/toolBar.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/toolBar.xml 2008-03-27 19:11:28 UTC (rev 7330)
+++ trunk/docs/userguide/en/src/main/docbook/included/toolBar.xml 2008-03-27 19:17:29 UTC (rev 7331)
@@ -100,8 +100,44 @@
</emphasis> and <emphasis>
<property>"height"</property>
</emphasis> attributes are placed above all.</para>
-
+ <para>A custom separator can be added with the help of <emphasis>
+ <property>"itemSeparator"</property>
+ </emphasis> facet.</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<f:facet name="itemSeparator">
+ <rich:separator width="2" height="14" />
+</f:facet>
+...
+]]></programlisting>
+ <para>Custom separator can be also specified by URL to the separator image in the attribute <emphasis>
+ <property>"itemSeparator"</property>
+ </emphasis> of the <emphasis role="bold"><property><rich:toolBar></property></emphasis>. </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:toolBar id="toolBar" width="#{bean.width}" height="#{bean.height}" itemSeparator="/images/separator_img.jpg"/>
+...
+]]></programlisting>
+ <para>This is a result:</para>
+ <figure>
+ <title><emphasis role="bold">
+ <property><rich:toolBar></property>
+ </emphasis> with <emphasis>
+ <property>"itemSeparator"</property>
+ </emphasis> attribute.</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/toolBar4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
</section>
+ <para>As it could be seen in the picture above, the image for itemSeparator was changed.</para>
<section>
<title>Look-and-Feel Customization</title>
Added: trunk/docs/userguide/en/src/main/resources/images/toolBar4.PNG
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/toolBar4.PNG
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 9 months
JBoss Rich Faces SVN: r7330 - trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-03-27 15:11:28 -0400 (Thu, 27 Mar 2008)
New Revision: 7330
Modified:
trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
Log:
Modified: trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
===================================================================
--- trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-03-27 19:02:10 UTC (rev 7329)
+++ trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-03-27 19:11:28 UTC (rev 7330)
@@ -136,7 +136,7 @@
}
if (!this.attributes.showControls) {
- this.saveValue();
+ this.save();
}
},
@@ -150,7 +150,7 @@
this.tempValueKeeper.blur();
break;
case Event.KEY_TAB :
- this.saveValue();
+ this.save();
this.byTab = true;
break;
}
@@ -161,7 +161,7 @@
},*/
okHandler : function(e) {
- this.saveValue();
+ this.save();
Event.stop(e);
},
@@ -266,7 +266,6 @@
if (this.tempValueKeeper.value == "") {
this.setDefaultText();
}
-
switch (this.prevState) {
case Richfaces.InplaceInput.STATES[0] :
this.startViewState();
@@ -277,15 +276,13 @@
}
},
- saveValue : function() {
+ save : function() {
var userValue = this.tempValueKeeper.value;
- if (userValue) {
- var currentText = userValue;
- this.save(userValue, currentText);
- }
+ var currentText = userValue;
+ this.saveValue(userValue, currentText);
},
- save : function(userValue, currentText) {
+ saveValue : function(userValue, currentText) {
var value = this.valueKeeper.value;
if (this.events.onviewactivation) {
this.inplaceInput.fire("rich:onviewactivation", {oldValue : this.valueKeeper.value, value : this.tempValueKeeper.value});
@@ -296,7 +293,11 @@
this.valueKeeper.value = "";
//this.startViewState();
} else {
- this.currentText = currentText;
+ if (currentText == "") {
+ this.setDefaultText();
+ } else {
+ this.currentText = currentText;
+ }
this.valueKeeper.value = userValue;
}
if (userValue != this.value) {
16 years, 9 months
JBoss Rich Faces SVN: r7329 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-03-27 15:02:10 -0400 (Thu, 27 Mar 2008)
New Revision: 7329
Modified:
trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml
Log:
http://jira.jboss.com/jira/browse/RF-1207 - Details of Usage review: restrictions, attributes for uploaded files.
Modified: trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2008-03-27 19:01:58 UTC (rev 7328)
+++ trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2008-03-27 19:02:10 UTC (rev 7329)
@@ -8,39 +8,32 @@
</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.component.FileUpload</entry>
</row>
<row>
<entry>component-class</entry>
-
<entry>org.richfaces.component.html.HtmlFileUpload</entry>
</row>
<row>
<entry>component-family</entry>
-
<entry>org.richfaces.component.FileUpload</entry>
</row>
<row>
<entry>renderer-type</entry>
-
<entry>org.richfaces.renderkit.html.FileUploadRenderer</entry>
</row>
<row>
<entry>tag-class</entry>
-
<entry>org.richfaces.taglib.FileUploadTag</entry>
</row>
</tbody>
@@ -54,7 +47,7 @@
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[...
-<rich:fileUpload uploadData="#{bean.data}"/>
+<rich:fileUpload />
...]]></programlisting>
</section>
<section>
@@ -70,60 +63,166 @@
</section>
<section>
<title>Details of Usage</title>
+ <para>The <emphasis role="bold"><property><rich:fileUpload></property></emphasis> component consists of two parts:<itemizedlist>
+ <listitem>
+ <para>
+ <property>List of files</property> which contains the list of currently chosen files to upload with possibility to manage every file
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <property>Component controls</property> - the bar with controls for managing the whole component
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
- <!--maintenance of component orderingList-->
- <para>The <emphasis role="bold">
- <property><rich:fileUpload></property>
- </emphasis> component consists of two parts:<itemizedlist>
- <listitem><property>List of files</property> which contains the list of currently chosen files with possibility to manage every file.
- </listitem>
+ <para>
+ There are two places where uploaded files are stored:
+ </para>
+ <itemizedlist>
<listitem>
- <property>Component controls</property>- the bar with controls for managing the whole component.
-
+ <para>
+ In the temporary folder (depends on OS) if the value of the <property>createTempFile</property> parameter in <property>Ajax4jsf Filter</property> section
+ is "true" (by Default)
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<init-param>
+ <param-name>createTempFiles</param-name>
+ <param-value>true</param-value>
+</init-param>
+...]]></programlisting>
</listitem>
+ <listitem>
+ <para>
+ In the RAM if the value of the <property>createTempFile</property> parameter in <property>Ajax4jsf Filter</property> section
+ is "false". This is a better way for storing small-sized files.
+ </para>
+ </listitem>
</itemizedlist>
+
+ <para>
+ The <emphasis><property>"uploadData"</property></emphasis> attribute
+ defines the collection of files uploaded. See the example below.
</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:fileUpload uploadData="#{bean.data}"/>
+...]]></programlisting>
-
- <!--para><emphasis>
- <property> "uploadData"</property>
- </emphasis> attribute shows the collection of files uploaded. With the help of this attribute you can define the place to upload data.</para-->
+ <para>The <emphasis><property>"fileUploadedListener"</property></emphasis> is
+ called at server side after every file uploaded and used for the saving files from temporary folder or RAM.
+ </para>
<para>
- The <emphasis>
- <property> "disabled"</property>
- </emphasis>
- attribute is used to disable all elements of the component. All the controls disables too. </para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:fileUpload uploadData="#{bean.data}" fileUploadListener="#{bean.listener}"/>
+ ...]]></programlisting>
+
+
+ <para>The <emphasis>
+ <property> "immediateUpload"</property></emphasis> attribute allows files to be uploaded immediately after they have been added into list.
+ If you set this attribute to "true" files immediately upload after they have been added into the list, all next files automatically uploads one by one.
+ If you cancel uploading – next files aren't start uploading till you press the general upload button or clear the list.
+ </para>
<para>
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[...
-<rich:fileUpload disabled="true" uploadData="#{bean.data}" />
+<rich:fileUpload uploadData="#{bean.data}" addControlLabel="myLabel" autoclear="true" maxFilesQuantity="2" fileUploadListener="#{bean.listener}"
+ acceptedTypes="html" immediateUpload="true"/>
+ ...]]></programlisting>
+
+
+
+<!--RESTRICTIONS-->
+
+<para>
+ The <emphasis role="bold"><property><rich:fileUpload></property></emphasis> component provides following restrictions:
+</para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ By <property> file types</property>, use <emphasis><property> "acceptedTypes"</property></emphasis> attribute
+ to define file types accepted by component.
+ In the example below only files with "html" and "jpg" extensions are accepted to upload.
+ </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+<programlisting role="XML"><![CDATA[...
+<rich:fileUpload acceptedTypes="html, jpg"/>
...]]></programlisting>
- <para>This is a result:</para>
- <figure>
- <title><emphasis role="bold">
- <property><rich:fileUpload></property>
- </emphasis>with <emphasis>
- <property> "disabled"</property>
- </emphasis> attribute</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/fileUpload2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The <emphasis>
- <property> "acceptedTypes"</property></emphasis> attribute is used to define file types which are accepted to upload.
+ </listitem>
+ <listitem>
+ <para>
+ By <property> file size</property>, use the <property>maxRequestSize</property> parameter(value in bytes) inside <property>Ajax4jsf Filter</property> section
+ in <property>web.xml</property>:
</para>
+ <programlisting role="XML"><![CDATA[...
+<init-param>
+ <param-name>maxRequestSize</param-name>
+ <param-value>1000000</param-value>
+</init-param>
+...]]></programlisting>
+ </listitem>
+ <listitem>
<para>
+ By <property>max files quantity</property>, use the <emphasis><property> "maxFilesQuantity"</property></emphasis> attribute
+ to define max number of files allowed to be uploaded. After a number of files in the list equals to the value of this attribute "Add" button is disabled.
+ As it could be seen in the example below, only 2 files are accepted for uploading.
+ </para>
+ <para>
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[...
-<rich:fileUpload uploadData="#{bean.data}" acceptedTypes="html"/>
+<rich:fileUpload maxFilesQuantity="2"/>
...]]></programlisting>
- <para>As it could be seen in the example above, only files with "html" extension are accepted to upload.</para>
+ <para>
+ This is the result:
+ </para>
+ <figure>
+ <title><emphasis role="bold"><property><rich:fileUpload></property></emphasis>with
+ <emphasis><property> "maxFilesQuantity"</property></emphasis> attribute</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/fileUpload5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ </itemizedlist>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<para>The <emphasis>
<property> "autoclear"</property></emphasis> attribute is used to remove automatically files from the list after upload completed.</para>
@@ -136,56 +235,9 @@
acceptedTypes="html"/>
...]]></programlisting>
<para>As it could be seen in the example above, files are removed from the list after upload completed.</para>
- <para>The <emphasis>
- <property> "maxFilesQuantity"</property></emphasis> defines max number of files allowed for upload.
- After a number of files in the list equals to this attribute – add button is disabled.
- The add button is not available until all list items are uploaded.
- </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
-<rich:fileUpload uploadData="#{bean.data}" addControlLabel="myLabel" autoclear="true" maxFilesQuantity="2"
- acceptedTypes="html"/>
- ...]]></programlisting>
- <para>This is a result:</para>
- <figure>
- <title><emphasis role="bold">
- <property><rich:fileUpload></property>
- </emphasis>with <emphasis>
- <property> "maxFilesQuantity"</property>
- </emphasis> attribute</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/fileUpload5.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>As it could be seen in the picture above, only 2 files allows for upload.</para>
- <para>The <emphasis>
- <property> "fileUploadedListener"</property></emphasis> is
- called at server side after every file uploaded and used for the file saving by end developer.
- </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
-<rich:fileUpload uploadData="#{bean.data}" addControlLabel="myLabel" autoclear="true" maxFilesQuantity="2" fileUploadListener="#{bean.listener}"
- acceptedTypes="html"/>
- ...]]></programlisting>
- <para>The <emphasis>
- <property> "immediateUpload"</property></emphasis> attribute allows files to be uploaded immediately after they have been added into list.
- If you set this attribute to true files immediately uploads after they have been added into the list, all next files automatically uploads one by one.
- If you cancel uploading – next files aren't start uploading till you press the general upload button or clear the list.
-
- </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
-<rich:fileUpload uploadData="#{bean.data}" addControlLabel="myLabel" autoclear="true" maxFilesQuantity="2" fileUploadListener="#{bean.listener}"
- acceptedTypes="html" immediateUpload="true"/>
- ...]]></programlisting>
+
+
+
<!--para>In order to encode form around <emphasis role="bold">
<property><rich:fileUpload></property>
</emphasis> component you could confine this area by <emphasis role="bold">
@@ -289,6 +341,30 @@
RICH_FILE_UPLOAD_ENTRY_CANCEL_LABEL</property> there.</para>
+ <para>
+ In order to disable the whole component you could use the <emphasis><property> "disabled"</property></emphasis> attribute.
+ See the following example.
+ </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:fileUpload disabled="true"/>
+...]]></programlisting>
+ <para>This is the result:</para>
+ <figure>
+ <title><emphasis role="bold">
+ <property><rich:fileUpload></property>
+ </emphasis>with <emphasis>
+ <property> "disabled"</property>
+ </emphasis> attribute</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/fileUpload2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
<!-- ordering control set>
<table>
16 years, 9 months