JBoss Rich Faces SVN: r2337 - trunk/test-applications/jsp/src/main/webapp/Gmap.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2007-08-20 09:10:48 -0400 (Mon, 20 Aug 2007)
New Revision: 2337
Modified:
trunk/test-applications/jsp/src/main/webapp/Gmap/Gmap.jsp
Log:
update
Modified: trunk/test-applications/jsp/src/main/webapp/Gmap/Gmap.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Gmap/Gmap.jsp 2007-08-20 11:30:10 UTC (rev 2336)
+++ trunk/test-applications/jsp/src/main/webapp/Gmap/Gmap.jsp 2007-08-20 13:10:48 UTC (rev 2337)
@@ -70,7 +70,7 @@
<a4j:outputPanel id="zoomer">
<script>
function zoomIt() {
- map.setZoom(</f:verbatim>#{gmap.zoom});
+ map.setZoom(#{gmap.zoom});
}
</script>
</a4j:outputPanel>
18 years, 8 months
JBoss Rich Faces SVN: r2336 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-08-20 07:30:10 -0400 (Mon, 20 Aug 2007)
New Revision: 2336
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml
Log:
http://jira.jboss.com/jira/browse/RF-391
http://jira.jboss.com/jira/browse/RF-389
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml 2007-08-20 11:27:38 UTC (rev 2335)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml 2007-08-20 11:30:10 UTC (rev 2336)
@@ -10,44 +10,21 @@
<section>
<?dbhtml filename="Wherearebinary/sourcedistributionforRichFacesrelease.html"?>
- <title>Where are binary/source distribution for RichFaces 3.0.1 release?</title>
- <para> JBoss RichFaces downloads could be found <ulink
- url="http://labs.jboss.com/jbossrichfaces/downloads">here</ulink>. </para>
- <para> The version is tagged in SVN and put in the Jboss Maven <ulink
- url="http://repository.jboss.com/maven2/org/richfaces/richfaces/3.0.1/"
- >repo</ulink>.</para>
- <para> Ajax4jsf binary is also available <ulink
- url="http://jboss.com/index.html?module=bb&op=viewtopic&t=110267"
+ <title>Where are binary/source distribution for RichFaces 3.1.0 release?</title>
+ <para>Information about RichFaces 3.1.0 release can be found <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=116231"
>here</ulink>.</para>
<para> Most important links for RichFaces can be found <ulink
url="http://jboss.com/index.html?module=bb&op=viewtopic&t=104575"
>here</ulink>.</para>
</section>
- <section id="Wherearethesnapshots">
- <?dbhtml filename="Wherearethesnapshots.html"?>
- <title>Where are the snapshots?</title>
- <para> Nightly builds are available <ulink
- url="http://maven.exadel.com/org/richfaces/richfaces/3.0.2-SNAPSHOT/"
- >here</ulink> for RichFaces and <ulink
- url="http://maven.exadel.com/org/ajax4jsf/ajax4jsf/1.1.2-SNAPSHOT/"
- >here</ulink> for Ajax.</para>
- <para> RichFaces JSF components library Tag library documentation can be found
- <ulink
- url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
- >here</ulink>.</para>
- <para> RichFaces JSF components library 3.0.2-SNAPSHOT API can be found <ulink
- url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
- >here</ulink>.</para>
- </section>
-
<section>
<?dbhtml filename="HowtobuildRichFacessnapshotmanually.html"?>
<title>How to build RichFaces snapshot manually?</title>
- <para>As it was mentioned <link linkend="Wherearethesnapshots"> before</link> you
- can download the snapshots or you can build them manually. This <ulink
+ <para>This <ulink
url="http://labs.jboss.com/wiki/HowToBuildRichFacesSnapshotManually"
- > wiki article</ulink> helps you.</para>
+ > wiki article</ulink> helps you to find an answer.</para>
</section>
<section>
@@ -69,12 +46,12 @@
<section>
<?dbhtml filename="IstheredemoforRichFacescomponents.html"?>
- <title>Where could I find a demo for RichFaces 3.0.1 components?</title>
+ <title>Where could I find a demo for RichFaces 3.1.0 components?</title>
<para>Online demo Web applications that show the most important functionality of
RichFaces components are available <ulink
url="http://livedemo.exadel.com/richfaces-demo/">here</ulink>.</para>
<para>War file of a nightly build can be found <ulink
- url="http://maven.exadel.com/org/richfaces/richfaces-demo/3.0.1-SNAPSHOT/"
+ url="http://maven.exadel.com/org/richfaces/samples/richfaces-demo/3.1.0-SNAPSHOT/"
>here</ulink>.</para>
<para>Source Code (SVN) can be found <ulink
url="http://anonsvn.jboss.org/repos/richfaces/trunk/samples/richfaces-demo/"
@@ -478,28 +455,28 @@
<para>The answer could be found on the <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060199#..."
>RichFaces Users Forum</ulink>.</para>
- <para>How to use <emphasis role="bold"><rich:dataTable></emphasis> and <emphasis
- role="bold"><rich:dataScroller></emphasis> in a context of Extended
- Data Model see <ulink
+ <para>How to use <emphasis role="bold"><rich:dataTable></emphasis> and
+ <emphasis role="bold"><rich:dataScroller></emphasis>
+ in a context of Extended Data Model see <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=115636"
>here</ulink>.</para>
</section>
- <section id="RerenderingPartPage">
- <?dbhtml filename="RerenderingPartPage.html"?>
- <title>How to reRender only particular row(s) of dataTable?</title>
- <para> If you use dataTable then you may use ajaxKeys attribute to bind the rowKeys to be
- reRendered there. After you need to point reRender on the whole table and only specified
- rows will be reRedered.
- <!--
+ <section id="RerenderingPartPage">
+ <?dbhtml filename="RerenderingPartPage.html"?>
+ <title>How to reRender only particular row(s) of dataTable?</title>
+ <para> If you use dataTable then you may use ajaxKeys attribute to bind the rowKeys
+ to be reRendered there. After you need to point reRender on the whole table
+ and only specified rows will be reRedered.
+ <!--
Also the example of usage of <emphasis role="bold"
><a4j:repeat></emphasis> component are available <ulink
url="http://livedemo.exadel.com/richfaces-demo/richfaces/repeat.jsf?c=repeat">here</ulink>.
-->
- </para>
- </section>
-
-
+ </para>
+ </section>
+
+
<section>
<?dbhtml filename="Howtomakehtmlscrollbars.html"?>
<title>How to make html scrollbars in modalPanel?</title>
@@ -809,13 +786,13 @@
</para>
</section>
- <section id="SeveralStatusOnPage">
- <?dbhtml filename="SeveralStatusOnPage.html"?>
- <title>Can I have several <a4j:status> components on one page?</title>
- <para>Yes, you can. More information about this problem could be found on the <ulink
- url="http://livedemo.exadel.com/richfaces-demo/richfaces/status.jsf?c=status">JBoss RichFaces Online Demos</ulink>.
- </para>
- </section>
+ <section id="SeveralStatusOnPage">
+ <?dbhtml filename="SeveralStatusOnPage.html"?>
+ <title>Can I have several <a4j:status> components on one page?</title>
+ <para>Yes, you can. More information about this problem could be found on the <ulink
+ url="http://livedemo.exadel.com/richfaces-demo/richfaces/status.jsf?c=status"
+ >JBoss RichFaces Online Demos</ulink>. </para>
+ </section>
<section id="SomeProblemsWithRendering">
<?dbhtml filename="SomeProblemsWithRendering.html"?>
@@ -852,10 +829,11 @@
<section id="DisableSkins">
<?dbhtml filename="DisableSkins.html"?>
- <title>How to disable skinability?</title> There is possibility to use special skin
- with name "plain". It doesn't have any parameters. It's necessary for embedding
- RichFaces components into existing projecst which have its own styles. <para>For
- information you can see discussion about this problem on the <ulink
+ <title>How to disable skinability?</title>
+ <para>There is possibility to use special skin with name "plain". It doesn't have
+ any parameters. It's necessary for embedding RichFaces components into
+ existing projecst which have its own styles.</para>
+ <para>For information you can see discussion about this problem on the <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066340#..."
>Ajax4Jsf Users Forum. </ulink>
</para>
18 years, 8 months
JBoss Rich Faces SVN: r2335 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-08-20 07:27:38 -0400 (Mon, 20 Aug 2007)
New Revision: 2335
Modified:
trunk/docs/userguide/en/src/main/docbook/included/actionparam.xml
trunk/docs/userguide/en/src/main/docbook/included/htmlCommandLink.xml
trunk/docs/userguide/en/src/main/docbook/included/portlet.xml
Log:
http://jira.jboss.com/jira/browse/RF-623
Modified: trunk/docs/userguide/en/src/main/docbook/included/actionparam.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/actionparam.xml 2007-08-20 08:47:00 UTC (rev 2334)
+++ trunk/docs/userguide/en/src/main/docbook/included/actionparam.xml 2007-08-20 11:27:38 UTC (rev 2335)
@@ -15,18 +15,12 @@
<entry>component-type</entry>
<entry>org.ajax4jsf.ActionParameter</entry>
</row>
+
<row>
- <entry>component-family</entry>
- <entry> </entry>
- </row>
- <row>
<entry>component-class</entry>
<entry>org.ajax4jsf.component.html.HtmlActionParameter</entry>
</row>
- <row>
- <entry>renderer-type</entry>
- <entry> </entry>
- </row>
+
</tbody>
</tgroup>
</table>
Modified: trunk/docs/userguide/en/src/main/docbook/included/htmlCommandLink.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/htmlCommandLink.xml 2007-08-20 08:47:00 UTC (rev 2334)
+++ trunk/docs/userguide/en/src/main/docbook/included/htmlCommandLink.xml 2007-08-20 11:27:38 UTC (rev 2335)
@@ -49,7 +49,7 @@
</para>
<programlisting role="JAVA"><![CDATA[import javax.faces.component.html.HtmlCommandLink;
...
-HtmlCommandLink myForm = new HtmlCommandLink();
+HtmlCommandLink myCommandLink = new HtmlCommandLink();
...
]]></programlisting>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/portlet.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/portlet.xml 2007-08-20 08:47:00 UTC (rev 2334)
+++ trunk/docs/userguide/en/src/main/docbook/included/portlet.xml 2007-08-20 11:27:38 UTC (rev 2335)
@@ -23,11 +23,7 @@
<entry>component-class</entry>
<entry>org.ajax4jsf.component.html.HtmlPortlet</entry>
</row>
- <row>
- <entry>renderer-type</entry>
- <entry></entry>
- </row>
- </tbody>
+ </tbody>
</tgroup>
</table>
@@ -45,9 +41,9 @@
<section>
<title>Dynamical creation of a component from Java code</title>
<programlisting role="JAVA"><![CDATA[
-import org.ajax4jsf.ajax.component.UIPortlet;
+import org.ajax4jsf.component.html.HtmlPortlet;
...
-UIPortlet myPortlet = new UIPortlet();
+HtmlPortlet myPortlet = new HtmlPortlet();
...]]></programlisting>
</section>
18 years, 8 months
JBoss Rich Faces SVN: r2334 - trunk/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-08-20 04:47:00 -0400 (Mon, 20 Aug 2007)
New Revision: 2334
Added:
trunk/docs/userguide/en/src/main/resources/images/insert.png
Log:
http://jira.jboss.com/jira/browse/RF-589
Added: trunk/docs/userguide/en/src/main/resources/images/insert.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/insert.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
18 years, 8 months
JBoss Rich Faces SVN: r2333 - trunk/framework/impl/src/main/java/org/ajax4jsf/resource.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-08-19 11:57:38 -0400 (Sun, 19 Aug 2007)
New Revision: 2333
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/TemplateCSSRenderer.java
Log:
org.ajax4jsf.resource.TemplateCSSRenderer.getTemplate(InternetResource, ResourceContext) made synchronized
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/resource/TemplateCSSRenderer.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/resource/TemplateCSSRenderer.java 2007-08-18 00:55:26 UTC (rev 2332)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/resource/TemplateCSSRenderer.java 2007-08-19 15:57:38 UTC (rev 2333)
@@ -94,7 +94,7 @@
* @return
* @throws IOException
*/
- public PreparedTemplate getTemplate(InternetResource base, ResourceContext context) throws IOException {
+ public synchronized PreparedTemplate getTemplate(InternetResource base, ResourceContext context) throws IOException {
PreparedTemplate template;
// if(base.isCacheable()){
template = (PreparedTemplate) base.getProperty(COMPILED_TEMPLATE_PROPERTY);
18 years, 8 months
JBoss Rich Faces SVN: r2332 - in trunk/samples/richfaces-demo/src/main: java/org/richfaces/demo/wizard and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: SergeySmirnov
Date: 2007-08-17 20:55:26 -0400 (Fri, 17 Aug 2007)
New Revision: 2332
Added:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/wizard/
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/wizard/Profile.java
trunk/samples/richfaces-demo/src/main/webapp/richfaces/include.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/
trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/finalStep.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wizard.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wstep1.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wstep2.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/usage.xhtml
Log:
Added: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/wizard/Profile.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/wizard/Profile.java (rev 0)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/wizard/Profile.java 2007-08-18 00:55:26 UTC (rev 2332)
@@ -0,0 +1,33 @@
+package org.richfaces.demo.wizard;
+
+public class Profile {
+ private String firstName;
+ private String lastName;
+ private String company;
+ private String notes;
+
+ public String getCompany() {
+ return company;
+ }
+ public void setCompany(String company) {
+ this.company = company;
+ }
+ public String getFirstName() {
+ return firstName;
+ }
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+ public String getLastName() {
+ return lastName;
+ }
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+ public String getNotes() {
+ return notes;
+ }
+ public void setNotes(String notes) {
+ this.notes = notes;
+ }
+}
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/finalStep.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/finalStep.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/finalStep.xhtml 2007-08-18 00:55:26 UTC (rev 2332)
@@ -0,0 +1,22 @@
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+ <h:panelGrid columns="2" columnClasses="wfcol1">
+ <h:outputText value="First Name:" />
+ <h:outputText value="#{profile.firstName}"/>
+ <h:outputText value="Last Name:" />
+ <h:outputText value="#{profile.lastName}"/>
+ <h:outputText value="Company:" />
+ <h:outputText value="#{profile.company}"/>
+ <h:outputText value="Notes:" />
+ <h:outputText value="#{profile.notes}"/>
+
+
+ </h:panelGrid>
+ <a4j:commandButton value="<<Previous" immediate="true" action="previous"/>
+
+</ui:composition>
\ No newline at end of file
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wizard.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wizard.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wizard.xhtml 2007-08-18 00:55:26 UTC (rev 2332)
@@ -0,0 +1,37 @@
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+ <style type="text/css">
+ .col1 { vertical-align:top; }
+ .col2 { vertical-align:top; width:450px; }
+ .wizard { width:400px; }
+ .wform td { vertical-align:top; }
+ .wfcol1 { width:60px; vertical-align:top; }
+ .wfcol2 { vertical-align:top; }
+ .wfcol3 { vertical-align:top; }
+ .s1row td { height:30px; }
+ .rich-message { color:red; }
+ </style>
+
+ <h:panelGrid width="100%" columns="2" columnClasses="col1,col2">
+ <f:verbatim>
+ Additional explanation will be here.
+
+ </f:verbatim>
+ <a4j:keepAlive beanName="profile" />
+ <rich:panel styleClass="wizard">
+ <f:facet name="header">
+ <h:outputText value="Using a4j:include for Wizard-like behaviour" />
+ </f:facet>
+ <h:form>
+ <a4j:include viewId="/richfaces/include/examples/wstep1.xhtml" />
+ </h:form>
+ </rich:panel>
+
+ </h:panelGrid>
+
+</ui:composition>
\ No newline at end of file
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wstep1.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wstep1.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wstep1.xhtml 2007-08-18 00:55:26 UTC (rev 2332)
@@ -0,0 +1,24 @@
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+ <h:panelGrid rowClasses="s1row" columns="3" columnClasses="wfcol1,wfcol2,wfcol3">
+ <h:outputText value="First Name:" />
+ <h:inputText id="fn" value="#{profile.firstName}" label="First Name" required="true" />
+ <rich:message for="fn" />
+
+ <h:outputText value="Last Name:" />
+ <h:inputText id="ln" value="#{profile.lastName}" label="Last Name" required="true" />
+ <rich:message for="ln" />
+
+ <h:outputText value="Company:" />
+ <h:inputText id="comp" value="#{profile.company}" label="Company" required="true" />
+ <rich:message for="comp"/>
+
+ </h:panelGrid>
+ <a4j:commandButton value="Next >>" action="next"/>
+
+</ui:composition>
\ No newline at end of file
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wstep2.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wstep2.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wstep2.xhtml 2007-08-18 00:55:26 UTC (rev 2332)
@@ -0,0 +1,18 @@
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+ <h:panelGrid columns="3" columnClasses="wfcol1,wfcol2,wfcol3">
+ <h:outputText value="Notes:" />
+ <h:inputTextarea cols="20" rows="4" id="notes" value="#{profile.notes}" label="Notes" required="true" />
+ <rich:message for="notes" />
+
+
+ </h:panelGrid>
+ <a4j:commandButton value="<<Previous" immediate="true" action="previous"/>
+ <a4j:commandButton value="Next >>" action="next"/>
+
+</ui:composition>
\ No newline at end of file
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/usage.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/usage.xhtml 2007-08-18 00:55:26 UTC (rev 2332)
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+<ui:composition template="/templates/component-sample.xhtml">
+ <ui:define name="sample">
+
+
+ <p>a4j:include functionality is equal to the facelets' ui:include functionality, plus, enables the
+ partial page navigation in Ajax mode. The standard JSF navigation rules are used to define the
+ navigation between the view.
+ </p>
+ <p>
+ <b>viewId</b> attribute specify the view id of the page that will be included. It should be
+ the full context-relative path of the resource in order to use as from-view and to-view in the
+ JSF navigation cases. The following demo shows the example of three-steps wizard created
+ using a4j:include:
+ </p>
+
+ <div class="sample-container">
+ <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"/>
+ <ui:param name="openlabel" value="View Page Source" />
+ </ui:include>
+
+ </div>
+
+ <p>
+ The Ajax command component (button, link, jsFunction, etc) should be located inside the
+ a4j:include in order to having a partial navigation. When the navigation
+ performs, the part of the component tree content is replaced with the content of view given
+ by navigation rule.
+ </p>
+ <p> The content of the a4j:include is not isolated from the whole view. You can point to the other
+ parts of of the view with reRender if you want to update them while you navigate inside the
+ a4j:include.
+ </p>
+
+
+ </ui:define>
+
+</ui:composition>
+</html>
Added: trunk/samples/richfaces-demo/src/main/webapp/richfaces/include.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/include.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/include.xhtml 2007-08-18 00:55:26 UTC (rev 2332)
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:rich="http://richfaces.org/rich">
+<ui:composition template="/templates/main.xhtml">
+ <ui:define name="title">RichFaces - Open Source Rich JSF Components - Include</ui:define>
+ <ui:define name="body">
+ <rich:tabPanel switchType="server" styleClass="top_tab" contentClass="content_tab" headerClass="header_tabs_class" inactiveTabClass="inactive_tab" activeTabClass="active_tab">
+ <rich:tab label="Usage">
+ <ui:include src="/richfaces/include/usage.xhtml"/>
+ </rich:tab>
+ </rich:tabPanel>
+ </ui:define>
+</ui:composition>
+</html>
18 years, 8 months
JBoss Rich Faces SVN: r2331 - in trunk/samples/richfaces-demo/src/main: webapp/WEB-INF and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: SergeySmirnov
Date: 2007-08-17 20:53:48 -0400 (Fri, 17 Aug 2007)
New Revision: 2331
Removed:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/effect/source/
Modified:
trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties
trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml.l4t
Log:
demo updates
Modified: trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties
===================================================================
--- trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties 2007-08-18 00:53:12 UTC (rev 2330)
+++ trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties 2007-08-18 00:53:48 UTC (rev 2331)
@@ -55,7 +55,7 @@
loadScript= ajaxResources, Script, /images/ico_common.gif, /images/cn_Script.gif, RichFacesComponentsLibrary.html#loadScript, jbossajax4jsf/freezone/docs/tlddoc/a4j/loadScript.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIResource.html, /richfaces/script.jsf
loadStyle= ajaxResources, Style, /images/ico_common.gif, /images/cn_Style.gif, RichFacesComponentsLibrary.html#loadStyle, jbossajax4jsf/freezone/docs/tlddoc/a4j/loadStyle.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIResource.html, /richfaces/style.jsf
keepAlive= ajaxResources, Keep Alive, /images/ico_common.gif, /images/cn_KeepAlive.gif, RichFacesComponentsLibrary.html#keepAlive, jbossajax4jsf/freezone/docs/tlddoc/a4j/keepAlive.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/taglib/html/jsp/KeepAliveTag.html, /richfaces/keepAlive.jsf
-include= ajaxOutput, Include, /images/ico_common.gif, /images/cn_Include.gif, RichFacesComponentsLibrary.html#include, jbossajax4jsf/freezone/docs/tlddoc/a4j/include.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIInclude.html, /richfaces/comingSoon.jsf
+include= ajaxOutput, Include, /images/ico_common.gif, /images/cn_include.gif, RichFacesComponentsLibrary.html#include, jbossajax4jsf/freezone/docs/tlddoc/a4j/include.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIInclude.html, /richfaces/include.jsf
mediaOutput= ajaxOutput, Media Output, /images/ico_common.gif, /images/cn_MediaOutput.gif, RichFacesComponentsLibrary.html#mediaOutput, jbossajax4jsf/freezone/docs/tlddoc/a4j/mediaOutput.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/resource/UIMediaOutput.html, /richfaces/comingSoon.jsf
outputPanel= ajaxOutput, Output Panel, /images/ico_common.gif, /images/cn_OutputPanel.gif, RichFacesComponentsLibrary.html#outputPanel, jbossajax4jsf/freezone/docs/tlddoc/a4j/outputPanel.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIAjaxOutputPanel.html, /richfaces/outputPanel.jsf
repeat= richDataIterators, Repeat, /images/ico_common.gif, /images/cn_Repeat.gif, RichFacesComponentsLibrary.html#repeat, jbossajax4jsf/freezone/docs/tlddoc/a4j/repeat.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/repeat/UIRepeat.html, /richfaces/comingSoon.jsf
Modified: trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2007-08-18 00:53:12 UTC (rev 2330)
+++ trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2007-08-18 00:53:48 UTC (rev 2331)
@@ -18,6 +18,11 @@
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
+ <managed-bean-name>profile</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.wizard.Profile</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
<managed-bean-name>userBean</managed-bean-name>
<managed-bean-class>org.richfaces.demo.ajaxsupport.UserBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
@@ -199,4 +204,30 @@
<managed-bean-class>org.richfaces.demo.extendeddatamodel.AuctionDataProvider</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
+ <navigation-rule>
+ <from-view-id>/richfaces/include/examples/wstep1.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>next</from-outcome>
+ <to-view-id>/richfaces/include/examples/wstep2.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/richfaces/include/examples/wstep2.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>previous</from-outcome>
+ <to-view-id>/richfaces/include/examples/wstep1.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>next</from-outcome>
+ <to-view-id>/richfaces/include/examples/finalStep.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/richfaces/include/examples/finalStep.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>previous</from-outcome>
+ <to-view-id>/richfaces/include/examples/wstep2.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
</faces-config>
Modified: trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml.l4t
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml.l4t 2007-08-18 00:53:12 UTC (rev 2330)
+++ trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml.l4t 2007-08-18 00:53:48 UTC (rev 2331)
@@ -1,2 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
-<PROCESS ENTITY="JSFProcess"/>
+<PROCESS ENTITY="JSFProcess">
+ <PROCESS-ITEM ENTITY="JSFProcessGroup"
+ NAME="rules:#richfaces#include#examples#wstep1.xhtml"
+ PATH="/richfaces/include/examples/wstep1.xhtml" SHAPE="32,17,0,0">
+ <PROCESS-ITEM ENTITY="JSFProcessItem"
+ ID="rules:#richfaces#include#examples#wstep1.xhtml:0" NAME="item" PATH="/richfaces/include/examples/wstep1.xhtml">
+ <PROCESS-ITEM-OUTPUT ENTITY="JSFProcessItemOutput"
+ ID="next::#richfaces#include#examples#wstep2.xhtml" NAME="output"
+ PATH="/richfaces/include/examples/wstep2.xhtml"
+ TARGET="rules:#richfaces#include#examples#wstep2.xhtml" TITLE="next"/>
+ </PROCESS-ITEM>
+ </PROCESS-ITEM>
+ <PROCESS-ITEM ENTITY="JSFProcessGroup"
+ NAME="rules:#richfaces#include#examples#wstep2.xhtml"
+ PATH="/richfaces/include/examples/wstep2.xhtml" SHAPE="256,33,0,0">
+ <PROCESS-ITEM ENTITY="JSFProcessItem"
+ ID="rules:#richfaces#include#examples#wstep2.xhtml:0" NAME="item" PATH="/richfaces/include/examples/wstep2.xhtml">
+ <PROCESS-ITEM-OUTPUT ENTITY="JSFProcessItemOutput"
+ ID="previous::#richfaces#include#examples#wstep1.xhtml"
+ NAME="output" PATH="/richfaces/include/examples/wstep1.xhtml"
+ TARGET="rules:#richfaces#include#examples#wstep1.xhtml" TITLE="previous"/>
+ <PROCESS-ITEM-OUTPUT ENTITY="JSFProcessItemOutput"
+ ID="next::#richfaces#include#examples#finalStep.xhtml"
+ NAME="output1" PATH="/richfaces/include/examples/finalStep.xhtml"
+ TARGET="rules:#richfaces#include#examples#finalStep.xhtml" TITLE="next"/>
+ </PROCESS-ITEM>
+ </PROCESS-ITEM>
+ <PROCESS-ITEM ENTITY="JSFProcessGroup"
+ NAME="rules:#richfaces#include#examples#finalStep.xhtml"
+ PATH="/richfaces/include/examples/finalStep.xhtml" SHAPE="480,17,0,0">
+ <PROCESS-ITEM ENTITY="JSFProcessItem"
+ ID="rules:#richfaces#include#examples#finalStep.xhtml:0" NAME="item" PATH="/richfaces/include/examples/finalStep.xhtml">
+ <PROCESS-ITEM-OUTPUT ENTITY="JSFProcessItemOutput"
+ ID="previous::#richfaces#include#examples#wstep2.xhtml"
+ NAME="output" PATH="/richfaces/include/examples/wstep2.xhtml"
+ TARGET="rules:#richfaces#include#examples#wstep2.xhtml" TITLE="previous"/>
+ </PROCESS-ITEM>
+ </PROCESS-ITEM>
+</PROCESS>
18 years, 8 months
JBoss Rich Faces SVN: r2330 - in trunk: samples/seamEAR and 11 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-08-17 20:53:12 -0400 (Fri, 17 Aug 2007)
New Revision: 2330
Added:
trunk/samples/seamEAR/ear/src/
trunk/samples/seamEAR/ear/src/main/
trunk/samples/seamEAR/ear/src/main/application/
trunk/samples/seamEAR/ear/src/main/application/META-INF/
trunk/samples/seamEAR/ear/src/main/application/META-INF/jboss-app.xml
trunk/samples/seamEAR/ejbs/src/main/resources/META-INF/persistence.xml
trunk/samples/seamEAR/ejbs/src/main/resources/import.sql
trunk/samples/seamEAR/ejbs/src/main/resources/seam.properties
Modified:
trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
trunk/samples/seamEAR/ear/pom.xml
trunk/samples/seamEAR/ejbs/pom.xml
trunk/samples/seamEAR/ejbs/src/main/resources/META-INF/ejb-jar.xml
trunk/samples/seamEAR/pom.xml
trunk/samples/seamEAR/wars/seamWebapp/pom.xml
trunk/samples/seamEAR/wars/seamWebapp/src/main/webapp/WEB-INF/components.xml
trunk/samples/seamEAR/wars/seamWebapp/src/main/webapp/WEB-INF/web.xml
trunk/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml
Log:
Set seam enterprise application example worked.
Modified: trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
===================================================================
--- trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2007-08-17 22:43:26 UTC (rev 2329)
+++ trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2007-08-18 00:53:12 UTC (rev 2330)
@@ -712,7 +712,7 @@
A4J.AJAX.replaceViewState(inputs,newinputs);
}
- if (typeof Event != "undefined" && typeof Event.unloadElementsCache === "function") {
+ if ((typeof Event != "undefined") && (typeof Event.unloadElementsCache === "function")) {
Event.unloadElementsCache();
}
Modified: trunk/samples/seamEAR/ear/pom.xml
===================================================================
--- trunk/samples/seamEAR/ear/pom.xml 2007-08-17 22:43:26 UTC (rev 2329)
+++ trunk/samples/seamEAR/ear/pom.xml 2007-08-18 00:53:12 UTC (rev 2330)
@@ -16,20 +16,14 @@
<dependencies>
<dependency>
<groupId>org.richfaces.framework</groupId>
- <artifactId>richfaces-impl</artifactId>
- <version>3.1.0-SNAPSHOT</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.richfaces.ui</groupId>
- <artifactId>core</artifactId>
- <version>3.1.0-SNAPSHOT</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-api</artifactId>
<version>3.1.0-SNAPSHOT</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.richfaces.samples.seamEAR</groupId>
@@ -63,12 +57,21 @@
<systemPath>${seamHome}/jboss-seam.jar</systemPath>
<scope>system</scope>
</dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-el</artifactId>
+ <version>2.0.0.BETA</version>
+ <systemPath>${seamHome}/lib/jboss-el.jar</systemPath>
+ <scope>system</scope>
+ </dependency>
</dependencies>
<build>
+ <finalName>seamEAR</finalName>
<plugins>
<plugin>
<artifactId>maven-ear-plugin</artifactId>
<configuration>
+ <defaultLibBundleDir>lib</defaultLibBundleDir>
<modules>
<jarModule>
<groupId>jboss</groupId>
@@ -76,13 +79,43 @@
<includeInApplicationXml>
true
</includeInApplicationXml>
+ <bundleDir>/</bundleDir>
</jarModule>
+ <ejbModule>
+ <groupId>
+ org.richfaces.samples.seamEAR
+ </groupId>
+ <artifactId>ejbs</artifactId>
+ <bundleDir>/</bundleDir>
+ </ejbModule>
+ <jarModule>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-el</artifactId>
+ <bundleDir>lib</bundleDir>
+ </jarModule>
+ <jarModule>
+ <groupId>org.richfaces.framework</groupId>
+ <artifactId>richfaces-api</artifactId>
+ <includeInApplicationXml>
+ true
+ </includeInApplicationXml>
+ <bundleDir>/</bundleDir>
+ </jarModule>
</modules>
- <archive>
+ <!--
+ <archive>
<manifest>
- <addClasspath>true</addClasspath>
+ <addClasspath>true</addClasspath>
</manifest>
- </archive>
+ </archive>
+ --><!--
+ <jboss>
+ <version>4.2</version>
+ <loader-repository>
+ seam.jboss.org:loader=seamEAR
+ </loader-repository>
+ </jboss>
+ -->
<version>5</version>
</configuration>
</plugin>
Added: trunk/samples/seamEAR/ear/src/main/application/META-INF/jboss-app.xml
===================================================================
--- trunk/samples/seamEAR/ear/src/main/application/META-INF/jboss-app.xml (rev 0)
+++ trunk/samples/seamEAR/ear/src/main/application/META-INF/jboss-app.xml 2007-08-18 00:53:12 UTC (rev 2330)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE jboss-app
+ PUBLIC "-//JBoss//DTD J2EE Application 4.2//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-app_4_2.dtd">
+
+<jboss-app>
+ <loader-repository>
+ seam.jboss.org:loader=seamEAR
+ </loader-repository>
+</jboss-app>
\ No newline at end of file
Property changes on: trunk/samples/seamEAR/ear/src/main/application/META-INF/jboss-app.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author
Modified: trunk/samples/seamEAR/ejbs/pom.xml
===================================================================
--- trunk/samples/seamEAR/ejbs/pom.xml 2007-08-17 22:43:26 UTC (rev 2329)
+++ trunk/samples/seamEAR/ejbs/pom.xml 2007-08-18 00:53:12 UTC (rev 2330)
@@ -1,38 +1,42 @@
-<project>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces.samples.seamEAR</groupId>
- <artifactId>ejbs</artifactId>
- <packaging>ejb</packaging>
- <version>3.1.0-SNAPSHOT</version>
- <name>enterprise java beans</name>
- <parent>
- <groupId>org.richfaces.samples</groupId>
- <artifactId>seamEAR</artifactId>
- <version>3.1.0-SNAPSHOT</version>
- </parent>
- <dependencies>
- <dependency>
- <groupId>org.richfaces.samples.seamEAR</groupId>
- <artifactId>primary-source</artifactId>
- </dependency>
- <dependency>
- <groupId>org.richfaces.samples.seamEAR.projects</groupId>
- <artifactId>logging</artifactId>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-ejb-plugin</artifactId>
- <configuration>
- <ejbVersion>3.0</ejbVersion>
- <archive>
- <manifest>
- <addClasspath>true</addClasspath>
- </manifest>
- </archive>
- </configuration>
- </plugin>
- </plugins>
- </build>
+<?xml version="1.0"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces.samples.seamEAR</groupId>
+ <artifactId>ejbs</artifactId>
+ <packaging>ejb</packaging>
+ <version>3.1.0-SNAPSHOT</version>
+ <name>enterprise java beans</name>
+ <parent>
+ <groupId>org.richfaces.samples</groupId>
+ <artifactId>seamEAR</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
+ </parent>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.samples.seamEAR</groupId>
+ <artifactId>primary-source</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.samples.seamEAR.projects</groupId>
+ <artifactId>logging</artifactId>
+ </dependency>
+ </dependencies>
+ <build>
+ <finalName>ejbs</finalName>
+ <plugins>
+ <plugin>
+ <artifactId>maven-ejb-plugin</artifactId>
+ <configuration>
+ <ejbVersion>3.0</ejbVersion>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
Modified: trunk/samples/seamEAR/ejbs/src/main/resources/META-INF/ejb-jar.xml
===================================================================
--- trunk/samples/seamEAR/ejbs/src/main/resources/META-INF/ejb-jar.xml 2007-08-17 22:43:26 UTC (rev 2329)
+++ trunk/samples/seamEAR/ejbs/src/main/resources/META-INF/ejb-jar.xml 2007-08-18 00:53:12 UTC (rev 2330)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
+ version="3.0">
+
+ <interceptors>
+ <interceptor>
+ <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
+ </interceptor>
+ </interceptors>
+
+ <assembly-descriptor>
+ <interceptor-binding>
+ <ejb-name>*</ejb-name>
+ <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
+ </interceptor-binding>
+ </assembly-descriptor>
+
+</ejb-jar>
\ No newline at end of file
Added: trunk/samples/seamEAR/ejbs/src/main/resources/META-INF/persistence.xml
===================================================================
--- trunk/samples/seamEAR/ejbs/src/main/resources/META-INF/persistence.xml (rev 0)
+++ trunk/samples/seamEAR/ejbs/src/main/resources/META-INF/persistence.xml 2007-08-18 00:53:12 UTC (rev 2330)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Persistence deployment descriptor for dev profile -->
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
+ version="1.0">
+
+ <persistence-unit name="seamEAR">
+ <provider>org.hibernate.ejb.HibernatePersistence</provider>
+ <jta-data-source>java:/seamEARDatasource</jta-data-source>
+ <properties>
+ <property name="hibernate.hbm2ddl.auto" value="update" />
+ <property name="hibernate.cache.use_query_cache"
+ value="true" />
+ <property name="hibernate.show_sql" value="true" />
+ <property name="jboss.entity.manager.factory.jndi.name"
+ value="java:/seamEAREntityManagerFactory" />
+ </properties>
+ </persistence-unit>
+
+</persistence>
Property changes on: trunk/samples/seamEAR/ejbs/src/main/resources/META-INF/persistence.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author
Added: trunk/samples/seamEAR/ejbs/src/main/resources/import.sql
===================================================================
Added: trunk/samples/seamEAR/ejbs/src/main/resources/seam.properties
===================================================================
Property changes on: trunk/samples/seamEAR/ejbs/src/main/resources/seam.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/samples/seamEAR/pom.xml
===================================================================
--- trunk/samples/seamEAR/pom.xml 2007-08-17 22:43:26 UTC (rev 2329)
+++ trunk/samples/seamEAR/pom.xml 2007-08-18 00:53:12 UTC (rev 2330)
@@ -1,9 +1,14 @@
-<project>
- <parent>
+<?xml version="1.0"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <!--
+ <parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
<version>3.1.0-SNAPSHOT</version>
- </parent>
+ </parent>
+ -->
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<version>3.1.0-SNAPSHOT</version>
Modified: trunk/samples/seamEAR/wars/seamWebapp/pom.xml
===================================================================
--- trunk/samples/seamEAR/wars/seamWebapp/pom.xml 2007-08-17 22:43:26 UTC (rev 2329)
+++ trunk/samples/seamEAR/wars/seamWebapp/pom.xml 2007-08-18 00:53:12 UTC (rev 2330)
@@ -13,6 +13,7 @@
<version>3.1.0-SNAPSHOT</version>
</parent>
<build>
+ <finalName>seamWebapp</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -27,6 +28,9 @@
<includes>
<include>jboss-seam-ui.jar</include>
<include>jboss-seam-debug.jar</include>
+ <include>
+ jboss-seam-remoting.jar
+ </include>
</includes>
</resource>
</webResources>
@@ -47,6 +51,35 @@
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>com.sun.facelets</groupId>
+ <artifactId>jsf-facelets</artifactId>
+ <version>1.1.12</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.1</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <version>1.2_04</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>1.2_04</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>org.richfaces.samples.seamEAR</groupId>
<artifactId>primary-source</artifactId>
<scope>provided</scope>
@@ -112,6 +145,13 @@
</dependency>
<dependency>
<groupId>jboss</groupId>
+ <artifactId>seam-remoting</artifactId>
+ <version>2.0.0.BETA</version>
+ <systemPath>${seamHome}/jboss-seam-remoting.jar</systemPath>
+ <scope>system</scope>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
<artifactId>javassist</artifactId>
<version>3.4.ga</version>
<scope>provided</scope>
Modified: trunk/samples/seamEAR/wars/seamWebapp/src/main/webapp/WEB-INF/components.xml
===================================================================
--- trunk/samples/seamEAR/wars/seamWebapp/src/main/webapp/WEB-INF/components.xml 2007-08-17 22:43:26 UTC (rev 2329)
+++ trunk/samples/seamEAR/wars/seamWebapp/src/main/webapp/WEB-INF/components.xml 2007-08-18 00:53:12 UTC (rev 2330)
@@ -16,7 +16,7 @@
http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.0.xsd
http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd">
- <core:init debug="@debug@" jndi-pattern="seamIntegration/#{ejbName}/local"/>
+ <core:init debug="true" jndi-pattern="seamEAR/#{ejbName}/local"/>
<core:manager concurrent-request-timeout="500"
conversation-timeout="120000"
@@ -24,18 +24,13 @@
<persistence:managed-persistence-context name="entityManager"
auto-create="true"
- entity-manager-factory="#{seamIntegrationEntityManagerFactory}"/>
+ persistence-unit-jndi-name="java:/seamEAREntityManagerFactory"/>
+ <!--
+ <persistence:entity-manager-factory name="seamEAREntityManagerFactory"
+ persistence-unit-name="seamEAR"/>
+ -->
- <persistence:entity-manager-factory name="seamIntegrationEntityManagerFactory"
- persistence-unit-name="seamIntegration"/>
-
- <drools:rule-base name="securityRules">
- <drools:rule-files><value>/security.drl</value></drools:rule-files>
- </drools:rule-base>
-
- <security:identity authenticate-method="#{authenticator.authenticate}"
- security-rules="#{securityRules}"
- remember-me="true"/>
+ <security:identity authenticate-method="#{authenticator.authenticate}"/>
<event type="org.jboss.seam.notLoggedIn">
<action expression="#{redirect.captureCurrentView}"/>
Modified: trunk/samples/seamEAR/wars/seamWebapp/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/samples/seamEAR/wars/seamWebapp/src/main/webapp/WEB-INF/web.xml 2007-08-17 22:43:26 UTC (rev 2329)
+++ trunk/samples/seamEAR/wars/seamWebapp/src/main/webapp/WEB-INF/web.xml 2007-08-18 00:53:12 UTC (rev 2330)
@@ -0,0 +1,81 @@
+<?xml version="1.0" ?>
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <!-- Ajax4jsf -->
+
+ <context-param>
+ <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
+ <param-value>com.sun.facelets.FaceletViewHandler</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>org.ajax4jsf.SKIN</param-name>
+ <param-value>blueSky</param-value>
+ </context-param>
+
+ <!-- Seam -->
+
+ <listener>
+ <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
+ </listener>
+
+ <filter>
+ <filter-name>Seam Filter</filter-name>
+ <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>Seam Filter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <servlet>
+ <servlet-name>Seam Resource Servlet</servlet-name>
+ <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Seam Resource Servlet</servlet-name>
+ <url-pattern>/seam/resource/*</url-pattern>
+ </servlet-mapping>
+
+ <!-- Facelets development mode (disable in production) -->
+
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+
+ <!-- JSF -->
+
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.seam</url-pattern>
+ </servlet-mapping>
+
+ <security-constraint>
+ <display-name>Restrict raw XHTML Documents</display-name>
+ <web-resource-collection>
+ <web-resource-name>XHTML</web-resource-name>
+ <url-pattern>*.xhtml</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>NONE</role-name>
+ </auth-constraint>
+ </security-constraint>
+
+</web-app>
Modified: trunk/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml 2007-08-17 22:43:26 UTC (rev 2329)
+++ trunk/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml 2007-08-18 00:53:12 UTC (rev 2330)
@@ -16,11 +16,12 @@
http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.0.xsd
http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd">
- <core:init debug="@debug@" jndi-pattern="seamIntegration/#{ejbName}/local"/>
+ <core:init debug="true" jndi-pattern="seamIntegration/#{ejbName}/local"/>
<core:manager concurrent-request-timeout="500"
conversation-timeout="120000"
conversation-id-parameter="cid"/>
+ <!--
<persistence:managed-persistence-context name="entityManager"
auto-create="true"
@@ -46,7 +47,7 @@
<mail:mail-session host="localhost" port="2525" username="test" password="test" />
- <!-- For use with jBPM pageflow or process management -->
+ --><!-- For use with jBPM pageflow or process management -->
<!--
<bpm:jbpm>
<bpm:process-definitions></bpm:process-definitions>
18 years, 8 months
JBoss Rich Faces SVN: r2329 - trunk/framework/impl/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-08-17 18:43:26 -0400 (Fri, 17 Aug 2007)
New Revision: 2329
Modified:
trunk/framework/impl/src/main/java/org/richfaces/renderkit/TemplateEncoderRendererBase.java
Log:
http://jira.jboss.com/jira/browse/RF-631 fixed - lazy transformer factory initialization
Modified: trunk/framework/impl/src/main/java/org/richfaces/renderkit/TemplateEncoderRendererBase.java
===================================================================
--- trunk/framework/impl/src/main/java/org/richfaces/renderkit/TemplateEncoderRendererBase.java 2007-08-17 19:11:40 UTC (rev 2328)
+++ trunk/framework/impl/src/main/java/org/richfaces/renderkit/TemplateEncoderRendererBase.java 2007-08-17 22:43:26 UTC (rev 2329)
@@ -35,14 +35,18 @@
*
*/
public abstract class TemplateEncoderRendererBase extends HeaderResourcesRendererBase {
- private TransformerFactory transformerFactory;
+ private static TransformerFactory transformerFactory;
- public TemplateEncoderRendererBase() {
- super();
+ private static TransformerFactory getTransformerFactory() {
+ synchronized (TemplateEncoderRendererBase.class) {
+ if (transformerFactory == null) {
+ transformerFactory = TransformerFactory.newInstance();
+ }
+ }
- transformerFactory = TransformerFactory.newInstance();
+ return transformerFactory;
}
-
+
public final boolean getRendersChildren() {
return true;
}
@@ -71,8 +75,10 @@
try {
Transformer transformer;
- synchronized (transformerFactory) {
- transformer = transformerFactory.newTransformer();
+ TransformerFactory factory = getTransformerFactory();
+
+ synchronized (factory) {
+ transformer = factory.newTransformer();
}
transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
18 years, 8 months
JBoss Rich Faces SVN: r2328 - in trunk: samples/tree-demo/src/main/java/org/richfaces and 8 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-08-17 15:11:40 -0400 (Fri, 17 Aug 2007)
New Revision: 2328
Modified:
trunk/framework/api/src/main/java/org/richfaces/component/Draggable.java
trunk/samples/tree-demo/src/main/java/org/richfaces/Bean.java
trunk/samples/tree-demo/src/main/webapp/pages/index.jsp
trunk/ui/drag-drop/src/main/java/org/richfaces/component/UIDragSupport.java
trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DraggableRendererContributor.java
trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java
trunk/ui/tree/src/main/java/org/richfaces/component/UITreeNode.java
trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item-dnd.js
trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree.js
trunk/ui/tree/src/main/templates/htmlTree.jspx
trunk/ui/tree/src/test/java/org/richfaces/component/TreeComponentTest.java
Log:
- http://jira.jboss.com/jira/browse/RF-629 fixed & JUnit test updated
- treeDemo validation error fixed
Modified: trunk/framework/api/src/main/java/org/richfaces/component/Draggable.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/component/Draggable.java 2007-08-17 17:08:52 UTC (rev 2327)
+++ trunk/framework/api/src/main/java/org/richfaces/component/Draggable.java 2007-08-17 19:11:40 UTC (rev 2328)
@@ -21,6 +21,7 @@
package org.richfaces.component;
+import javax.faces.context.FacesContext;
import javax.faces.el.MethodBinding;
import org.richfaces.event.DragListener;
@@ -52,6 +53,13 @@
*/
public void setDragIndicator(String dragIndicator);
+ /**
+ * Draggable implementation may wish to resolve drag indicator id to clientId itself
+ * @param facesContext {@link FacesContext} instance
+ * @return resolved indicator client id or null
+ * @since 3.1
+ */
+ public String getResolvedDragIndicator(FacesContext facesContext);
/**
* Getter for type of this draggable ( file, mail etc ).
Modified: trunk/samples/tree-demo/src/main/java/org/richfaces/Bean.java
===================================================================
--- trunk/samples/tree-demo/src/main/java/org/richfaces/Bean.java 2007-08-17 17:08:52 UTC (rev 2327)
+++ trunk/samples/tree-demo/src/main/java/org/richfaces/Bean.java 2007-08-17 19:11:40 UTC (rev 2328)
@@ -66,7 +66,7 @@
private String iconLeaf = null;
private String icon = null;
- private String styleClass = "";
+ private String styleClass = "treeIcon16";
private boolean renderFacets = false;
Modified: trunk/samples/tree-demo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/samples/tree-demo/src/main/webapp/pages/index.jsp 2007-08-17 17:08:52 UTC (rev 2327)
+++ trunk/samples/tree-demo/src/main/webapp/pages/index.jsp 2007-08-17 19:11:40 UTC (rev 2328)
@@ -83,7 +83,7 @@
<h:outputText value="Tree icon size:" />
<h:selectOneRadio value="#{bean.styleClass}" onclick="submit()">
- <f:selectItem itemLabel="16x16 (default)" itemValue="" />
+ <f:selectItem itemLabel="16x16 (default)" itemValue="treeIcon16" />
<f:selectItem itemLabel="32x32" itemValue="treeIcon32" />
</h:selectOneRadio>
Modified: trunk/ui/drag-drop/src/main/java/org/richfaces/component/UIDragSupport.java
===================================================================
--- trunk/ui/drag-drop/src/main/java/org/richfaces/component/UIDragSupport.java 2007-08-17 17:08:52 UTC (rev 2327)
+++ trunk/ui/drag-drop/src/main/java/org/richfaces/component/UIDragSupport.java 2007-08-17 19:11:40 UTC (rev 2328)
@@ -21,6 +21,7 @@
package org.richfaces.component;
+import javax.faces.context.FacesContext;
import javax.faces.el.MethodBinding;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.ActionEvent;
@@ -77,4 +78,9 @@
}
}
}
+
+ public String getResolvedDragIndicator(FacesContext facesContext) {
+ return null;
+ }
+
}
Modified: trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DraggableRendererContributor.java
===================================================================
--- trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DraggableRendererContributor.java 2007-08-17 17:08:52 UTC (rev 2327)
+++ trunk/ui/drag-drop/src/main/java/org/richfaces/renderkit/DraggableRendererContributor.java 2007-08-17 19:11:40 UTC (rev 2328)
@@ -140,24 +140,21 @@
options.addOption("parameters", parameters);
- String indicatorId = draggable.getDragIndicator();
-
- if (indicatorId != null) {
- UIComponent indicator = null;
- if (component instanceof NamingContainer) {
- //we're searching in parent component because we're rendering naming containers
- if (component.getParent() != null) {
- indicator = component.getParent().findComponent(indicatorId);
+ String indicatorId = draggable.getResolvedDragIndicator(context);
+ if (indicatorId == null) {
+ String simpleId = draggable.getDragIndicator();
+ if (simpleId != null) {
+ UIComponent indicator = component.findComponent(simpleId);
+ if (indicator != null) {
+ indicatorId = indicator.getClientId(context);
}
- } else {
- indicator = component.findComponent(indicatorId);
}
-
- if (indicator != null) {
- options.addOption("dragIndicator", indicator.getClientId(context));
- }
}
+ if (indicatorId != null) {
+ options.addOption("dragIndicator", indicatorId);
+ }
+
return options;
}
Modified: trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java 2007-08-17 17:08:52 UTC (rev 2327)
+++ trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java 2007-08-17 19:11:40 UTC (rev 2328)
@@ -821,6 +821,19 @@
defaultFacet.setParent(this);
}
}
+
+ public String getResolvedDragIndicator(FacesContext facesContext) {
+ String dragIndicator = getDragIndicator();
+ UIComponent parent = getParent();
+ if (dragIndicator != null && parent != null) {
+ UIComponent indicator = parent.findComponent(dragIndicator);
+ if (indicator != null) {
+ return indicator.getClientId(facesContext);
+ }
+ }
+
+ return null;
+ }
}
Modified: trunk/ui/tree/src/main/java/org/richfaces/component/UITreeNode.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/component/UITreeNode.java 2007-08-17 17:08:52 UTC (rev 2327)
+++ trunk/ui/tree/src/main/java/org/richfaces/component/UITreeNode.java 2007-08-17 19:11:40 UTC (rev 2328)
@@ -34,7 +34,8 @@
private String dragType;
private Object acceptedTypes;
-
+ private String dragIndicator;
+
public static final String COMPONENT_TYPE = "org.richfaces.TreeNode";
public static final String COMPONENT_FAMILY = "org.richfaces.TreeNode";
@@ -307,11 +308,12 @@
}
public Object saveState(FacesContext context) {
- Object[] state = new Object[3];
+ Object[] state = new Object[4];
state[0] = super.saveState(context);
state[1] = this.dragType;
state[2] = this.acceptedTypes;
-
+ state[3] = this.dragIndicator;
+
return state;
}
@@ -320,5 +322,59 @@
super.restoreState(context, _state[0]);
this.dragType = (String) _state[1];
this.acceptedTypes = _state[2];
+ this.dragIndicator = (String) _state[3];
}
+
+ public void setDragIndicator(String dragIndicator) {
+ this.dragIndicator = dragIndicator;
+ }
+
+ protected String getLocalDragIndicator() {
+ if (dragIndicator != null) {
+ return dragIndicator;
+ }
+
+ ValueBinding vb = getValueBinding("dragIndicator");
+ if (vb != null) {
+ return (String) vb.getValue(getFacesContext());
+ }
+
+ return null;
+ }
+
+ public String getDragIndicator() {
+ String localDragIndicator = getLocalDragIndicator();
+ if (localDragIndicator == null) {
+ UITree tree = getUITree();
+ if (tree != null) {
+ return tree.getDragIndicator();
+ } else {
+ return null;
+ }
+ } else {
+ return localDragIndicator;
+ }
+ }
+
+ public String getResolvedDragIndicator(FacesContext facesContext) {
+ String indicatorId = getLocalDragIndicator();
+ UITree tree = getUITree();
+ if (tree != null) {
+ if (indicatorId != null) {
+ //tree is naming container
+ UIComponent parent = tree.getParent();
+ if (parent != null) {
+ UIComponent indicator = parent.findComponent(indicatorId);
+ if (indicator != null) {
+ return indicator.getClientId(facesContext);
+ }
+ }
+ } else {
+ return tree.getResolvedDragIndicator(facesContext);
+ }
+ }
+
+ return null;
+ }
+
}
Modified: trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2007-08-17 17:08:52 UTC (rev 2327)
+++ trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2007-08-17 19:11:40 UTC (rev 2328)
@@ -428,20 +428,6 @@
return buffer.toString();
}
- protected String getDragIndicatorId(FacesContext context, UITree tree) {
- if(tree.getAttributes().get("dragIndicator") instanceof String) {
- String dragIndicator = (String) tree.getAttributes().get("dragIndicator");
- if (dragIndicator != null) {
- UIComponent component = tree.getParent().findComponent(dragIndicator);
- if (component != null) {
- return component.getClientId(context);
- }
- }
- }
-
- return "";
- }
-
protected String getScriptContributions(FacesContext context, UITree tree) {
return super.getScriptContributions(getJavaScriptVarName(context, tree), context, tree);
}
Modified: trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item-dnd.js
===================================================================
--- trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item-dnd.js 2007-08-17 17:08:52 UTC (rev 2327)
+++ trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item-dnd.js 2007-08-17 19:11:40 UTC (rev 2328)
@@ -78,7 +78,9 @@
},
getIndicator: function() {
- var indicator = $(this.tree.dragIndicatorId);
+ var opts = this.getDraggableOptions();
+ var indicatorId = opts ? opts.dragIndicator : null;
+ var indicator = $(indicatorId);
if (!indicator) {
indicator = this.getOrCreateDefaultIndicator();
}
@@ -94,9 +96,6 @@
Object.extend(drag.params, opts.parameters);
}
- var indicator = this.getIndicator();
-
-
this.dragEnter(event);
},
@@ -105,9 +104,17 @@
},
getDraggableOptions: function() {
+ if (window.drag && window.drag.treeDraggableOptions) {
+ return window.drag.treeDraggableOptions;
+ }
+
var attr = Richfaces.getNSAttribute("draggableoptions", $(this.elementID.icon));
if (attr) {
- return attr.parseJSON();
+ var opts = attr.parseJSON();
+ if (window.drag) {
+ window.drag.treeDraggableOptions = opts;
+ }
+ return opts;
}
return null;
Modified: trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree.js
===================================================================
--- trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree.js 2007-08-17 17:08:52 UTC (rev 2327)
+++ trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree.js 2007-08-17 19:11:40 UTC (rev 2328)
@@ -19,13 +19,12 @@
Tree.CLASS_AJAX_SELECTED_LISTENER_FLAG = "ajax_selected_listener_flag";
Tree.prototype = {
- initialize: function(id, input, switchType, events, onAjaxSelect, dragIndicatorId, toggleOnClick) {
+ initialize: function(id, input, switchType, events, onAjaxSelect, toggleOnClick) {
this.childs = [];
this.elements = {};
this.id = id;
this.switchType = switchType;
- this.dragIndicatorId = dragIndicatorId;
this.onselect = new Function('event', (events.onselect ? events.onselect : "") + "; return true;");
this.onexpand = new Function('event', (events.onexpand ? events.onexpand : "") + "; return true;");
this.oncollapse = new Function('event', (events.oncollapse ? events.oncollapse : "") + "; return true;");
Modified: trunk/ui/tree/src/main/templates/htmlTree.jspx
===================================================================
--- trunk/ui/tree/src/main/templates/htmlTree.jspx 2007-08-17 17:08:52 UTC (rev 2327)
+++ trunk/ui/tree/src/main/templates/htmlTree.jspx 2007-08-17 19:11:40 UTC (rev 2328)
@@ -68,7 +68,6 @@
function(event) {
#{this:getAjaxScript(context, component)}
},
- "#{this:getDragIndicatorId(context, component)}",
#{component.toggleOnClick}
);
#{this:getScriptContributions(context, component)}
Modified: trunk/ui/tree/src/test/java/org/richfaces/component/TreeComponentTest.java
===================================================================
--- trunk/ui/tree/src/test/java/org/richfaces/component/TreeComponentTest.java 2007-08-17 17:08:52 UTC (rev 2327)
+++ trunk/ui/tree/src/test/java/org/richfaces/component/TreeComponentTest.java 2007-08-17 19:11:40 UTC (rev 2328)
@@ -28,6 +28,7 @@
import java.util.Set;
import javax.faces.component.UICommand;
+import javax.faces.component.UIComponent;
import javax.faces.component.UIForm;
import javax.faces.component.UIInput;
import javax.faces.component.UIOutput;
@@ -398,13 +399,7 @@
UIOutput output = new UIOutput();
tree.getChildren().add(output);
output.getChildren().add(treeNode2);
- try {
- treeNode2.getUITree();
-
- fail();
- } catch (Exception e) {
- }
-
+ assertSame(tree, treeNode2.getUITree());
UITreeNode treeNode3 = (UITreeNode) application.createComponent(UITreeNode.COMPONENT_TYPE);
assertNull(treeNode3.getUITree());
}
@@ -764,6 +759,48 @@
*/
public final void testGetTreeNodeObject() {
}
+
+ public void testResolveDragIndicator() throws Exception {
+ UIComponent indicator1 = application.createComponent(UIOutput.COMPONENT_TYPE);
+ indicator1.setId("indicator1");
+ form.getChildren().add(indicator1);
+
+ form.setId("form");
+ tree.setId("tree");
+ treeNode.setId("treeNode");
+
+ String indicatorId = indicator1.getClientId(facesContext);
+
+ tree.setDragIndicator("indicator1");
+ assertEquals(indicatorId, treeNode.getResolvedDragIndicator(facesContext));
+
+ tree.setDragIndicator(null);
+ assertNull(treeNode.getResolvedDragIndicator(facesContext));
+
+ treeNode.setDragIndicator("indicator1");
+ assertEquals(indicatorId, treeNode.getResolvedDragIndicator(facesContext));
+
+ treeNode.setDragIndicator(null);
+ assertNull(treeNode.getResolvedDragIndicator(facesContext));
+
+ tree.setDragIndicator("indicator1");
+ treeNode.setDragIndicator("indicator2");
+ assertNull(treeNode.getResolvedDragIndicator(facesContext));
+
+ tree.setDragIndicator("indicator2");
+ treeNode.setDragIndicator("indicator1");
+ assertEquals(indicatorId, treeNode.getResolvedDragIndicator(facesContext));
+ }
+
+ public void testGetDragIndicator() throws Exception {
+ treeNode.setDragIndicator("indicator1");
+ assertEquals("indicator1", treeNode.getDragIndicator());
+ tree.setDragIndicator("indicator2");
+ assertEquals("indicator1", treeNode.getDragIndicator());
+ treeNode.setDragIndicator(null);
+ assertEquals("indicator2", treeNode.getDragIndicator());
+ assertNull(treeNode.getLocalDragIndicator());
+ }
}
18 years, 8 months