JBoss Rich Faces SVN: r3557 - trunk/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: ochikvina
Date: 2007-10-26 05:33:50 -0400 (Fri, 26 Oct 2007)
New Revision: 3557
Added:
trunk/docs/userguide/en/src/main/resources/images/tree1.png
trunk/docs/userguide/en/src/main/resources/images/tree2.png
Modified:
trunk/docs/userguide/en/src/main/resources/images/tree3.png
trunk/docs/userguide/en/src/main/resources/images/tree4.png
Log:
http://jira.jboss.com/jira/browse/RF-1137 - replacing of the screenshot
Added: trunk/docs/userguide/en/src/main/resources/images/tree1.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/tree1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/docs/userguide/en/src/main/resources/images/tree2.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/tree2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/docs/userguide/en/src/main/resources/images/tree3.png
===================================================================
(Binary files differ)
Modified: trunk/docs/userguide/en/src/main/resources/images/tree4.png
===================================================================
(Binary files differ)
17 years, 2 months
JBoss Rich Faces SVN: r3556 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: ochikvina
Date: 2007-10-26 05:33:12 -0400 (Fri, 26 Oct 2007)
New Revision: 3556
Modified:
trunk/docs/userguide/en/src/main/docbook/included/tree.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/tree.xml
Log:
http://jira.jboss.com/jira/browse/RF-1137 - replacing of all screenshots and final corecting of the information
Modified: trunk/docs/userguide/en/src/main/docbook/included/tree.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/tree.desc.xml 2007-10-25 23:21:35 UTC (rev 3555)
+++ trunk/docs/userguide/en/src/main/docbook/included/tree.desc.xml 2007-10-26 09:33:12 UTC (rev 3556)
@@ -13,7 +13,7 @@
<title>Expanded tree with child elements</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/tree1.gif"/>
+ <imagedata fileref="images/tree1.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -26,12 +26,25 @@
<itemizedlist>
<listitem>
<para>Highly customizable look-and-feel</para>
+ <para>This feature provides rich possibilities to change an appearance of a component to different corresponding modern styles.</para>
</listitem>
- <para>This feature provides rich possibilities to change an appearance of a component to different corresponding modern styles.</para>
+
<listitem>
<para>Built-in drag and drop support</para>
+ <para>This feature allows changing a placement of nodes in a tree simply by dropping a certain node from one place to another. Look at the screenshot below:</para>
+ <figure>
+ <title>Drag and drop feature of a tree</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/tree3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>
+ Here, an appropriate CD-disk is been moving from one album to the next one.
+ </para>
</listitem>
- <para>This feature allows changing a sequence order of nodes in a tree simply by dragging a certain node from one place to another.</para>
+
<listitem>
<para>Built-in Ajax processing</para>
</listitem>
Modified: trunk/docs/userguide/en/src/main/docbook/included/tree.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2007-10-25 23:21:35 UTC (rev 3555)
+++ trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2007-10-26 09:33:12 UTC (rev 3556)
@@ -44,8 +44,10 @@
<section>
<title>Creating the Component with a Page Tag</title>
- <para>There are two cases for a tree definition: without adapters and with adapters. In the
- first case, it's necessary to define it with <emphasis>
+ <para>There are two cases for a tree definition: together with <emphasis role="bold">
+ <property><rich:recursiveTreeNodesAdaptor></property>
+ </emphasis>
+ and without it. In the first case, it’s possible to define it without <emphasis>
<property>"value"</property>
</emphasis> and <emphasis>
<property>"var"</property>
@@ -54,23 +56,27 @@
<para>
<emphasis role="bold">Example:</emphasis>
</para>
+
<programlisting role="XML"><![CDATA[...
- <rich:tree value="#{library.data}" var="item" >
- <!--Set of the Tree nodes-->
+ <rich:tree>
+ <rich:recursiveTreeNodesAdaptor roots="#{fileSystemBean.sourceRoots}" var="item" nodes="#{item.nodes}" />
</rich:tree>
...
]]></programlisting>
- <para>In the second case, it’s possible to define it without these attributes as it’s shown
- below. </para>
+ <para> In the second case, it's necessary to define it with these attributes as it’s
+ shown below: </para>
+
<para>
<emphasis role="bold">Example:</emphasis>
</para>
-
<programlisting role="XML"><![CDATA[...
- <rich:tree>
- <rich:recursiveTreeNodesAdaptor roots="#{fileSystemBean.sourceRoots}" var="item" nodes="#{item.nodes}" />
+ <rich:tree value="#{library.data}" var="item" >
+ <rich:treeNode icon="/images/tree/singer.png" >
+ <h:outputText value="#{item.name}" />
+ </rich:treeNode>
+ ...
</rich:tree>
...
]]></programlisting>
@@ -91,8 +97,9 @@
<title>Details of Usage</title>
<para>As it has been mentioned <link linked="tree">above</link> the tree component allows
rendering any tree-like structure of data.</para>
- <para>A bean property is passed into a tree <emphasis><property>"value"</property></emphasis>
- attribute. The property keeps a structure of an <ulink
+ <para>A bean property is passed into a tree <emphasis>
+ <property>"value"</property>
+ </emphasis> attribute. The property keeps a structure of an <ulink
url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
>org.richfaces.component.TreeNode</ulink> type.</para>
<para>There is a default class TreeNodeImpl which is used for treeNode interface implementation.
@@ -101,14 +108,18 @@
<para><emphasis role="bold">
<property><rich:treeNode></property>
</emphasis> has getValue method which is available in a request scope variable with name that
- is defined by <emphasis><property>"var"</property></emphasis> attribute of tree component. </para>
+ is defined by <emphasis>
+ <property>"var"</property>
+ </emphasis> attribute of tree component. </para>
<para>For particular visual representation of data <emphasis role="bold">
<property><rich:tree></property>
</emphasis> selects by type one of the children treeNode components. The type is defined with
- the <emphasis><property>"nodeFace"</property></emphasis> attribute that contains value of
- <emphasis><property>"type"</property></emphasis> attribute for treeNode. An example of
- definition is placed below: </para>
+ the <emphasis>
+ <property>"nodeFace"</property>
+ </emphasis> attribute that contains value of <emphasis>
+ <property>"type"</property>
+ </emphasis> attribute for treeNode. An example of definition is placed below: </para>
<para>
<emphasis role="bold">Example:</emphasis>
@@ -137,7 +148,7 @@
<title>Expanded tree with child elements of different types</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/tree3.png"/>
+ <imagedata fileref="images/tree2.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -202,10 +213,10 @@
<figure>
<title> Using the <emphasis>
- <property>"type"</property>
- </emphasis> and the <emphasis>
- <property>"rendered"</property>
- </emphasis> attributes</title>
+ <property>"type"</property>
+ </emphasis> and the <emphasis>
+ <property>"rendered"</property>
+ </emphasis> attributes</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/tree4.png"/>
@@ -295,14 +306,14 @@
<section>
<title>Built-In Drag and Drop</title>
<para>The tree component functionality provides a built-in support for Drag and Drop operations.
- The main usage principles are the same as for RichFaces DnD wrapper components.
- Hence, to get additional information on the topic, read the corresponding chapters:<link
- linkend="dndParam">"rich:dndParam"</link>
+ The main usage principles are the same as for RichFaces DnD wrapper components. Hence, to get
+ additional information on the topic, read the corresponding chapters:<link linkend="dndParam"
+ >"rich:dndParam"</link>
<link linkend="dragSupport">"rich:dragSupport"</link>
<link linkend="dragIndicator">"rich:dragIndicator"</link>
<link linkend="dropSupport">"rich:dropSupport"</link>
- <property>Tree nodes</property> could be Drag, Drop or DnD elements, so tree has both attributes
- groups.</para>
+ <property>Tree nodes</property> could be Drag, Drop or DnD elements, so tree has both
+ attributes groups.</para>
<table>
<title>Drag attributes group</title>
<tgroup cols="2">
@@ -361,8 +372,9 @@
<listitem>dragListener processes Drug event</listitem>
<listitem>changeExpandListener processes expand/collapse event of a tree node</listitem>
</itemizedlist>
-
- <para>Listener methods can be defined using the <link linked="treeNode">following attributes</link> or using nested tags.</para>
+
+ <para>Listener methods can be defined using the <link linkend="treeNode">following
+ attributes</link> or using nested tags.</para>
<para>Client event attributes are:</para>
<itemizedlist>
<listitem>onexpand - expands a node event</listitem>
@@ -374,17 +386,16 @@
</itemizedlist>
<para>They can be used to add some JavaScript effects.</para>
-
+
<para> Also standart HTML event attributes like<emphasis>
- <property>"onclick"</property>
- </emphasis>, <emphasis>
- <property>"onmousedown"</property>
- </emphasis>, <emphasis>
- <property>"onmouseover"</property>
- </emphasis> and etc.
- could be used. Event handlers of a tree component capture events occured on any tree part. But
- event handlers of treeNode capture events occured on treeNode only, except for children
- events. </para>
+ <property>"onclick"</property>
+ </emphasis>, <emphasis>
+ <property>"onmousedown"</property>
+ </emphasis>, <emphasis>
+ <property>"onmouseover"</property>
+ </emphasis> and etc. could be used. Event handlers of a tree component capture events occured
+ on any tree part. But event handlers of treeNode capture events occured on treeNode only,
+ except for children events. </para>
</section>
<section>
<title>Look-and-Feel Customization</title>
17 years, 2 months
JBoss Rich Faces SVN: r3555 - in trunk/framework: test/src/test/java/org/richfaces/renderkit and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-10-25 19:21:35 -0400 (Thu, 25 Oct 2007)
New Revision: 3555
Added:
trunk/framework/test/src/test/java/org/richfaces/renderkit/TemplateEncoderRendererBaseTest.java
Modified:
trunk/framework/impl/src/main/java/org/richfaces/renderkit/TemplateEncoderRendererBase.java
Log:
http://jira.jboss.com/jira/browse/RF-1130 : code fix & test case
Modified: trunk/framework/impl/src/main/java/org/richfaces/renderkit/TemplateEncoderRendererBase.java
===================================================================
--- trunk/framework/impl/src/main/java/org/richfaces/renderkit/TemplateEncoderRendererBase.java 2007-10-25 21:47:54 UTC (rev 3554)
+++ trunk/framework/impl/src/main/java/org/richfaces/renderkit/TemplateEncoderRendererBase.java 2007-10-25 23:21:35 UTC (rev 3555)
@@ -20,12 +20,15 @@
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.sax.SAXResult;
+import org.ajax4jsf.javascript.JSReference;
+import org.ajax4jsf.javascript.ScriptUtils;
+import org.ajax4jsf.renderkit.HeaderResourcesRendererBase;
import org.ajax4jsf.webapp.tidy.TidyParser;
import org.ajax4jsf.webapp.tidy.TidyXMLFilter;
-import org.ajax4jsf.renderkit.HeaderResourcesRendererBase;
import org.richfaces.component.TemplateComponent;
import org.richfaces.json.JSContentHandler;
import org.w3c.dom.Document;
+import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -65,39 +68,51 @@
TidyParser tidyParser = new TidyParser(tidyProperties);
Document parsedHtml = tidyParser.parseHtmlByTidy(new StringReader(string), null);
- NodeList nodeList = parsedHtml.getDocumentElement().getChildNodes();
- Node bodyNode = nodeList.item(nodeList.getLength() - 1);
- NodeList bodyChildren = bodyNode.getChildNodes();
- int bodyChildrenLength = bodyChildren.getLength();
- writer.write("[");
+ Element documentElement = null;
+
+ if (parsedHtml != null) {
+ documentElement = parsedHtml.getDocumentElement();
+ }
+
+ if (documentElement != null) {
+ writer.write("[");
+
+ NodeList nodeList = documentElement.getChildNodes();
+ Node bodyNode = nodeList.item(nodeList.getLength() - 1);
+ NodeList bodyChildren = bodyNode.getChildNodes();
+ int bodyChildrenLength = bodyChildren.getLength();
- try {
- Transformer transformer;
+ try {
+ Transformer transformer;
- TransformerFactory factory = getTransformerFactory();
-
- synchronized (factory) {
- transformer = factory.newTransformer();
- }
+ TransformerFactory factory = getTransformerFactory();
+
+ synchronized (factory) {
+ transformer = factory.newTransformer();
+ }
- transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
- transformer.setOutputProperty(OutputKeys.METHOD, "xml");
+ transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
+ transformer.setOutputProperty(OutputKeys.METHOD, "xml");
- JSContentHandler contentHandler = new MacroDefinitionJSContentHandler(writer, "Richfaces.evalMacro(\"", "\", context)");
- Result result = new SAXResult(contentHandler);
+ JSContentHandler contentHandler = new MacroDefinitionJSContentHandler(writer, "Richfaces.evalMacro(\"", "\", context)");
+ Result result = new SAXResult(contentHandler);
- for (int i = 0; i < bodyChildrenLength; i++) {
- if (i != 0) {
- writer.write(", ");
+ for (int i = 0; i < bodyChildrenLength; i++) {
+ if (i != 0) {
+ writer.write(", ");
+ }
+ transformer.transform(new DOMSource(bodyChildren.item(i)), result);
}
- transformer.transform(new DOMSource(bodyChildren.item(i)), result);
+ } catch (TransformerException e) {
+ throw new IOException(e.getMessage());
}
- } catch (TransformerException e) {
- throw new IOException(e.getMessage());
+
+ writer.write("]");
+
+ } else {
+ writer.write(ScriptUtils.toScript(JSReference.NULL));
}
-
- writer.write("]");
}
protected void writeScriptBody(FacesContext context, UIComponent component, boolean children)
Added: trunk/framework/test/src/test/java/org/richfaces/renderkit/TemplateEncoderRendererBaseTest.java
===================================================================
--- trunk/framework/test/src/test/java/org/richfaces/renderkit/TemplateEncoderRendererBaseTest.java (rev 0)
+++ trunk/framework/test/src/test/java/org/richfaces/renderkit/TemplateEncoderRendererBaseTest.java 2007-10-25 23:21:35 UTC (rev 3555)
@@ -0,0 +1,64 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit;
+
+import javax.faces.component.UIOutput;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+
+/**
+ * Created 26.10.2007
+ * @author Nick Belaevski - mailto:nbelaevski@exadel.com
+ * @since 3.2
+ */
+
+public class TemplateEncoderRendererBaseTest extends AbstractAjax4JsfTestCase {
+
+ public TemplateEncoderRendererBaseTest(String name) {
+ super(name);
+ }
+
+ public void testEncodeNonRendered() throws Exception {
+ setupResponseWriter();
+
+ TemplateEncoderRendererBase rendererBase = new TemplateEncoderRendererBase() {
+
+ @Override
+ protected Class getComponentClass() {
+ return UIOutput.class;
+ }
+
+ };
+
+ UIOutput output = new UIOutput();
+
+ UIOutput c = new UIOutput();
+ c.setRendered(false);
+ c.setValue("");
+ output.getChildren().add(c);
+
+ //that should not fail
+ rendererBase.writeScriptBody(facesContext, c, true);
+
+ processResponseWriter();
+ }
+}
17 years, 2 months
JBoss Rich Faces SVN: r3554 - in trunk/ui/spacer/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-10-25 17:47:54 -0400 (Thu, 25 Oct 2007)
New Revision: 3554
Removed:
trunk/ui/spacer/src/main/resources/org/
Modified:
trunk/ui/spacer/src/main/templates/spacer.jspx
Log:
http://jira.jboss.com/jira/browse/RF-1150
Modified: trunk/ui/spacer/src/main/templates/spacer.jspx
===================================================================
--- trunk/ui/spacer/src/main/templates/spacer.jspx 2007-10-25 19:03:49 UTC (rev 3553)
+++ trunk/ui/spacer/src/main/templates/spacer.jspx 2007-10-25 21:47:54 UTC (rev 3554)
@@ -10,7 +10,6 @@
baseclass="org.ajax4jsf.renderkit.HeaderResourcesRendererBase"
component="org.richfaces.component.UISpacer"
>
- <h:styles>css/spacer.xcss</h:styles>
<f:clientid var="clientId"/>
<f:resource var="spacer" name="images/spacer.gif"/>
<img id="#{clientId}"
@@ -18,7 +17,7 @@
height="#{component.attributes['height']}"
alt="#{component.attributes['title']}"
src="#{spacer}"
- class="dr_spr rich-spacer #{component.attributes['styleClass']}"
+ class="rich-spacer #{component.attributes['styleClass']}"
x:passThruWithExclusions="id,width,height,title,styleClass,class"
>
</img>
17 years, 2 months
JBoss Rich Faces SVN: r3553 - /.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-10-25 15:03:49 -0400 (Thu, 25 Oct 2007)
New Revision: 3553
Removed:
RichFaces-root/
Log:
Removed garbage folder
17 years, 2 months
JBoss Rich Faces SVN: r3552 - in trunk/extensions/portlet/src/main: java/org/ajax4jsf/portlet/application and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-10-25 15:03:35 -0400 (Thu, 25 Oct 2007)
New Revision: 3552
Modified:
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/AjaxPortletBridge.java
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletViewHandler.java
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletViewState.java
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/component/UIPortletViewRoot.java
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/PortletLifecycle.java
trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/renderkit/portlet/PortletAjaxViewRootRenderer.java
trunk/extensions/portlet/src/main/resources/META-INF/faces-config.xml
Log:
Continue to implement JSR-301 bridge.
Modified: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/AjaxPortletBridge.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/AjaxPortletBridge.java 2007-10-25 19:03:21 UTC (rev 3551)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/AjaxPortletBridge.java 2007-10-25 19:03:35 UTC (rev 3552)
@@ -4,6 +4,7 @@
package org.ajax4jsf.portlet;
import java.io.PrintWriter;
+import java.util.ResourceBundle;
import javax.faces.FacesException;
import javax.faces.context.FacesContext;
@@ -21,6 +22,8 @@
import javax.portlet.faces.BridgeException;
import org.ajax4jsf.context.AjaxContext;
+import org.ajax4jsf.portlet.application.PortletStateHolder;
+import org.ajax4jsf.portlet.application.PortletViewState;
import org.ajax4jsf.portlet.context.AbstractExternalContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -75,6 +78,11 @@
FacesContext facesContext = getFacesContext(request, response);
try {
execute(facesContext);
+ facesContext.getApplication().getStateManager().saveSerializedView(facesContext);
+ // TODO - save request scope variables and Faces Messages.
+ PortletViewState windowState = PortletStateHolder.getInstance(facesContext).getWindowState(facesContext);
+ windowState.saveMessages(facesContext);
+ windowState.saveBeans(facesContext);
// saveView(facesContext);
} catch (Exception e) {
log.error("Error processing execute lifecycle", e);
@@ -101,11 +109,23 @@
response.setContentType(contenttype);
}
- PrintWriter writer = response.getWriter();
+ // set portlet title if its set.
+ ResourceBundle bundle =
+ portletConfig.getResourceBundle(request.getLocale());
+ if (bundle != null) {
+ String title = null;
+ try {
+ title = bundle.getString("javax.portlet.title");
+ response.setTitle(title);
+ } catch (Exception e) {
+ // Ignore MissingResourceException
+ }
+ }
+// PrintWriter writer = response.getWriter();
String namespace = response.getNamespace();
// Write anchor for update portlet pages by ajax.
// TODO - configure html element and style/class.
- writer.println("<div id='" + namespace + "'>");
+// writer.println("<div id='" + namespace + "'>");
// writer.flush();
AjaxContext ajaxContext = AjaxContext
.getCurrentInstance(facesContext);
@@ -117,8 +137,17 @@
request.getPortletMode().toString());
ajaxContext.getCommonAjaxParameters().put(
AbstractExternalContext.NAMESPACE_PARAMETER, namespace);
+ ajaxContext.getCommonAjaxParameters().put(
+ AbstractExternalContext.PORTLET_NAME_PARAMETER, getPortletConfig().getPortletName());
+ PortletViewState windowState = PortletStateHolder.getInstance(facesContext).getWindowState(facesContext);
+ windowState.restoreMessages(facesContext);
+ windowState.restoreBeans(facesContext);
+ if(null == facesContext.getViewRoot()){
+ execute(facesContext);
+ }
+//
render(facesContext);
- writer.println("</div>");
+// writer.println("</div>");
PortletSession portletSession = request.getPortletSession(true);
// Store namespace value in portlet scope session.
// ServletContext, in case of ajax requests,
Modified: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletViewHandler.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletViewHandler.java 2007-10-25 19:03:21 UTC (rev 3551)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletViewHandler.java 2007-10-25 19:03:35 UTC (rev 3552)
@@ -63,7 +63,7 @@
RenderResponse renderResponse = (RenderResponse) response;
PortletURL portletURL = renderResponse.createActionURL();
// portletURL.setParameter(AbstractExternalContext.VIEW_ID_PARAMETER, context.getViewRoot().getViewId());
-// portletURL.setParameter(AbstractExternalContext.NAMESPACE_PARAMETER, renderResponse.getNamespace());
+ portletURL.setParameter(AbstractExternalContext.NAMESPACE_PARAMETER, renderResponse.getNamespace());
return portletURL.toString();
} else if(null!=portalActionURL){
return portalActionURL;
Modified: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletViewState.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletViewState.java 2007-10-25 19:03:21 UTC (rev 3551)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/application/PortletViewState.java 2007-10-25 19:03:35 UTC (rev 3552)
@@ -187,4 +187,16 @@
this.treeStructure = treeStructure;
}
+
+ public void saveBeans(FacesContext facesContext) {
+ // TODO Auto-generated method stub
+
+ }
+
+
+ public void restoreBeans(FacesContext facesContext) {
+ // TODO Auto-generated method stub
+
+ }
+
}
Modified: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/component/UIPortletViewRoot.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/component/UIPortletViewRoot.java 2007-10-25 19:03:21 UTC (rev 3551)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/component/UIPortletViewRoot.java 2007-10-25 19:03:35 UTC (rev 3552)
@@ -20,6 +20,8 @@
PortletNamingContainer, Serializable {
+ public static final String PORTLET_VIEW_ROOT_RENDERER = "org.ajax4jsf.portlet.ViewRoot";
+
public UIPortletViewRoot() {
super();
}
@@ -45,4 +47,10 @@
}
return containerClientId;
}
+
+ @Override
+ public String getRendererType() {
+ // Override defauilt ViewRoot renderer type.
+ return PORTLET_VIEW_ROOT_RENDERER;
+ }
}
Modified: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/PortletLifecycle.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/PortletLifecycle.java 2007-10-25 19:03:21 UTC (rev 3551)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/lifecycle/PortletLifecycle.java 2007-10-25 19:03:35 UTC (rev 3552)
@@ -90,25 +90,25 @@
public void execute(FacesContext context) throws FacesException {
executePhase.execute(context);
// TODO - in the portlet mode, save state
- Object request = context.getExternalContext().getRequest();
- if(request instanceof PortletRequest){
- context.getApplication().getStateManager().saveSerializedView(context);
- }
- // TODO - save request scope variables and Faces Messages.
- PortletViewState windowState = PortletStateHolder.getInstance(context).getWindowState(context);
- windowState.saveMessages(context);
- HashMap requestScopeBeans = new HashMap();
- for (Iterator iterator = context.getExternalContext().getRequestMap().entrySet().iterator(); iterator.hasNext();) {
- Entry entry = (Entry) iterator.next();
- String paramName = entry.getKey().toString();
- Object bean = entry.getValue();
- if(!paramName.contains(".") && bean instanceof Serializable){
- requestScopeBeans.put(paramName, bean);
- }
- }
- if(requestScopeBeans.size()>0){
- windowState.setRequestScopeBeans(requestScopeBeans);
- }
+// Object request = context.getExternalContext().getRequest();
+// if(request instanceof PortletRequest){
+// context.getApplication().getStateManager().saveSerializedView(context);
+// }
+// // TODO - save request scope variables and Faces Messages.
+// PortletViewState windowState = PortletStateHolder.getInstance(context).getWindowState(context);
+// windowState.saveMessages(context);
+// HashMap requestScopeBeans = new HashMap();
+// for (Iterator iterator = context.getExternalContext().getRequestMap().entrySet().iterator(); iterator.hasNext();) {
+// Entry entry = (Entry) iterator.next();
+// String paramName = entry.getKey().toString();
+// Object bean = entry.getValue();
+// if(!paramName.contains(".") && bean instanceof Serializable){
+// requestScopeBeans.put(paramName, bean);
+// }
+// }
+// if(requestScopeBeans.size()>0){
+// windowState.setRequestScopeBeans(requestScopeBeans);
+// }
}
/**
@@ -118,16 +118,16 @@
*/
public void render(FacesContext context) throws FacesException {
// TODO - in the portlet mode, restore state, request scope variables and Faces Messages.
- Object request = context.getExternalContext().getRequest();
- if(request instanceof PortletRequest){
- executePhase.executePhase(context);
- PortletViewState windowState = PortletStateHolder.getInstance(context).getWindowState(context);
- windowState.restoreMessages(context);
- Map requestScopeBeans = windowState.getRequestScopeBeans();
- if(null != requestScopeBeans){
- context.getExternalContext().getRequestMap().putAll(requestScopeBeans);
- }
- }
+// Object request = context.getExternalContext().getRequest();
+// if(request instanceof PortletRequest){
+// executePhase.executePhase(context);
+// PortletViewState windowState = PortletStateHolder.getInstance(context).getWindowState(context);
+// windowState.restoreMessages(context);
+// Map requestScopeBeans = windowState.getRequestScopeBeans();
+// if(null != requestScopeBeans){
+// context.getExternalContext().getRequestMap().putAll(requestScopeBeans);
+// }
+// }
renderPhase.execute(context);
}
Modified: trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/renderkit/portlet/PortletAjaxViewRootRenderer.java
===================================================================
--- trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/renderkit/portlet/PortletAjaxViewRootRenderer.java 2007-10-25 19:03:21 UTC (rev 3551)
+++ trunk/extensions/portlet/src/main/java/org/ajax4jsf/portlet/renderkit/portlet/PortletAjaxViewRootRenderer.java 2007-10-25 19:03:35 UTC (rev 3552)
@@ -23,24 +23,22 @@
public class PortletAjaxViewRootRenderer extends AjaxViewRootRenderer {
protected void doEncodeBegin(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
- Object namespace = context.getExternalContext().getRequestParameterMap().get(AbstractExternalContext.NAMESPACE_PARAMETER);
- Object ajaxRequestParameter = context.getExternalContext().getRequestParameterMap().get(AjaxContainerRenderer.AJAX_PARAMETER_NAME);
- if(!ajaxContext.isAjaxRequest() && null !=namespace && null != ajaxRequestParameter){
- // Navigation case, encode portlet window marker
- writer.startElement(HTML.DIV_ELEM, component);
- writer.writeAttribute(HTML.id_ATTRIBUTE, namespace, HTML.id_ATTRIBUTE);
- }
+ Object namespace = context.getExternalContext().encodeNamespace("");
+ // encode portlet window marker
+ writer.startElement(HTML.DIV_ELEM, component);
+ writer.writeAttribute(HTML.id_ATTRIBUTE, namespace, HTML.id_ATTRIBUTE);
super.doEncodeBegin(writer, context, component);
}
protected void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
super.doEncodeEnd(writer, context, component);
+ // Encode portlet window marker
+ writer.endElement(HTML.DIV_ELEM);
AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
- Object namespace = context.getExternalContext().getRequestParameterMap().get(AbstractExternalContext.NAMESPACE_PARAMETER);
+ Object namespace = context.getExternalContext().encodeNamespace("");
Object ajaxRequestParameter = context.getExternalContext().getRequestParameterMap().get(AjaxContainerRenderer.AJAX_PARAMETER_NAME);
if(!ajaxContext.isAjaxRequest() && null !=namespace && null != ajaxRequestParameter){
- // Navigation case, encode portlet window marker
- writer.endElement(HTML.DIV_ELEM);
+ // Navigation case, set response back to AJAX
ajaxContext.setAjaxRequest(true);
ajaxContext.addRenderedArea(namespace.toString());
AjaxRendererUtils.encodeAreas(context, component);
Modified: trunk/extensions/portlet/src/main/resources/META-INF/faces-config.xml
===================================================================
--- trunk/extensions/portlet/src/main/resources/META-INF/faces-config.xml 2007-10-25 19:03:21 UTC (rev 3551)
+++ trunk/extensions/portlet/src/main/resources/META-INF/faces-config.xml 2007-10-25 19:03:35 UTC (rev 3552)
@@ -23,7 +23,7 @@
override the viewroot
</description>
<component-family>javax.faces.ViewRoot</component-family>
- <renderer-type>javax.faces.ViewRoot</renderer-type>
+ <renderer-type>org.ajax4jsf.portlet.ViewRoot</renderer-type>
<renderer-class>org.ajax4jsf.portlet.renderkit.portlet.PortletAjaxViewRootRenderer</renderer-class>
</renderer>
</render-kit>
17 years, 2 months
JBoss Rich Faces SVN: r3551 - /.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-10-25 15:03:21 -0400 (Thu, 25 Oct 2007)
New Revision: 3551
Removed:
rich-faces/
Log:
Removed garbage folder
17 years, 2 months
JBoss Rich Faces SVN: r3550 - in trunk/ui/tree/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-10-25 14:49:09 -0400 (Thu, 25 Oct 2007)
New Revision: 3550
Modified:
trunk/ui/tree/src/main/config/component/tree.xml
trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js
Log:
http://jira.jboss.com/jira/browse/RF-1160 fixed
"value" attribute type fixed
Modified: trunk/ui/tree/src/main/config/component/tree.xml
===================================================================
--- trunk/ui/tree/src/main/config/component/tree.xml 2007-10-25 18:38:59 UTC (rev 3549)
+++ trunk/ui/tree/src/main/config/component/tree.xml 2007-10-25 18:49:09 UTC (rev 3550)
@@ -115,7 +115,7 @@
</property>
<property>
<name>value</name>
- <classname>java.lang.String</classname>
+ <classname>java.lang.Object</classname>
<description>The current value for this component</description>
</property>
<property>
Modified: trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js
===================================================================
--- trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js 2007-10-25 18:38:59 UTC (rev 3549)
+++ trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js 2007-10-25 18:49:09 UTC (rev 3550)
@@ -32,10 +32,6 @@
this.eventMouseOut = this.processMouseOut.bindAsEventListener(this);
this.eventMouseOver = this.processMouseOver.bindAsEventListener(this);
- if (this.onContextMenu) {
- this.eventRightClick = this.onContextMenu.bindAsEventListener();
- }
-
this.observeEvents(element);
},
@@ -63,12 +59,20 @@
eIcon = cells[this.elementID.icon];
eText = cells[this.elementID.text];
}
+
if (eIcon) {
+ var contextMenu = Richfaces.getNSAttribute("oncontextmenu", eIcon);
+ if (contextMenu && contextMenu.length > 0) {
+ this.onContextMenu = new Function("event", contextMenu + "; return true;").bindAsEventListener(this);
+ }
+ }
+
+ if (eIcon) {
Event.observe(eIcon, "mousedown", this.eventSelectionClick);
Event.observe(eIcon, "mouseout", this.eventMouseOut);
Event.observe(eIcon, "mouseover", this.eventMouseOver);
- if (this.eventRightClick) {
- eIcon.oncontextmenu = this.eventRightClick;
+ if (this.onContextMenu) {
+ eIcon.oncontextmenu = this.onContextMenu;
}
}
if (eText)
@@ -76,8 +80,8 @@
Event.observe(eText, "mousedown", this.eventSelectionClick);
Event.observe(eText, "mouseout", this.eventMouseOut);
Event.observe(eText, "mouseover", this.eventMouseOver);
- if (this.eventRightClick) {
- eText.oncontextmenu = this.eventRightClick;
+ if (this.onContextMenu) {
+ eText.oncontextmenu = this.onContextMenu;
}
}
@@ -92,11 +96,6 @@
getElements: function(element, ajaxUpdate) {
this.childs = [];
- /*var contextMenu = Richfaces.getNSAttribute("oncontextmenu", $(this.elementID.icon));
- if (contextMenu && contextMenu.length > 0) {
- this.onContextMenu = new Function(contextMenu + "; return true;");
- }*/
-
var childsTd = element.nextSibling;//$(this.elementID.children);
if (ajaxUpdate && this.tree.showConnectingLines) {
17 years, 2 months
JBoss Rich Faces SVN: r3549 - management/planning.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-10-25 14:38:59 -0400 (Thu, 25 Oct 2007)
New Revision: 3549
Modified:
management/planning/RichFaces 3.1.3-3.2.0.mpp
Log:
SM Shuttle -> listShuttle
SO Shuttle -> orderingList
Modified: management/planning/RichFaces 3.1.3-3.2.0.mpp
===================================================================
(Binary files differ)
17 years, 2 months
JBoss Rich Faces SVN: r3548 - trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2007-10-25 14:31:45 -0400 (Thu, 25 Oct 2007)
New Revision: 3548
Modified:
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java
Log:
RF-989
Modified: trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java
===================================================================
--- trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java 2007-10-25 17:33:52 UTC (rev 3547)
+++ trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java 2007-10-25 18:31:45 UTC (rev 3548)
@@ -327,15 +327,14 @@
String row_id = null;
+ String baseClientId = grid.getBaseClientId(context);
for (Iterator iter = grid.getChildren().iterator(); iter.hasNext(); ) {
UIComponent kid = (UIComponent) iter.next();
if (kid.isRendered()) {
- if (kid instanceof Column){
- String baseClientId = grid.getBaseClientId(context);
-
+ if (kid instanceof Column){
if(state.isFrozenColumn() && !frozenTRRendered){
state.setFrozenPart(true);
@@ -350,19 +349,9 @@
}else if(!state.isFrozenColumn() && !normalTRRendered){
- if(frozenTRRendered){
- writer.endElement("tr");
- }
-
- state.setFrozenPart(false);
- row_id = baseClientId + ":n:" + state.getRowIndex();
-
- writer.startElement("tr", grid);
- getUtils().writeAttribute(writer,"id",row_id);
- getUtils().writeAttribute(writer, "class","dr-sdt-rb rich-sdt-row" + state.getRowClass(state.getRowIndex()));
- addRowJavascriptEvents(writer, grid);
+ writeNormalTr(frozenTRRendered, state, grid, collection,
+ writer, baseClientId);
normalTRRendered = true;
- collection.add(row_id);
}
@@ -379,17 +368,39 @@
}
}
-
-// if(!state.isFrozenPart()){
-// writer.startElement("td", grid);
-// getUtils().writeAttribute(writer, "class","dr-sdt-bc " + state.getColumnClass(state.getCellIndex()));
-// writer.endElement("td");
-// }
-
+ if(!normalTRRendered){
+ writeNormalTr(frozenTRRendered, state, grid, collection,
+ writer, baseClientId);
+ }
+ writer.startElement("td", grid);
+ getUtils().writeAttribute(writer, "class","dr-sdt-bc rich-sdt-column-cell " + state.getColumnClass(state.getCellIndex()));
+ writer.startElement(HTML.DIV_ELEM, grid);
+ getUtils().writeAttribute(writer, "class","dr-sdt-bcbody");
+ writer.endElement(HTML.DIV_ELEM);
+ writer.endElement("td");
writer.endElement("tr");
state.setCellIndex(0);
state.nextRow();
}
+
+ private void writeNormalTr(boolean frozenTRRendered,
+ ScrollableDataTableRendererState state,
+ UIScrollableDataTable grid, Collection collection,
+ ResponseWriter writer, String baseClientId) throws IOException {
+ String row_id;
+ if(frozenTRRendered){
+ writer.endElement("tr");
+ }
+
+ state.setFrozenPart(false);
+ row_id = baseClientId + ":n:" + state.getRowIndex();
+
+ writer.startElement("tr", grid);
+ getUtils().writeAttribute(writer,"id",row_id);
+ getUtils().writeAttribute(writer, "class","dr-sdt-rb rich-sdt-row" + state.getRowClass(state.getRowIndex()));
+ addRowJavascriptEvents(writer, grid);
+ collection.add(row_id);
+ }
};
// temporary solution RF-957
17 years, 2 months