JBoss Rich Faces SVN: r6227 - management/design/standardComponent.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-02-20 20:11:00 -0500 (Wed, 20 Feb 2008)
New Revision: 6227
Modified:
management/design/standardComponent/default_example.html
Log:
default example revisited
Modified: management/design/standardComponent/default_example.html
===================================================================
--- management/design/standardComponent/default_example.html 2008-02-20 19:06:09 UTC (rev 6226)
+++ management/design/standardComponent/default_example.html 2008-02-21 01:11:00 UTC (rev 6227)
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
@@ -8,38 +8,57 @@
<body>
<style>
- input, select, textarea{
+ button, input[type="reset"], input[type="submit"], input[type="button"] {
+ /*background-color: initial;*/ /* Webkit */
+ }
+
+ input, select, textarea, button, keygen, isindex {
border-width: 1px;
border-color : #BED6F8 /*panelBorderColor*/;
font-size: 11px /*generalSizeFont*/;
font-family: verdana /*generalFamilyFont*/;
color : #000000 /*controlTextColor*/;
}
- fieldset{
+ fieldset {
border-width: 1px;
border-color : #BED6F8 /*panelBorderColor*/;
border-style : solid;
padding:10px;
}
- legend{
+ legend {
font-size: 11px /*generalSizeFont*/;
font-family: verdana /*generalFamilyFont*/;
color : #000000 /*controlTextColor*/;
}
+
</style>
<fieldset>
<legend>Legend</legend>
+<button>Test</button>
<input type="Button" value="Test">
<input type="Checkbox">
<input type="File">
<input type="Radio">
<input type="Text" value="Test">
-<select>
+<select size="1">
<option>Test</option>
</select>
+
+<select multiple>
+ <option>Test</option>
+ <option>Test1</option>
+ <option>Test2</option>
+ <option>Test3</option>
+</select>
+
+
<br><br>
<textarea>text</textarea>
+<keygen />
+<br><br>
+<isindex />
+
</fieldset>
</body>
</html>
16 years, 11 months
JBoss Rich Faces SVN: r6226 - in trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam: ui/renderkit and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2008-02-20 14:06:09 -0500 (Wed, 20 Feb 2008)
New Revision: 6226
Modified:
trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/ui/component/UIFileUpload.java
trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/ui/renderkit/FileUploadRendererBase.java
trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/web/MultipartFilter.java
Log:
Review of server-side code
Modified: trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/ui/component/UIFileUpload.java
===================================================================
--- trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/ui/component/UIFileUpload.java 2008-02-20 19:03:56 UTC (rev 6225)
+++ trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/ui/component/UIFileUpload.java 2008-02-20 19:06:09 UTC (rev 6226)
@@ -5,7 +5,6 @@
import javax.el.MethodExpression;
import javax.faces.component.UIInput;
import javax.faces.context.FacesContext;
-import javax.faces.el.MethodBinding;
import javax.faces.event.FacesEvent;
import org.richfaces.event.FileUploadListener;
@@ -141,7 +140,11 @@
public void broadcast(FacesEvent e) {
if (e instanceof UploadEvent) {
-
+ //FIXME: Maksim -> Aleksej
+ //If event needs to be broadcast to ALL of subscribed listeners.
+ //Need to call super anyway
+ //BTW, why doesn't UploadEvent accept any listeners?
+
FacesContext facesContext = FacesContext.getCurrentInstance();
MethodExpression binding = getFileUploadListener();
if (binding != null) {
Modified: trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/ui/renderkit/FileUploadRendererBase.java
===================================================================
--- trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/ui/renderkit/FileUploadRendererBase.java 2008-02-20 19:03:56 UTC (rev 6225)
+++ trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/ui/renderkit/FileUploadRendererBase.java 2008-02-20 19:06:09 UTC (rev 6226)
@@ -9,6 +9,7 @@
import javax.el.ValueExpression;
import javax.faces.FactoryFinder;
import javax.faces.component.UIComponent;
+import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
import javax.faces.render.RenderKit;
@@ -72,7 +73,17 @@
if ("progress".equals(request.getParameter("action"))) {
AjaxContext ajaxContext = AjaxContextImpl.getCurrentInstance(context);
String uid = request.getParameter("uid");
- HttpSession session = (HttpSession)context.getExternalContext().getSession(false);
+ /*
+ *
+ * FIXME: Maksim --> Andrei
+ * Why not use standard JSF constructs?
+ *
+ ExternalContext externalContext = context.getExternalContext();
+ Map <String, Object> sessionMap = externalContext.getSessionMap();
+
+ */
+
+ HttpSession session = (HttpSession)context.getExternalContext().getSession(false);
Map<String, MultipartRequest> sessions = (Map<String, MultipartRequest>) session
.getAttribute("_richfaces_upload_sessions");
@@ -83,7 +94,7 @@
}
}
- }else {
+ } else {
new AjaxEvent(component).queue();
}
if (!(request instanceof MultipartRequest)) {
@@ -113,6 +124,8 @@
if (clazz.isAssignableFrom(Map.class)) {
Map map = (Map) data.getValue(context.getELContext());
map.put(fileUpload.getLocalFileName(), file);
+ //FIXME: Maksim --> Andrei
+ // What does Map.empty mean?
map.isEmpty();
}
}
@@ -133,6 +146,8 @@
*
* @see org.ajax4jsf.renderkit.RendererBase#getComponentClass()
*/
+ //FIXME: Maksim --> Andrei
+ //Better use UIFileUpload here. Otherwise you can get NPE here
@Override
protected Class<? extends UIComponent> getComponentClass() {
// TODO Auto-generated method stub
@@ -143,7 +158,13 @@
String action, Object oncomplete) throws IOException {
JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(
component, context);
+
+ //FIXME: Maksim --> Andrei
+ //Why multiple map.get? In eclipse, use Ctrl+2 then L to introduce local variable
+ //
+
Map options = AjaxRendererUtils.buildEventOptions(context, component);
+
((Map) options.get("parameters")).put("action", action);
((Map) options.get("parameters")).put("uid", new JSReference("uid"));
if (oncomplete != null) {
@@ -164,6 +185,7 @@
}
// TODO : complete this one
+
public String getFileSizeScript(FacesContext context, UIComponent component)
throws IOException {
JSFunctionDefinition oncomplete = new JSFunctionDefinition();
@@ -178,6 +200,9 @@
}
+ //FIXME: Maksim --> Andrei
+ //Method not used anywhere
+ //WHY?
public Object getLabelMarkup(FacesContext context, UIComponent component)
throws IOException {
CountingOutputWriter customWriter = new CountingOutputWriter();
@@ -282,11 +307,19 @@
if (null == progressBar) {
progressBar = createProgressBar(context, component);
}
+
+ //FIXME: Maksim --> Andrei
+ //What happens if we have two fileuploads on the page?
+ //Two progress bars with identical value?
String exprStr = "#{" + _percentBeanName + "}";
ValueExpression ex = context.getApplication().getExpressionFactory()
.createValueExpression(context.getELContext(), exprStr,
Integer.class);
progressBar.setValueExpression("value", ex);
+
+
+ //FIXME: Maksim --> Andrei
+ //Why set id for user-defined component
progressBar.setId("progressBar");
progressBar.getAttributes().put("minValue", -1);
progressBar.getAttributes().put("enabled", false);
@@ -307,6 +340,8 @@
private UIComponent getProgressLabel(UIComponent component) {
UIComponent label = component.getFacet("progressLabel");
if (label != null) {
+ //FIXME: Maksim --> Andrei
+ //Why set id for user-defined component
label.setId("progressLabel");
}
return label;
Modified: trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/web/MultipartFilter.java
===================================================================
--- trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/web/MultipartFilter.java 2008-02-20 19:03:56 UTC (rev 6225)
+++ trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/web/MultipartFilter.java 2008-02-20 19:06:09 UTC (rev 6226)
@@ -89,6 +89,10 @@
"_richfaces_upload_sessions", sessionsMap);
}
}
+
+ //FIXME: Maksim --> Andrei
+ //Can we make _percentBeanName uid-dependent?
+
session.setAttribute(FileUploadRendererBase._percentBeanName, 0);
sessionsMap.put(uid, multipartRequest);
16 years, 11 months
JBoss Rich Faces SVN: r6225 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: vsukhov
Date: 2008-02-20 14:03:56 -0500 (Wed, 20 Feb 2008)
New Revision: 6225
Modified:
trunk/docs/userguide/en/src/main/docbook/included/pickList.xml
Log:
http://jira.jboss.com/jira/browse/RF-2174 Corrected some data in the Details of Usage
Modified: trunk/docs/userguide/en/src/main/docbook/included/pickList.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/pickList.xml 2008-02-20 17:21:47 UTC (rev 6224)
+++ trunk/docs/userguide/en/src/main/docbook/included/pickList.xml 2008-02-20 19:03:56 UTC (rev 6225)
@@ -38,12 +38,7 @@
<entry>org.richfaces.PickListRenderer</entry>
</row>
- <row>
- <entry>renderer-class</entry>
-
- <entry>org.richfaces.renderkit.html.PickListRendererGen</entry>
- </row>
- <row>
+ <row>
<entry>tag-class</entry>
<entry>org.richfaces.taglib.PickListTag</entry>
@@ -59,10 +54,7 @@
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[...
- <pickList:pickList
- copyControlLabel = "#{pickBean.copyLabel}"
- value="#{pickBean.listValues}">
- <f:selectItems value="#{pickBean.testList}"/>
+<pickList:pickList value="#{pickBean.listValues}">
</pickList:pickList>
...]]></programlisting>
</section>
@@ -96,100 +88,69 @@
<!-- attributes of component orderingList -->
- <para>The <emphasis>
+ <para>
+ The <emphasis>
<property> "value"</property>
</emphasis>
- attribute is used to access the values of a list. </para>
-
- <para> In the example
- below after submitting the form you can see the <emphasis role="bold">
- <property><rich:pickList></property></emphasis> component with the main attributes
- and the <emphasis role="bold">
- <property><h:panelGrid></property></emphasis> where you can set the values.</para>
- <para>
+ attribute is used to access the values of a list.
+ </para>
+ <para>
+ The <emphasis role="bold">
+ <property><rich:pickList></property></emphasis>
+ component provides changing sizes of lists by using such attributes as:
+ <itemizedlist>
+ <listitem>
+ <emphasis>
+ <property> "listsHeight"</property></emphasis> defines height of the lists.
+
+ </listitem>
+ <listitem>
+ <emphasis>
+ <property> "sourceListWidth"</property></emphasis> defines width of a source list.
+
+ </listitem>
+ <listitem>
+ <emphasis>
+ <property> "targetListWidth"</property></emphasis> defines width of a target list.
+
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[...
-<h:form>
- <h:panelGrid columns="2">
- <h:outputText value="set target list width: "></h:outputText>
- <h:inputText value="#{pickBean.targetListWidth}"></h:inputText>
- <h:outputText value="set source list width: "></h:outputText>
- <h:inputText value="#{pickBean.sourceListWidth}"></h:inputText>
- <h:outputText value="set list heights: "></h:outputText>
- <h:inputText value="#{pickBean.listsHeight}"></h:inputText>
- <h:outputText value="set 'CopyAll' control label: "></h:outputText>
- <h:inputText value="#{pickBean.copyAllLabel}"></h:inputText>
- <h:outputText value="set 'Copy' control label: "></h:outputText>
- <h:inputText value="#{pickBean.copyLabel}"></h:inputText>
- <h:outputText value="set 'Remove' control label: "></h:outputText>
- <h:inputText value="#{pickBean.removeLabel}"></h:inputText>
- <h:outputText value="set 'RemoveAll' control label: "></h:outputText>
- <h:inputText value="#{pickBean.removeAllLabel}"></h:inputText>
- </h:panelGrid>
- <pickList:pickList valueChangeListener="#{pickBean.selectionChanged}" listsHeight="#{pickBean.listsHeight}"
-sourceListWidth="#{pickBean.sourceListWidth}" targetListWidth="#{pickBean.targetListWidth}" copyAllControlLabel = "#{pickBean.copyAllLabel}"
-copyControlLabel = "#{pickBean.copyLabel}" removeControlLabel = "#{pickBean.removeLabel}"
-removeAllControlLabel ="#{pickBean.removeAllLabel}" value="#{pickBean.listValues}">
- <f:selectItem itemValue="cat" itemLabel="cat"/>
- <f:selectItem itemValue="dog" itemLabel="dog"/>
- <f:selectItems value="#{pickBean.testList}"/>
- </pickList:pickList>
- <h:commandButton value="Submit" action="none"/>
-</h:form>
-...]]></programlisting>
+<pickList:pickList listsHeight="#{pickBean.listsHeight}" sourceListWidth="#{pickBean.sourceListWidth}" targetListWidth="#{pickBean.targetListWidth}" value="#{pickBean.listValues}">
+ <f:selectItem itemValue="cat" itemLabel="cat"/>
+ <f:selectItem itemValue="dog" itemLabel="dog"/>
+ <f:selectItems value="#{pickBean.testList}"/>
+</pickList:pickList>
+ ...]]></programlisting>
- <!-- ordering control set-->
<para>
- The <emphasis role="bold">
- <property><rich:pickList></property></emphasis>
- component provides changing "height" and "width" parameters of lists by using such attributes as:
- <itemizedlist>
- <listitem>
- <emphasis>
- <property> "listsHeight"</property></emphasis> that defines height of the list in "px".
-
- </listitem>
- <listitem>
- <emphasis>
- <property> "targetListWidth"</property></emphasis> that defines width of a target list in "px".
-
- </listitem>
- <listitem>
- <emphasis>
- <property> "sourceListWidth"</property></emphasis> that defines width of a source list in "px".
-
- </listitem>
- </itemizedlist>
- </para>
-<para>
- The <emphasis role="bold">
- <property><rich:pickList></property></emphasis> component has performance to change the "Button labels" with the help of such attributes as:
- <itemizedlist>
- <listitem>
+ A <property>move controls set</property> could be defined with
<emphasis>
- <property> "copyAllControlLabel"</property></emphasis> defines label for "Copy all" button.
-
- </listitem>
- <listitem>
- <emphasis>
- <property> "copyControlLabel"</property></emphasis> defines label for "Copy" button.
-
- </listitem>
- <listitem>
- <emphasis>
- <property> "removeControlLabel"</property></emphasis> defines label for "Remove" button.
-
- </listitem>
- <listitem>
- <emphasis>
- <property> "removeAllControlLabel"</property></emphasis> defines label for "Remove all" button.
-
- </listitem>
- </itemizedlist>
-</para>
+ <property> "copyAllControlLabel"</property></emphasis>, <emphasis>
+ <property> "copyControlLabel"</property></emphasis>, <emphasis>
+ <property> "removeControlLabel"</property></emphasis>, <emphasis>
+ <property> "removeAllControlLabel"</property>
+ </emphasis> attributes.
+
+ </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<pickList:pickList copyAllControlLabel = "#{pickBean.copyAllLabel}" copyControlLabel = "#{pickBean.copyLabel}" removeControlLabel = "#{pickBean.removeLabel}"
+removeAllControlLabel ="#{pickBean.removeAllLabel}" value="#{pickBean.listValues}">
+ <f:selectItem itemValue="cat" itemLabel="cat"/>
+ <f:selectItem itemValue="dog" itemLabel="dog"/>
+ <f:selectItems value="#{pickBean.testList}"/>
+</pickList:pickList>
+...]]></programlisting>
-
+ <!-- ordering control set-->
+
<table>
<title>Keyboard usage for elements selection</title>
<tgroup cols="2">
@@ -572,11 +533,11 @@
<tbody>
<row>
<entry>rich-picklist-list</entry>
- <entry>Defines styles for a wrapper table element of a pickList</entry>
+ <entry>Defines styles for a wrapper <table> element of a pickList</entry>
</row>
<row>
<entry>rich-list-picklist</entry>
- <entry>Defines styles for a wrapper table element of a pickList</entry>
+ <entry>Defines styles for a wrapper <table> element of a pickList</entry>
</row>
</tbody>
</tgroup>
@@ -605,7 +566,7 @@
</table>
<table >
- <title>Classes names that define a pressed and highlighted button representation</title>
+ <title>Classes names that define pressed and highlighted button representation</title>
<tgroup cols="2">
<thead>
<row>
@@ -615,6 +576,14 @@
</thead>
<tbody>
<row>
+ <entry>rich-list-picklist-button</entry>
+ <entry>Defines styles for a button</entry>
+ </row>
+ <row>
+ <entry>rich-list-picklist-button-disabled</entry>
+ <entry>Defines styles for a disabled button</entry>
+ </row>
+ <row>
<entry>rich-list-picklist-button-press</entry>
<entry>Defines styles for a pressed button</entry>
</row>
16 years, 11 months
JBoss Rich Faces SVN: r6224 - trunk/ui/dataTable/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-02-20 12:21:47 -0500 (Wed, 20 Feb 2008)
New Revision: 6224
Modified:
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
Log:
Triangle images added to sortable headers.
Modified: trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
--- trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2008-02-20 17:19:15 UTC (rev 6223)
+++ trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2008-02-20 17:21:47 UTC (rev 6224)
@@ -161,6 +161,8 @@
String columnHeaderClass = (String) column.getAttributes().get(
classAttribute);
writer.startElement(element, column);
+ encodeStyleClass(writer, null, skinCellClass, headerClass,
+ columnHeaderClass);
writer.writeAttribute("scope", "col", null);
getUtils().encodeAttribute(context, column, "colspan");
@@ -189,16 +191,17 @@
writer.writeAttribute(HTML.onclick_ATTRIBUTE, buffer
.toString(), null);
}
- columnHeaderClass = "dr-table-sortable-header " + columnHeaderClass;
+ writer.startElement(HTML.SPAN_ELEM, column);
+ String spanClass = "";
if (Ordering.ASCENDING.equals(col.getSortOrder())) {
- columnHeaderClass = "dr-table-header-sort-up " + columnHeaderClass;
+ spanClass = "dr-table-header-sort-up dr-table-sortable-header";
} else if (Ordering.DESCENDING.equals(col.getSortOrder())) {
- columnHeaderClass = "dr-table-header-sort-down " + columnHeaderClass;
+ spanClass = "dr-table-header-sort-down dr-table-sortable-header";
}
+ writer.writeAttribute(HTML.class_ATTRIBUTE, spanClass, null);
}
}
- encodeStyleClass(writer, null, skinCellClass, headerClass,
- columnHeaderClass);
+
UIComponent facet = column.getFacet(facetName);
if (facet != null) {
renderChild(context, facet);
@@ -215,6 +218,7 @@
writer.writeAttribute(HTML.width_ATTRIBUTE, "16", null);
writer.endElement(HTML.IMG_ELEMENT);
}
+ writer.endElement(HTML.SPAN_ELEM);
}
if (((org.richfaces.component.UIColumn)column).getFilterMethod() == null
&& column.getValueExpression("filterExpression") == null
16 years, 11 months
JBoss Rich Faces SVN: r6223 - management/design/standardComponent.
by richfaces-svn-commits@lists.jboss.org
Author: admitriev
Date: 2008-02-20 12:19:15 -0500 (Wed, 20 Feb 2008)
New Revision: 6223
Modified:
management/design/standardComponent/default_example.html
Log:
Modified: management/design/standardComponent/default_example.html
===================================================================
--- management/design/standardComponent/default_example.html 2008-02-20 17:09:00 UTC (rev 6222)
+++ management/design/standardComponent/default_example.html 2008-02-20 17:19:15 UTC (rev 6223)
@@ -8,14 +8,27 @@
<body>
<style>
- input, select{
+ input, select, textarea{
border-width: 1px;
border-color : #BED6F8 /*panelBorderColor*/;
font-size: 11px /*generalSizeFont*/;
font-family: verdana /*generalFamilyFont*/;
color : #000000 /*controlTextColor*/;
}
+ fieldset{
+ border-width: 1px;
+ border-color : #BED6F8 /*panelBorderColor*/;
+ border-style : solid;
+ padding:10px;
+ }
+ legend{
+ font-size: 11px /*generalSizeFont*/;
+ font-family: verdana /*generalFamilyFont*/;
+ color : #000000 /*controlTextColor*/;
+ }
</style>
+<fieldset>
+<legend>Legend</legend>
<input type="Button" value="Test">
<input type="Checkbox">
<input type="File">
@@ -24,5 +37,9 @@
<select>
<option>Test</option>
</select>
+<br><br>
+<textarea>text</textarea>
+
+</fieldset>
</body>
</html>
16 years, 11 months
JBoss Rich Faces SVN: r6222 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-02-20 12:09:00 -0500 (Wed, 20 Feb 2008)
New Revision: 6222
Modified:
trunk/docs/userguide/en/src/main/docbook/included/tree.xml
Log:
Some sentences were rewritten.
http://jira.jboss.com/jira/browse/RF-1137
Modified: trunk/docs/userguide/en/src/main/docbook/included/tree.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2008-02-20 17:05:19 UTC (rev 6221)
+++ trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2008-02-20 17:09:00 UTC (rev 6222)
@@ -44,15 +44,15 @@
<section>
<title>Creating the Component with a Page Tag</title>
- <para>There are two cases for a tree definition: with <emphasis role="bold">
+ <para>There are two ways to set up a tree: 1) with <emphasis role="bold">
<property><rich:recursiveTreeNodesAdaptor></property>
</emphasis> or <emphasis role="bold">
<property><rich:treeNodesAdaptor></property>
- </emphasis> and without them. In the first case, it's possible to define it without <emphasis>
+ </emphasis> 2) and without them. The first method allows to omit<emphasis>
<property>"value"</property>
</emphasis> and <emphasis>
<property>"var"</property>
- </emphasis> attributes as follows: </para>
+ </emphasis> attributes definition as follows: </para>
<para>
<emphasis role="bold">Example:</emphasis>
@@ -64,7 +64,7 @@
</rich:tree>
...]]></programlisting>
- <para> In the second case, it's necessary to define it with these attributes as
+ <para> The second way requires defining some attributes, as
it's shown in the example: </para>
<para>
@@ -327,19 +327,19 @@
<para><property>"TreeNode"</property> has a property
<property>"data"</property> (see <ulink
url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
- >org.richfaces.model.TreeNode</ulink>). Data contained in the property are placed in a
+ >org.richfaces.model.TreeNode</ulink>). Data contained in the property is placed in a
request scope variable, which name is defined with <emphasis>
<property>"var"</property>
</emphasis> attribute for the <emphasis role="bold">
<property><rich:tree></property>
</emphasis> component.</para>
- <para>You can develop and use your own implementation for the
+ <para>You can develop and use your own pattern of the
<property>"TreeNode"</property> interface or use a default implementation,
which is defined with a default class <property>"TreeNodeImpl"</property>
(<ulink
url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
>org.richfaces.model.TreeNodeImpl</ulink>).</para>
- <para>There is <property>"XmlTreeDataBuilder"</property> class (<ulink
+ <para>There is a <property>"XmlTreeDataBuilder"</property> class (<ulink
url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
>org.richfaces.component.xml.XmlTreeDataBuilder</ulink>) that allows transforming XML into
structures of objects containing <property>"XmlNodeData"</property> (<ulink
@@ -348,14 +348,14 @@
represented by the <emphasis role="bold">
<property><rich:tree></property>
</emphasis> component.</para>
- <para>It's possible to define a visual representation of a data model node (to define a
- node icon) and its behavior in correspondence with data contained in this node (with a value of
+ <para>It's possible to define a visual representation of a node data model (to define a
+ node icon) and its behavior in correspondence with the data contained in this node (with a value of
the <emphasis>
<property>"var"</property>
- </emphasis> attribute). The node behavior is defined by components nested to the <emphasis
+ </emphasis> attribute). The node behavior is defined by the components nested into the <emphasis
role="bold">
<property><rich:treeNode></property>
- </emphasis> (it could be links or buttons, for example). For these purposes you should use <emphasis>
+ </emphasis> (e.g. links or buttons). For these purposes you should use <emphasis>
<property>"nodeFace"</property>
</emphasis> attribute. For each tree node a value of <emphasis>
<property>"nodeFace"</property>
@@ -365,7 +365,7 @@
<property>"type"</property>
</emphasis> attribute equal to a value of <emphasis>
<property>"nodeFace"</property>
- </emphasis> is used for node representation. An example is placed below.</para>
+ </emphasis> is used for node representation. See an example below.</para>
<para id="example">
<emphasis role="bold">Example:</emphasis>
16 years, 11 months
JBoss Rich Faces SVN: r6221 - trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/web.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-02-20 12:05:19 -0500 (Wed, 20 Feb 2008)
New Revision: 6221
Modified:
trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/web/MultipartFilter.java
Log:
little remark
Modified: trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/web/MultipartFilter.java
===================================================================
--- trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/web/MultipartFilter.java 2008-02-20 17:04:09 UTC (rev 6220)
+++ trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/web/MultipartFilter.java 2008-02-20 17:05:19 UTC (rev 6221)
@@ -16,6 +16,8 @@
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
+import org.richfaces.org.jboss.seam.ui.renderkit.FileUploadRendererBase;
+
/**
* A filter for decoding multipart requests, for
* use with the file upload control.
@@ -87,6 +89,7 @@
"_richfaces_upload_sessions", sessionsMap);
}
}
+ session.setAttribute(FileUploadRendererBase._percentBeanName, 0);
sessionsMap.put(uid, multipartRequest);
16 years, 11 months
JBoss Rich Faces SVN: r6220 - trunk/sandbox/samples/sortingFilteringDemo/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-02-20 12:04:09 -0500 (Wed, 20 Feb 2008)
New Revision: 6220
Modified:
trunk/sandbox/samples/sortingFilteringDemo/src/main/webapp/pages/index.jsp
Log:
update demo
Modified: trunk/sandbox/samples/sortingFilteringDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/sortingFilteringDemo/src/main/webapp/pages/index.jsp 2008-02-20 17:01:47 UTC (rev 6219)
+++ trunk/sandbox/samples/sortingFilteringDemo/src/main/webapp/pages/index.jsp 2008-02-20 17:04:09 UTC (rev 6220)
@@ -16,7 +16,7 @@
</f:facet>
<h:outputText value="#{issue.key.value}"></h:outputText>
</dt:column>
- <dt:column sortExpression="#{issue.summary}">
+ <dt:column sortBy="#{issue.summary}">
<f:facet name="header">
<h:outputText value="Summary"></h:outputText>
</f:facet>
@@ -28,13 +28,14 @@
</f:facet>
<h:outputText value="#{issue.assignee.name}"></h:outputText>
</dt:column>
- <dt:column>
+ <dt:column filterBy="#{issue.reporter.name}">
<f:facet name="header">
<h:outputText value="Reporter"></h:outputText>
</f:facet>
- <h:outputText value="#{issue.reporter.name}"></h:outputText>
+ <h:inputText value="#{issue.reporter.name}"></h:inputText>
</dt:column>
</dt:dataTable>
+ <h:commandButton value="test"></h:commandButton>
</h:form>
</f:view>
</body>
16 years, 11 months
JBoss Rich Faces SVN: r6219 - in trunk/sandbox/ui/inplaceSelect/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-02-20 12:01:47 -0500 (Wed, 20 Feb 2008)
New Revision: 6219
Modified:
trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectlist.js
trunk/sandbox/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
Log:
list positioning added
Modified: trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
===================================================================
--- trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-02-20 16:56:36 UTC (rev 6218)
+++ trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-02-20 17:01:47 UTC (rev 6219)
@@ -7,9 +7,13 @@
initHandlers : function($super) {
$super();
- this.comboList.list.observe("click", function(e){this.listClickHandler(e);}.bindAsEventListener(this));
this.tempValueKeeper.observe("blur", function(e){this.tmpValueBlurHandler(e);}.bindAsEventListener(this));
this.tempValueKeeper.observe("click", function(e){this.tempKeeperClickHandler(e);}.bindAsEventListener(this));
+ this.tempValueKeeper.observe("keydown", function(e){this.tmpValueKeyDownHandler(e);}.bindAsEventListener(this));
+
+ this.comboList.listParent.observe("mousedown", function(e){this.listMousedownHandler(e);}.bindAsEventListener(this));
+ this.comboList.listParent.observe("mousemove", function(e){this.listMouseMoveHandler(e)}.bindAsEventListener(this));
+ this.comboList.listParent.observe("click", function(e){this.listClickHandler(e);}.bindAsEventListener(this));
},
tempKeeperClickHandler : function() {
@@ -27,6 +31,48 @@
this.comboList.hideWithDelay();
},
+ listMouseMoveHandler : function(event) {
+ //changes item's decoration
+ var item = this.comboList.getEventItem(event);
+ if (item) {
+ this.comboList.doActiveItem(this.comboList.getEventItem(event));
+ }
+ },
+
+ listMousedownHandler : function(e) {
+ if (Prototype.Browser.IE) {
+ if (!this.comboList.getEventItem(e)) {
+ this.clickOnScroll = true;
+ }
+ this.comboList.isList = true;
+ } else if (Prototype.Browser.Gecko) {
+ if (this.comboList.getEventItem(e)) {
+ this.comboList.isList = true;
+ }
+ } else {
+ this.comboList.isList = true;
+ }
+ },
+
+ tmpValueKeyDownHandler : function(event) {
+ switch (event.keyCode) {
+ case Event.KEY_RETURN :
+ this.inputProcessing();
+ this.comboList.hideWithDelay();
+ Event.stop(event);
+ break;
+ case Event.KEY_DOWN :
+ this.comboList.moveActiveItem(event);
+ break;
+ case Event.KEY_UP :
+ this.comboList.moveActiveItem(event);
+ break;
+ case Event.KEY_ESC :
+ this.comboList.hideWithDelay();
+ break;
+ }
+ },
+
deleteViewArtifacts : function () {
var text = this.inplaceInput.childNodes[6];
if (text) {
Modified: trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectlist.js
===================================================================
--- trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectlist.js 2008-02-20 16:56:36 UTC (rev 6218)
+++ trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectlist.js 2008-02-20 17:01:47 UTC (rev 6219)
@@ -9,17 +9,27 @@
setPosition : function($super, fieldTop, fieldLeft, fieldHeight) {
var field = this.fieldElem;
- //field.style.visibility = "hidden";
field.show();
var height = field.offsetHeight;
- //field.hide();
- //field.style.visibility = "visible";
+ var top = height;
+ var docHeight = Richfaces.getDocumentHeight();
+ var comBottom = fieldTop + height;
+ var listHeight = parseInt(this.list.style.height) + Richfaces.getBorderWidth(this.list.parentNode, "tb");
- this.listParent.style.top = height + "px";
+ //var top = 0 ;//= -4;
+ /*var top = comBottom;
+ if (parseInt(listHeight) > (docHeight - comBottom)) {
+ if (fieldTop > (docHeight - comBottom)) {
+ top = fieldTop - parseInt(listHeight);
+ //var upPos = true;
+ }
+ }*/
+
+ this.listParent.style.top = top + "px";
this.listParent.style.left = 0 + "px";
if (this.iframe) {
- this.iframe.style.top = 0 + "px";
+ this.iframe.style.top = top + "px";
this.iframe.style.left = 0 + "px";
}
}
Modified: trunk/sandbox/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
===================================================================
--- trunk/sandbox/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-02-20 16:56:36 UTC (rev 6218)
+++ trunk/sandbox/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-02-20 17:01:47 UTC (rev 6219)
@@ -147,7 +147,7 @@
STYLE : {ACTIVE: "#{listStyle}"}
},
ITEM : {NORMAL : "rich-inplace-select-option #{itemClass}",
- SELECTED : "rich-inplace-select-option rich-inplace-select-select-item #{itemSelectedClass}"
+ SELECTED : "rich-inplace-select-option rich-inplace-select-item #{itemSelectedClass}"
}
},
COMPONENT : {CHANGED : {NORMAL : 'rich-inplace rich-inplace-select-default-state rich-inplace-select-changed-state #{component.attributes["changedClass"]}', HOVERED : '#{component.attributes["changedHoveredClass"]}'},
@@ -173,7 +173,7 @@
onviewactivated : #{this:getAsEventHandler(context, component, "onviewactivated")}};
var richInplaceList = new Richfaces.InplaceSelectList('list#{clientId}', 'listParent#{clientId}', false,
- Richfaces.InplaceSelect.CLASSES, '100px', '100px', #{this:getItemsTextAsJSArray(context, component)}, null,
+ Richfaces.InplaceSelect.CLASSES.COMBO_LIST, '100px', '100px', #{this:getItemsTextAsJSArray(context, component)}, null,
'#{clientId}inplaceTmpValue', 'shadow#{clientId}', 0, 0);
var richInplaceSelect = new Richfaces.InplaceSelect(richInplaceList, '#{clientId}', '#{clientId}inplaceTmpValue',
'#{clientId}inplaceValue', '#{clientId}tabber', '#{clientId}inplaceStrut',
16 years, 11 months
JBoss Rich Faces SVN: r6218 - in trunk/sandbox/samples/fileUploadDemo/src/main: webapp/WEB-INF and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-02-20 11:56:36 -0500 (Wed, 20 Feb 2008)
New Revision: 6218
Modified:
trunk/sandbox/samples/fileUploadDemo/src/main/java/org/richfaces/Bean.java
trunk/sandbox/samples/fileUploadDemo/src/main/webapp/WEB-INF/web.xml
trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp
Log:
work demo version
Modified: trunk/sandbox/samples/fileUploadDemo/src/main/java/org/richfaces/Bean.java
===================================================================
--- trunk/sandbox/samples/fileUploadDemo/src/main/java/org/richfaces/Bean.java 2008-02-20 16:48:46 UTC (rev 6217)
+++ trunk/sandbox/samples/fileUploadDemo/src/main/java/org/richfaces/Bean.java 2008-02-20 16:56:36 UTC (rev 6218)
@@ -22,19 +22,25 @@
package org.richfaces;
import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
import javax.faces.event.ActionEvent;
+import javax.faces.event.FacesEvent;
+import org.richfaces.event.UploadEvent;
+
/**
* @author $Autor$
*
*/
public class Bean {
- private Map<String,InputStream> data = new HashMap<String, InputStream>();
+ private Map data = new HashMap();
private boolean flag;
@@ -46,20 +52,43 @@
System.out.println(flag);
this.flag = flag;
}
+
+ public void listener(UploadEvent event) throws IOException{
+
+ File file = event.getFile();
+ System.out.println("File name : " + file.getName());
+ FileInputStream stream = new FileInputStream(file);
+ ByteArrayOutputStream buffer = new ByteArrayOutputStream(4096);
+ byte [] bytes = new byte[4096];
+ int read;
+ while ((read = stream.read(bytes)) != -1) {
+ buffer.write(bytes, 0 , read);
+ }
+ stream.close();
+ file.delete();
+ System.out.println(buffer.toString());
+
+ }
public void action(ActionEvent event) {
try {
if (data != null) {
- for (String name : data.keySet()) {
+ for (String name : (String [])data.keySet().toArray(new String [0])) {
System.out.println("\nFile Name : " + name);
- InputStream stream = data.get(name);
- byte[] buffer = new byte[4096];
- ByteArrayOutputStream b = new ByteArrayOutputStream();
+ File file = (File)data.get(name);
+
+ FileInputStream stream = new FileInputStream(file);
+ ByteArrayOutputStream buffer = new ByteArrayOutputStream(4096);
+ byte [] bytes = new byte[4096];
int read;
- while ((read = stream.read(buffer)) != -1) {
- b.write(buffer, 0, read);
- System.out.println(b.toString());
+ while ((read = stream.read(bytes)) != -1) {
+ buffer.write(bytes, 0 , read);
}
+ stream.close();
+ data.remove(name);
+ file.delete();
+ System.out.println(buffer.toString());
+
}
}
} catch (Exception e) {
Modified: trunk/sandbox/samples/fileUploadDemo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/sandbox/samples/fileUploadDemo/src/main/webapp/WEB-INF/web.xml 2008-02-20 16:48:46 UTC (rev 6217)
+++ trunk/sandbox/samples/fileUploadDemo/src/main/webapp/WEB-INF/web.xml 2008-02-20 16:56:36 UTC (rev 6218)
@@ -37,6 +37,7 @@
</init-param>
</filter>
+ <!--
<filter>
<display-name>Sleep Filter</display-name>
<filter-name>sleepFilter</filter-name>
@@ -51,6 +52,7 @@
<dispatcher>INCLUDE</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>
+ -->
<filter-mapping>
<filter-name>fileUpload</filter-name>
Modified: trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp 2008-02-20 16:48:46 UTC (rev 6217)
+++ trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp 2008-02-20 16:56:36 UTC (rev 6218)
@@ -20,16 +20,13 @@
<h:messages />
-<fu:fileUpload data="#{bean.data}" progressInfo="info">
+<fu:fileUpload data="#{bean.data}" fileUploadListener="#{bean.listener}">
<f:facet name="progress">
- <progressBar:progressBar style="height: 10px; width: 300px;" enabled="false">
+ <progressBar:progressBar style="height: 10px; width: 300px;">
</progressBar:progressBar>
</f:facet>
- <f:facet name="progressLabel">
- <h:panelGroup>
- <h:outputText value="#{info.uploadedMB}MB from #{info.MB}MB"></h:outputText>
- <h:outputText style="padding-left: 80px" value="time: #{info.mm}:#{info.ss}"></h:outputText>
- </h:panelGroup>
+ <f:facet name="label">
+ <h:outputText value="{_MB}MB from {MB}MB uploaded --- {mm}:{ss}"></h:outputText>
</f:facet>
</fu:fileUpload><br/><br/><br/>
<h:commandButton actionListener="#{bean.action}" style="font-weight: bold; width: 300px;" value="Print file content in console"></h:commandButton>
16 years, 11 months