JBoss Rich Faces SVN: r6988 - trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/css.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-03-20 08:16:02 -0400 (Thu, 20 Mar 2008)
New Revision: 6988
Modified:
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/css/suggestionbox.xcss
Log:
http://jira.jboss.com/jira/browse/RF-2640
Modified: trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/css/suggestionbox.xcss
===================================================================
--- trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/css/suggestionbox.xcss 2008-03-20 12:05:12 UTC (rev 6987)
+++ trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/css/suggestionbox.xcss 2008-03-20 12:16:02 UTC (rev 6988)
@@ -57,6 +57,10 @@
padding: 1px 3px 1px 5px;
}
+.dr-sb-int {
+ cursor : pointer;
+}
+
</f:verbatim>
<u:selector name=".dr-sb-ext-decor-2">
16 years, 10 months
JBoss Rich Faces SVN: r6987 - in trunk/samples/richfaces-demo/src/main/webapp: richfaces/modalPanel and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-03-20 08:05:12 -0400 (Thu, 20 Mar 2008)
New Revision: 6987
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/mpusage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/modalPanel/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/templates/include/sourceview.xhtml
Log:
RF-2622 Demo site: corrections of Modal Panel demo layout
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/mpusage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/mpusage.xhtml 2008-03-20 09:30:57 UTC (rev 6986)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/mpusage.xhtml 2008-03-20 12:05:12 UTC (rev 6987)
@@ -19,11 +19,10 @@
<h:outputText value="This panel is called using Component Control Component"></h:outputText>
<br/>
<h:outputText value="Closure link (X) works also through Component Control"></h:outputText>
- </rich:modalPanel>
- <rich:spacer height="10px" width="100%"/>
+ </rich:modalPanel>
<h:outputLink value="#" id="link">
Show Modal Panel
<rich:componentControl for="panel" attachTo="link" operation="show" event="onclick"/>
</h:outputLink>
- <rich:spacer height="10px" width="100%"/>
+ <br/><br/><br/>
</f:subview>
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/modalPanel/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/modalPanel/usage.xhtml 2008-03-20 09:30:57 UTC (rev 6986)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/modalPanel/usage.xhtml 2008-03-20 12:05:12 UTC (rev 6987)
@@ -11,32 +11,34 @@
<p>RichFaces Modal Panel is a container that blocks an operation on the base page when the modal
panel is shown.</p>
- <p>You can show the modal panel using the following javascript function: Richfaces.hideModalPanel(id, params).
- For example, this line code invokes the modal panel:
- <a href="javascript:Richfaces.showModalPanel('mp',{width:450, top:200})">
- Richfaces.showModalPanel('mp',{width:450, top:200})</a></p>
- <div class="sample-container">
-
- <ui:include src="/richfaces/modalPanel/examples/simplePanel.xhtml"/>
- <ui:include src="/templates/include/sourceview.xhtml">
- <ui:param name="sourcepath" value="/richfaces/modalPanel/examples/simplePanel.xhtml"/>
- <ui:param name="openlabel" value="View Page Source" />
- </ui:include>
-
- </div>
+ <p>You can show the modal panel using the following javascript function: Richfaces.hideModalPanel(id, params).</p>
+ <fieldset class="demo_fieldset">
+ <legend class="demo_legend">Example 1</legend>
+ <div class="sample-container">
+ This line code invokes the modal panel:<br/>
+ <a href="javascript:Richfaces.showModalPanel('mp',{width:450, top:200})">
+ Richfaces.showModalPanel('mp',{width:450, top:200})</a><br/><br/><br/>
+ <ui:include src="/richfaces/modalPanel/examples/simplePanel.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath" value="/richfaces/modalPanel/examples/simplePanel.xhtml"/>
+ <ui:param name="openlabel" value="View Page Source" />
+ </ui:include>
+ </div>
+ </fieldset>
<p>
Modal Panel could be also managed with <b>rich:componentControl</b> component.
Next example shows the code which should be used:
</p>
- <div class="sample-container">
-
- <ui:include src="/richfaces/componentControl/examples/mpusage.xhtml"/>
- <ui:include src="/templates/include/sourceview.xhtml">
- <ui:param name="sourcepath" value="/richfaces/componentControl/examples/mpusage.xhtml"/>
- <ui:param name="openlabel" value="View Page Source" />
- </ui:include>
-
- </div>
+ <fieldset class="demo_fieldset">
+ <legend class="demo_legend">Example 2</legend>
+ <div class="sample-container">
+ <ui:include src="/richfaces/componentControl/examples/mpusage.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath" value="/richfaces/componentControl/examples/mpusage.xhtml"/>
+ <ui:param name="openlabel" value="View Page Source" />
+ </ui:include>
+ </div>
+ </fieldset>
<p>The modal panel has an absolute layout.There is no reason to put in on the page
where it is called.If you want to perform submits from this modal panel, you should have a separate form inside it.
In this case, the panel must be declared outside of the other form on the same page.
Modified: trunk/samples/richfaces-demo/src/main/webapp/templates/include/sourceview.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/templates/include/sourceview.xhtml 2008-03-20 09:30:57 UTC (rev 6986)
+++ trunk/samples/richfaces-demo/src/main/webapp/templates/include/sourceview.xhtml 2008-03-20 12:05:12 UTC (rev 6987)
@@ -5,10 +5,6 @@
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<ui:composition>
-
-
-
- <rich:spacer height="8" width="100%"/>
<script>
//<![CDATA[
@@ -40,7 +36,7 @@
}
.viewsourcelooklink {
- padding-left: 5px; font-size: 11px; cursor: pointer; color: #7795AF; font-family: Verdana; text-decoration: underline
+ padding-left: 0px; font-size: 11px; cursor: pointer; color: #7795AF; font-family: Verdana; text-decoration: underline
}
.viewsourcehidelink {
16 years, 10 months
JBoss Rich Faces SVN: r6986 - trunk/test-applications/facelets/src/main/webapp/WEB-INF.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2008-03-20 05:30:57 -0400 (Thu, 20 Mar 2008)
New Revision: 6986
Modified:
trunk/test-applications/facelets/src/main/webapp/WEB-INF/web.xml
Log:
org.ajax4jsf.xmlparser.ORDER = none
Modified: trunk/test-applications/facelets/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/WEB-INF/web.xml 2008-03-20 09:30:23 UTC (rev 6985)
+++ trunk/test-applications/facelets/src/main/webapp/WEB-INF/web.xml 2008-03-20 09:30:57 UTC (rev 6986)
@@ -39,6 +39,10 @@
<param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
<param-value>false</param-value>
</context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.xmlparser.ORDER</param-name>
+ <param-value>NONE</param-value>
+</context-param>
<filter>
<display-name>Ajax4jsf Filter</display-name>
<filter-name>ajax4jsf</filter-name>
16 years, 10 months
JBoss Rich Faces SVN: r6985 - trunk/test-applications/jsp/src/main/webapp/WEB-INF.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2008-03-20 05:30:23 -0400 (Thu, 20 Mar 2008)
New Revision: 6985
Modified:
trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml
Log:
org.ajax4jsf.xmlparser.ORDER = none
Modified: trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml 2008-03-19 20:21:02 UTC (rev 6984)
+++ trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml 2008-03-20 09:30:23 UTC (rev 6985)
@@ -26,6 +26,10 @@
<param-name>org.richfaces.CONTROL_SKINNING</param-name>
<param-value>#{skinning.skinning}</param-value>
</context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.xmlparser.ORDER</param-name>
+ <param-value>NONE</param-value>
+ </context-param>
<filter>
<display-name>Ajax4jsf Filter</display-name>
<filter-name>ajax4jsf</filter-name>
16 years, 10 months
JBoss Rich Faces SVN: r6984 - trunk/ui/dataTable/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-03-19 16:21:02 -0400 (Wed, 19 Mar 2008)
New Revision: 6984
Modified:
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
Log:
http://jira.jboss.com/jira/browse/RF-2588
Modified: trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
--- trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2008-03-19 20:06:25 UTC (rev 6983)
+++ trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2008-03-19 20:21:02 UTC (rev 6984)
@@ -612,13 +612,11 @@
org.richfaces.component.UIColumn col =
(org.richfaces.component.UIColumn) column;
if (sortableColumn) {
- if (Ordering.ASCENDING.equals(col.getSortOrder()) ||
- Ordering.DESCENDING.equals(col.getSortOrder())) {
- writer.startElement(HTML.IMG_ELEMENT, column);
- writer.writeAttribute(HTML.src_ATTRIBUTE, spacerUrl, null);
- writer.writeAttribute(HTML.width_ATTRIBUTE, "16", null);
- writer.endElement(HTML.IMG_ELEMENT);
- }
+ writer.startElement(HTML.IMG_ELEMENT, column);
+ writer.writeAttribute(HTML.src_ATTRIBUTE, spacerUrl, null);
+ writer.writeAttribute(HTML.width_ATTRIBUTE, "16", null);
+ writer.endElement(HTML.IMG_ELEMENT);
+
writer.endElement(HTML.SPAN_ELEM);
}
16 years, 10 months
JBoss Rich Faces SVN: r6983 - trunk/ui/dataTable/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-03-19 16:06:25 -0400 (Wed, 19 Mar 2008)
New Revision: 6983
Modified:
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
Log:
http://jira.jboss.com/jira/browse/RF-2585
Modified: trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
--- trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2008-03-19 18:59:24 UTC (rev 6982)
+++ trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2008-03-19 20:06:25 UTC (rev 6983)
@@ -591,6 +591,8 @@
}
writer.startElement(HTML.DIV_ELEM, column);
+ writer.writeAttribute(HTML.id_ATTRIBUTE, clientId + ":sortDiv", null);
+ AjaxContext.getCurrentInstance().addRenderedArea(clientId + ":sortDiv");
if (sortableColumn) {
writer.startElement(HTML.SPAN_ELEM, column);
16 years, 10 months
JBoss Rich Faces SVN: r6982 - trunk/ui/dataTable/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-03-19 14:59:24 -0400 (Wed, 19 Mar 2008)
New Revision: 6982
Modified:
trunk/ui/dataTable/src/main/config/component/dataTable.xml
trunk/ui/dataTable/src/main/config/component/subTable.xml
Log:
http://jira.jboss.com/jira/browse/RF-2033
Modified: trunk/ui/dataTable/src/main/config/component/dataTable.xml
===================================================================
--- trunk/ui/dataTable/src/main/config/component/dataTable.xml 2008-03-19 18:34:47 UTC (rev 6981)
+++ trunk/ui/dataTable/src/main/config/component/dataTable.xml 2008-03-19 18:59:24 UTC (rev 6982)
@@ -110,7 +110,7 @@
<classname>org.ajax4jsf.model.DataComponentState</classname>
<description>It defines EL-binding for a component state for saving or redefinition</description>
</property>
- <property>
+ <property hidden="true" existintag="false" exist="false" >
<name>rowKey</name>
<classname>java.lang.Object</classname>
<description>
@@ -197,6 +197,10 @@
<description>
Defines mode of sorting. Possible values are 'single' for sorting of one column and 'multi' for some.
</description>
+ </property>
+ <property hidden="true" existintag="false" exist="false" >
+ <name>summary</name>
+ <classname>java.lang.Object</classname>
</property>
</component>
</components>
Modified: trunk/ui/dataTable/src/main/config/component/subTable.xml
===================================================================
--- trunk/ui/dataTable/src/main/config/component/subTable.xml 2008-03-19 18:34:47 UTC (rev 6981)
+++ trunk/ui/dataTable/src/main/config/component/subTable.xml 2008-03-19 18:59:24 UTC (rev 6982)
@@ -71,7 +71,7 @@
The attribute provides access to a component state on the client side
</description>
</property>
- <property>
+ <property hidden="true" existintag="false" exist="false" >
<name>rowKey</name>
<classname>java.lang.Object</classname>
<description>
@@ -143,6 +143,10 @@
</property>
<property hidden="true" existintag="false" exist="false" >
<name>filterFields</name>
+ </property>
+ <property hidden="true" existintag="false" exist="false" >
+ <name>summary</name>
+ <classname>java.lang.Object</classname>
</property>
</component>
</components>
16 years, 10 months
JBoss Rich Faces SVN: r6981 - trunk/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: vsukhov
Date: 2008-03-19 14:34:47 -0400 (Wed, 19 Mar 2008)
New Revision: 6981
Removed:
trunk/docs/userguide/en/src/main/resources/images/bg_table.gif
trunk/docs/userguide/en/src/main/resources/images/calendar1.png
trunk/docs/userguide/en/src/main/resources/images/calendar1a.png
trunk/docs/userguide/en/src/main/resources/images/calendar1b.png
trunk/docs/userguide/en/src/main/resources/images/column1.gif
trunk/docs/userguide/en/src/main/resources/images/column2.gif
trunk/docs/userguide/en/src/main/resources/images/column3.gif
trunk/docs/userguide/en/src/main/resources/images/column4.gif
trunk/docs/userguide/en/src/main/resources/images/columngroup1.gif
trunk/docs/userguide/en/src/main/resources/images/columngroup2.gif
trunk/docs/userguide/en/src/main/resources/images/columngroup3.gif
trunk/docs/userguide/en/src/main/resources/images/comboBox1.png
trunk/docs/userguide/en/src/main/resources/images/cursor.png
trunk/docs/userguide/en/src/main/resources/images/dataFilterSlider.gif
trunk/docs/userguide/en/src/main/resources/images/datascroller1.gif
trunk/docs/userguide/en/src/main/resources/images/datascroller2.gif
trunk/docs/userguide/en/src/main/resources/images/datascroller3.gif
trunk/docs/userguide/en/src/main/resources/images/datatable1.gif
trunk/docs/userguide/en/src/main/resources/images/definitionlist1.gif
trunk/docs/userguide/en/src/main/resources/images/dragIndicator1.gif
trunk/docs/userguide/en/src/main/resources/images/dragIndicator2.gif
trunk/docs/userguide/en/src/main/resources/images/draggable1.gif
trunk/docs/userguide/en/src/main/resources/images/dragsupport1.gif
trunk/docs/userguide/en/src/main/resources/images/dropSupport1.gif
trunk/docs/userguide/en/src/main/resources/images/dropSupport2.gif
trunk/docs/userguide/en/src/main/resources/images/dropZone.gif
trunk/docs/userguide/en/src/main/resources/images/gmap.gif
trunk/docs/userguide/en/src/main/resources/images/gmap1.gif
trunk/docs/userguide/en/src/main/resources/images/gmap3.gif
trunk/docs/userguide/en/src/main/resources/images/headers.gif
trunk/docs/userguide/en/src/main/resources/images/ico_important.gif
trunk/docs/userguide/en/src/main/resources/images/ico_note.gif
trunk/docs/userguide/en/src/main/resources/images/ico_tip.gif
trunk/docs/userguide/en/src/main/resources/images/inputNumberSlider.gif
trunk/docs/userguide/en/src/main/resources/images/inputNumberSpinner.gif
trunk/docs/userguide/en/src/main/resources/images/inputNumberSpinner2.gif
trunk/docs/userguide/en/src/main/resources/images/inputNumberSpinner3.gif
trunk/docs/userguide/en/src/main/resources/images/inputNumberSpinnerMain.gif
trunk/docs/userguide/en/src/main/resources/images/menuBar.gif
trunk/docs/userguide/en/src/main/resources/images/modalpanel1.gif
trunk/docs/userguide/en/src/main/resources/images/modalpanel2.gif
trunk/docs/userguide/en/src/main/resources/images/modalpanel3.gif
trunk/docs/userguide/en/src/main/resources/images/modalpanel4.gif
trunk/docs/userguide/en/src/main/resources/images/newpic1.jpg
trunk/docs/userguide/en/src/main/resources/images/newpic2.jpg
trunk/docs/userguide/en/src/main/resources/images/newpic3.jpg
trunk/docs/userguide/en/src/main/resources/images/newpic4.jpg
trunk/docs/userguide/en/src/main/resources/images/orderingList_classes_2.png
trunk/docs/userguide/en/src/main/resources/images/paint2D2.gif
trunk/docs/userguide/en/src/main/resources/images/panel.gif
trunk/docs/userguide/en/src/main/resources/images/panel2.gif
trunk/docs/userguide/en/src/main/resources/images/panel3.gif
trunk/docs/userguide/en/src/main/resources/images/panel4.gif
trunk/docs/userguide/en/src/main/resources/images/panelBar2.gif
trunk/docs/userguide/en/src/main/resources/images/panelBar3.gif
trunk/docs/userguide/en/src/main/resources/images/panelBarItem.gif
trunk/docs/userguide/en/src/main/resources/images/panelBarMain.gif
trunk/docs/userguide/en/src/main/resources/images/panelMain.gif
trunk/docs/userguide/en/src/main/resources/images/recursiveTreeNodesAdaptor1.png
trunk/docs/userguide/en/src/main/resources/images/separator.gif
trunk/docs/userguide/en/src/main/resources/images/separator1.gif
trunk/docs/userguide/en/src/main/resources/images/simpleTogglePanel.gif
trunk/docs/userguide/en/src/main/resources/images/simpleTogglePanel2.gif
trunk/docs/userguide/en/src/main/resources/images/simpleTogglePanel3.gif
trunk/docs/userguide/en/src/main/resources/images/slider.gif
trunk/docs/userguide/en/src/main/resources/images/slider2.gif
trunk/docs/userguide/en/src/main/resources/images/slider3.gif
trunk/docs/userguide/en/src/main/resources/images/slider4.gif
trunk/docs/userguide/en/src/main/resources/images/slider5.gif
trunk/docs/userguide/en/src/main/resources/images/spacer.gif
trunk/docs/userguide/en/src/main/resources/images/subtable1.gif
trunk/docs/userguide/en/src/main/resources/images/subtable2.gif
trunk/docs/userguide/en/src/main/resources/images/suggestionbox1.gif
trunk/docs/userguide/en/src/main/resources/images/suggestionbox2.gif
trunk/docs/userguide/en/src/main/resources/images/suggestionbox3.gif
trunk/docs/userguide/en/src/main/resources/images/suggestionbox4.gif
trunk/docs/userguide/en/src/main/resources/images/suggestionbox5.gif
trunk/docs/userguide/en/src/main/resources/images/tab.gif
trunk/docs/userguide/en/src/main/resources/images/tab2.gif
trunk/docs/userguide/en/src/main/resources/images/tabPanel.gif
trunk/docs/userguide/en/src/main/resources/images/tabPanel1.gif
trunk/docs/userguide/en/src/main/resources/images/tabPanel2.gif
trunk/docs/userguide/en/src/main/resources/images/tabPanel4.gif
trunk/docs/userguide/en/src/main/resources/images/toggleControl.gif
trunk/docs/userguide/en/src/main/resources/images/togglePanel.gif
trunk/docs/userguide/en/src/main/resources/images/toolBar2.gif
trunk/docs/userguide/en/src/main/resources/images/toolBar3.gif
trunk/docs/userguide/en/src/main/resources/images/toolBarMain.gif
trunk/docs/userguide/en/src/main/resources/images/toolbarGroup.gif
trunk/docs/userguide/en/src/main/resources/images/tree1.gif
trunk/docs/userguide/en/src/main/resources/images/tree2.gif
trunk/docs/userguide/en/src/main/resources/images/tree3.png
trunk/docs/userguide/en/src/main/resources/images/treeNode.gif
trunk/docs/userguide/en/src/main/resources/images/treeNodeStyle.png
trunk/docs/userguide/en/src/main/resources/images/welcome.PNG
Log:
http://jira.jboss.com/jira/browse/RF-2561 I've deleted unusable images
Deleted: trunk/docs/userguide/en/src/main/resources/images/bg_table.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/calendar1.png
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/calendar1a.png
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/calendar1b.png
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/column1.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/column2.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/column3.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/column4.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/columngroup1.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/columngroup2.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/columngroup3.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/comboBox1.png
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/cursor.png
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/dataFilterSlider.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/datascroller1.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/datascroller2.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/datascroller3.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/datatable1.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/definitionlist1.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/dragIndicator1.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/dragIndicator2.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/draggable1.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/dragsupport1.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/dropSupport1.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/dropSupport2.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/dropZone.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/gmap.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/gmap1.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/gmap3.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/headers.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/ico_important.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/ico_note.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/ico_tip.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/inputNumberSlider.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/inputNumberSpinner.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/inputNumberSpinner2.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/inputNumberSpinner3.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/inputNumberSpinnerMain.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/menuBar.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/modalpanel1.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/modalpanel2.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/modalpanel3.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/modalpanel4.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/newpic1.jpg
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/newpic2.jpg
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/newpic3.jpg
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/newpic4.jpg
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/orderingList_classes_2.png
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/paint2D2.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/panel.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/panel2.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/panel3.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/panel4.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/panelBar2.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/panelBar3.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/panelBarItem.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/panelBarMain.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/panelMain.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/recursiveTreeNodesAdaptor1.png
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/separator.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/separator1.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/simpleTogglePanel.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/simpleTogglePanel2.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/simpleTogglePanel3.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/slider.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/slider2.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/slider3.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/slider4.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/slider5.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/spacer.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/subtable1.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/subtable2.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/suggestionbox1.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/suggestionbox2.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/suggestionbox3.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/suggestionbox4.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/suggestionbox5.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/tab.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/tab2.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/tabPanel.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/tabPanel1.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/tabPanel2.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/tabPanel4.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/toggleControl.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/togglePanel.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/toolBar2.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/toolBar3.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/toolBarMain.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/toolbarGroup.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/tree1.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/tree2.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/tree3.png
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/treeNode.gif
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/treeNodeStyle.png
===================================================================
(Binary files differ)
Deleted: trunk/docs/userguide/en/src/main/resources/images/welcome.PNG
===================================================================
(Binary files differ)
16 years, 10 months
JBoss Rich Faces SVN: r6980 - in trunk/docs/userguide/en/src/main: resources/images and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: cluts
Date: 2008-03-19 14:26:03 -0400 (Wed, 19 Mar 2008)
New Revision: 6980
Modified:
trunk/docs/userguide/en/src/main/docbook/included/column.xml
trunk/docs/userguide/en/src/main/resources/images/columnsort3.png
Log:
RF-1740 - Sorting:updated screen;
Filtering: added new information.
Modified: trunk/docs/userguide/en/src/main/docbook/included/column.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/column.xml 2008-03-19 18:20:28 UTC (rev 6979)
+++ trunk/docs/userguide/en/src/main/docbook/included/column.xml 2008-03-19 18:26:03 UTC (rev 6980)
@@ -290,6 +290,56 @@
</imageobject>
</mediaobject>
</figure>
+ <para><emphasis><property>"sortPriority"</property></emphasis> attribute is defined in the <emphasis role="bold"><property>rich:dataTable</property></emphasis> component which should be defined as set of column ids in the order the columns should be set.</para>
+ <para>If the columns sort order changed externally – sort priorities should be used to define which columns will be sorted first.</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:dataTable value="#{dataTableScrollerBean.allCars}"
+ var="category" rows="30" id="table"
+ sortPriority="#{sortingBean.prioritList}">
+ <rich:column id="make" sortBy="#{category.make}" sortOrder="#{sortingBean.makeDirection}" selfSorted="false">
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Make" />
+ </f:facet>
+ <h:outputText value="#{category.make}" />
+ </rich:column>
+ <rich:column id="model" sortBy="#{category.model}" sortOrder="#{sortingBean.modelDirection}" selfSorted="false">
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Model" />
+ </f:facet>
+ <h:outputText value="#{category.model}" />
+ </rich:column>
+ <rich:column id="price" sortBy="#{category.price}" sortOrder="#{sortingBean.priceDirection}" selfSorted="false">
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Price" />
+ </f:facet>
+ <h:outputText value="#{category.price}" />
+ </rich:column>
+ <rich:column id="mileage" sortBy="#{category.mileage}" sortOrder="#{sortingBean.mileageDirection}" selfSorted="false">
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Mileage" />
+ </f:facet>
+ <h:outputText value="#{category.mileage}" />
+ </rich:column>
+ <rich:column width="200px" id="vin">
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="VIN" />
+ </f:facet>
+ <h:outputText value="#{category.vin}" />
+ </rich:column>
+ <rich:column id="stock">
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Stock" />
+ </f:facet>
+ <h:outputText value="#{category.stock}" />
+ </rich:column>
+ <f:facet name="footer">
+ <rich:datascroller />
+ </f:facet>
+</rich:dataTable>
+...]]></programlisting>
<para><emphasis><property>"selfSorted"</property></emphasis> attribute will manage if it's header will be clickable, icons rendered and sorting will be fired after click on the header.
So, developer will be able to define the <emphasis><property>sortBy</property></emphasis> property and conditionally use internal sorting.</para>
<para>The default attribute is set to <emphasis><property>"true"</property></emphasis>.</para>
@@ -415,8 +465,7 @@
</rich:column>
</rich:dataTable>
</h:form>
-...
-]]></programlisting>
+...]]></programlisting>
<figure>
<title>Filtering using the example of the <emphasis><property>"filterBy"</property></emphasis> attribute</title>
<mediaobject>
@@ -424,7 +473,45 @@
<imagedata fileref="images/columnFilt1.png"/>
</imageobject>
</mediaobject>
- </figure>
+ </figure>
+ <para><emphasis><property>"filterExpression"</property></emphasis> attribute is used to check if the row should be present in result. Any expression could be used inside and should return boolean value. </para>
+ <para>Below you can find example code:</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<h:form id="form">
+ <h:inputText value="#{capitalsBean.filter}">
+ <a4j:support event="onblur" reRender="dataTable" />
+ </h:inputText>
+ <rich:dataTable value="#{capitalsBean.capitals}" var="cap" width="500px">
+ <f:facet name="header">
+ <h:outputText value="Filtering Example" />
+ </f:facet>
+ <rich:column>
+ <f:facet name="header">
+ <h:graphicImage value="/images/ico_DataTable.gif"/>
+ </f:facet>
+ <h:graphicImage value="#{cap.stateFlag}" />
+ </rich:column>
+ <rich:column filterBy="#{cap.state}" filterDefaultLabel="click to filter" filterExpression="#{form:startWith(cap.name,cap.state)}">
+ <h:outputText value="#{cap.state}"></h:outputText>
+ </rich:column>
+ <rich:column filterBy="#{cap.name}" filterDefaultLabel="click to filter">
+ <h:outputText value="#{cap.name}" />
+ </rich:column>
+ </rich:dataTable>
+</h:form>
+...]]></programlisting>
+ <para><emphasis><property>"filterFunction"</property></emphasis> attribute has three values:</para>
+ <itemizedlist>
+ <listitem><emphasis><property>"startWith"</property></emphasis>(by default)</listitem>
+ <listitem><emphasis><property>"contains"</property></emphasis></listitem>
+ <listitem><emphasis><property>"equals"</property></emphasis></listitem>
+ </itemizedlist>
+ <para>Example of usage you could see in the previous example.</para>
+ <para><emphasis><property>"filterMethod"</property></emphasis> should be called for every object of the table. It should get current object and return boolean value. </para>
+
</section>
</section>
Modified: trunk/docs/userguide/en/src/main/resources/images/columnsort3.png
===================================================================
(Binary files differ)
16 years, 10 months
JBoss Rich Faces SVN: r6979 - in trunk/framework/impl/src/main/java/org/ajax4jsf: cache and 6 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2008-03-19 14:20:28 -0400 (Wed, 19 Mar 2008)
New Revision: 6979
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/Filter.java
trunk/framework/impl/src/main/java/org/ajax4jsf/cache/ServletContextInitMap.java
trunk/framework/impl/src/main/java/org/ajax4jsf/io/parser/FastHtmlParser.java
trunk/framework/impl/src/main/java/org/ajax4jsf/io/parser/ParsingContext.java
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/BaseResourceRenderer.java
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ClientScript.java
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/InternetResourceBase.java
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/InternetResourceService.java
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/OneTimeRenderer.java
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ResourceLifecycle.java
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/StaticResource.java
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/TemplateCSSRenderer.java
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/TemplateCSSResource.java
trunk/framework/impl/src/main/java/org/ajax4jsf/util/HtmlColor.java
trunk/framework/impl/src/main/java/org/ajax4jsf/util/SelectUtils.java
trunk/framework/impl/src/main/java/org/ajax4jsf/util/ServicesUtils.java
trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/BaseFilter.java
trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/BaseXMLFilter.java
trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/CacheContent.java
trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/ConfigurableXMLFilter.java
trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/FilterBean.java
trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/FilterServletResponseWrapper.java
trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/HtmlParser.java
trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/PollEventsManager.java
trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/ServletBean.java
trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/WebXml.java
trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/nekko/NekkoParser.java
trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/nekko/NekkoXMLFilter.java
trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/tidy/TidyParser.java
trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/tidy/TidyXMLFilter.java
Log:
Fixed generic
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/Filter.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/Filter.java 2008-03-19 18:20:07 UTC (rev 6978)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/Filter.java 2008-03-19 18:20:28 UTC (rev 6979)
@@ -39,8 +39,6 @@
import org.ajax4jsf.request.MultipartRequest;
import org.ajax4jsf.webapp.ConfigurableFilter;
-import com.sun.org.apache.bcel.internal.generic.GETSTATIC;
-
/**
* Proxy for resource/ajax xml parsing filter.
*
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/cache/ServletContextInitMap.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/cache/ServletContextInitMap.java 2008-03-19 18:20:07 UTC (rev 6978)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/cache/ServletContextInitMap.java 2008-03-19 18:20:28 UTC (rev 6979)
@@ -35,7 +35,7 @@
* created 02.05.2007
*
*/
-public class ServletContextInitMap extends AbstractMap {
+public class ServletContextInitMap extends AbstractMap<String, String> {
private ServletContext servletContext;
public ServletContextInitMap(ServletContext servletContext) {
@@ -43,22 +43,24 @@
this.servletContext = servletContext;
}
- public Set entrySet() {
- return new AbstractSet() {
+ public Set<Map.Entry<String, String>> entrySet() {
+ return new AbstractSet<Map.Entry<String, String>>() {
- public Iterator iterator() {
- return new Iterator() {
- private Enumeration initNames = servletContext.getInitParameterNames();
+ public Iterator<Map.Entry<String, String>> iterator() {
+ return new Iterator<Map.Entry<String, String>>() {
+ @SuppressWarnings("unchecked")
+ private Enumeration<String> initNames = servletContext.getInitParameterNames();
+
public boolean hasNext() {
return initNames.hasMoreElements();
}
- public Object next() {
+ public Map.Entry<String, String> next() {
String key = (String) initNames.nextElement();
String value = servletContext.getInitParameter(key);
- return new ServletContextInitMapEntry(key, value);
+ return new ServletContextInitMapEntry<String,String>(key, value);
}
public void remove() {
@@ -68,9 +70,10 @@
};
}
+ @SuppressWarnings("unchecked")
public int size() {
int result = 0;
- Enumeration initNames = servletContext.getInitParameterNames();
+ Enumeration<String> initNames = servletContext.getInitParameterNames();
while (initNames.hasMoreElements()) {
result++;
}
@@ -86,32 +89,32 @@
}
-class ServletContextInitMapEntry implements Map.Entry {
+class ServletContextInitMapEntry<K, V> implements Map.Entry<K, V> {
- private Object key;
- private Object value;
+ private K key;
+ private V value;
- public ServletContextInitMapEntry(Object key, Object value) {
+ public ServletContextInitMapEntry(K key, V value) {
super();
this.key = key;
this.value = value;
}
- public ServletContextInitMapEntry(Object key) {
+ public ServletContextInitMapEntry(K key) {
super();
this.key = key;
}
- public Object getKey() {
+ public K getKey() {
return key;
}
- public Object getValue() {
+ public V getValue() {
return value;
}
- public Object setValue(Object value) {
- Object oldValue = this.value;
+ public V setValue(V value) {
+ V oldValue = this.value;
this.value = value;
return oldValue;
}
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/io/parser/FastHtmlParser.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/io/parser/FastHtmlParser.java 2008-03-19 18:20:07 UTC (rev 6978)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/io/parser/FastHtmlParser.java 2008-03-19 18:20:28 UTC (rev 6979)
@@ -46,11 +46,11 @@
private static final Log log = LogFactory.getLog(FastHtmlParser.class);
- private Set scripts;
+ private Set<String> scripts;
- private Set styles;
+ private Set<String> styles;
- private Set userStyles;
+ private Set<String> userStyles;
private String encoding;
@@ -75,7 +75,7 @@
state = state.getNextState(c, context);
if (log.isDebugEnabled()) {
// Find state name.
- Class stateMgrClass = stateManager.getClass();
+ Class<? extends ParsingStateManager> stateMgrClass = stateManager.getClass();
Field[] fields = stateMgrClass.getDeclaredFields();
for (int i = 0; i < fields.length; i++) {
Field field = fields[i];
@@ -174,7 +174,7 @@
out.write("<head>");
}
if (null != styles) {
- for (Iterator iter = styles.iterator(); iter.hasNext();) {
+ for (Iterator<String> iter = styles.iterator(); iter.hasNext();) {
String style = (String) iter.next();
out.write("<link rel='stylesheet' class='" + COMPONENT_RESOURCE_LINK_CLASS + "'" +
" type='text/css' href='");
@@ -183,7 +183,7 @@
}
}
if (null != userStyles) {
- for (Iterator iter = userStyles.iterator(); iter.hasNext();) {
+ for (Iterator<String> iter = userStyles.iterator(); iter.hasNext();) {
String style = (String) iter.next();
out.write("<link rel='stylesheet' class='" + USER_RESOURCE_LINK_CLASS + "'" +
" type='text/css' href='");
@@ -192,7 +192,7 @@
}
}
if (null != scripts) {
- for (Iterator iter = scripts.iterator(); iter.hasNext();) {
+ for (Iterator<String> iter = scripts.iterator(); iter.hasNext();) {
String script = (String) iter.next();
out.write("<script type='text/javascript' src='");
out.write(script);
@@ -208,7 +208,7 @@
/**
* @return Returns the scripts.
*/
- public Set getScripts() {
+ public Set<String> getScripts() {
return scripts;
}
@@ -216,14 +216,14 @@
* @param scripts
* The scripts to set.
*/
- public void setScripts(Set scripts) {
+ public void setScripts(Set<String> scripts) {
this.scripts = scripts;
}
/**
* @return Returns the styles.
*/
- public Set getStyles() {
+ public Set<String> getStyles() {
return styles;
}
@@ -231,14 +231,14 @@
* @param styles
* The styles to set.
*/
- public void setStyles(Set styles) {
+ public void setStyles(Set<String> styles) {
this.styles = styles;
}
/**
* @return Returns the user styles.
*/
- public Set getUserStyles() {
+ public Set<String> getUserStyles() {
return userStyles;
}
@@ -246,7 +246,7 @@
* @param styles
* The user styles to set.
*/
- public void setUserStyles(Set userStyles) {
+ public void setUserStyles(Set<String> userStyles) {
this.userStyles = userStyles;
}
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/io/parser/ParsingContext.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/io/parser/ParsingContext.java 2008-03-19 18:20:07 UTC (rev 6978)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/io/parser/ParsingContext.java 2008-03-19 18:20:28 UTC (rev 6979)
@@ -39,7 +39,7 @@
private ParserState baseState;
- private Stack parsersStack = new Stack();
+ private Stack<ParserState> parsersStack = new Stack<ParserState>();
private OutputStream _stream;
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/resource/BaseResourceRenderer.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/resource/BaseResourceRenderer.java 2008-03-19 18:20:07 UTC (rev 6978)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/resource/BaseResourceRenderer.java 2008-03-19 18:20:28 UTC (rev 6979)
@@ -27,14 +27,12 @@
import java.util.Collections;
import java.util.Iterator;
import java.util.Map;
+import java.util.Map.Entry;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
import org.ajax4jsf.Messages;
-import org.ajax4jsf.resource.InternetResource;
-import org.ajax4jsf.resource.ResourceContext;
-import org.ajax4jsf.resource.ResourceRenderer;
/**
* @author asmirnov(a)exadel.com (latest modification by $Author: alexsmirnov $)
@@ -45,18 +43,19 @@
public void encode(InternetResource resource, FacesContext context,
Object data) throws IOException {
- this.encodeBegin(resource, context, data, Collections.EMPTY_MAP);
+ Map<String, Object> attributes = Collections.emptyMap();
+ this.encodeBegin(resource, context, data, attributes);
this.encodeEnd(resource, context, data);
}
public void encode(InternetResource resource, FacesContext context,
- Object data, Map attributes) throws IOException {
+ Object data, Map<String, Object> attributes) throws IOException {
this.encodeBegin(resource, context, data, attributes);
this.encodeEnd(resource, context, data);
}
public void encodeBegin(InternetResource resource, FacesContext context,
- Object data, Map attributes) throws IOException {
+ Object data, Map<String, Object> attributes) throws IOException {
if (null != getTag()) {
ResponseWriter writer = context.getResponseWriter();
writer.startElement(getTag(), null);
@@ -70,9 +69,9 @@
writer.writeAttribute(attrs[i][0], attrs[i][1], null);
}
}
- for (Iterator iter = attributes.entrySet().iterator(); iter
+ for (Iterator<Entry<String, Object>> iter = attributes.entrySet().iterator(); iter
.hasNext();) {
- Map.Entry attr = (Map.Entry) iter.next();
+ Map.Entry<String, Object> attr = iter.next();
writer.writeAttribute(attr.getKey().toString(),
attr.getValue(), null);
}
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ClientScript.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ClientScript.java 2008-03-19 18:20:07 UTC (rev 6978)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ClientScript.java 2008-03-19 18:20:28 UTC (rev 6979)
@@ -105,7 +105,7 @@
/* (non-Javadoc)
* @see org.ajax4jsf.resource.InternetResourceBase#encode(javax.faces.context.FacesContext, java.lang.Object, java.util.Map)
*/
- public void encode(FacesContext context, Object data, Map attributes) throws IOException {
+ public void encode(FacesContext context, Object data, Map<String, Object> attributes) throws IOException {
if (isNotAjaxRequest(context)) {
encodePrototype(context);
super.encode(context, data, attributes);
@@ -118,7 +118,7 @@
/* (non-Javadoc)
* @see org.ajax4jsf.resource.InternetResourceBase#encodeBegin(javax.faces.context.FacesContext, java.lang.Object, java.util.Map)
*/
- public void encodeBegin(FacesContext context, Object component, Map attrs) throws IOException {
+ public void encodeBegin(FacesContext context, Object component, Map<String, Object> attrs) throws IOException {
if (isNotAjaxRequest(context)) {
encodePrototype(context);
super.encodeBegin(context, component, attrs);
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/resource/InternetResourceBase.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/resource/InternetResourceBase.java 2008-03-19 18:20:07 UTC (rev 6978)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/resource/InternetResourceBase.java 2008-03-19 18:20:28 UTC (rev 6979)
@@ -65,7 +65,7 @@
private ResourceRenderer renderer = null;
- private Map customProperties = new HashMap();
+ private Map<Object,Object> customProperties = new HashMap<Object, Object>();
private String key;
@@ -312,7 +312,7 @@
* @see org.ajax4jsf.resource.InternetResource#encode(javax.faces.context.FacesContext,
* java.lang.Object, java.util.Map)
*/
- public void encode(FacesContext context, Object data, Map attributes)
+ public void encode(FacesContext context, Object data, Map<String, Object> attributes)
throws IOException {
if (log.isDebugEnabled()) {
log.debug(Messages.getMessage(Messages.ENCODE_HTML_INFO_2,
@@ -329,7 +329,7 @@
* @see org.ajax4jsf.resource.InternetResource#encodeBegin(javax.faces.context.FacesContext,
* javax.faces.component.UIComponent, java.util.Map)
*/
- public void encodeBegin(FacesContext context, Object component, Map attrs)
+ public void encodeBegin(FacesContext context, Object component, Map<String, Object> attrs)
throws IOException {
if (log.isDebugEnabled()) {
log.debug(Messages.getMessage(Messages.ENCODE_BEGIN_HTML_INFO,
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/resource/InternetResourceService.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/resource/InternetResourceService.java 2008-03-19 18:20:07 UTC (rev 6978)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/resource/InternetResourceService.java 2008-03-19 18:20:28 UTC (rev 6979)
@@ -102,7 +102,7 @@
// servletContext, cacheProperties);
try {
CacheManager cacheManager = CacheManager.getInstance();
- Map env = new ServletContextInitMap(servletContext);
+ Map<String, String> env = new ServletContextInitMap(servletContext);
CacheFactory cacheFactory = cacheManager.getCacheFactory(env);
this.cache = cacheFactory.createCache(env, this, this);
} catch (CacheException e) {
@@ -116,7 +116,7 @@
ClassLoader classLoader = Thread.currentThread()
.getContextClassLoader();
try {
- Class clazz = classLoader.loadClass(lifecycleClass);
+ Class<?> clazz = classLoader.loadClass(lifecycleClass);
lifecycle = (ResourceLifecycle) clazz.newInstance();
} catch (Exception e) {
throw new FacesException(
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/resource/OneTimeRenderer.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/resource/OneTimeRenderer.java 2008-03-19 18:20:07 UTC (rev 6978)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/resource/OneTimeRenderer.java 2008-03-19 18:20:28 UTC (rev 6979)
@@ -43,7 +43,7 @@
/* (non-Javadoc)
* @see org.ajax4jsf.resource.BaseResourceRenderer#encodeBegin(org.ajax4jsf.resource.InternetResource, javax.faces.context.FacesContext, java.lang.Object, java.util.Map)
*/
- public void encodeBegin(InternetResource resource, FacesContext context, Object data, Map attributes) throws IOException {
+ public void encodeBegin(InternetResource resource, FacesContext context, Object data, Map<String,Object> attributes) throws IOException {
if (!isRendered(resource,context)) {
super.encodeBegin(resource, context, data, attributes);
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java 2008-03-19 18:20:07 UTC (rev 6978)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java 2008-03-19 18:20:28 UTC (rev 6979)
@@ -76,7 +76,7 @@
private static final Pattern DATA_SEPARATOR_PATTERN = Pattern
.compile("/DAT(A|B)/");
- private static Map renderers;
+ private static Map<String, ResourceRenderer> renderers;
private static ResourceRenderer defaultRenderer = new MimeRenderer(null);
@@ -84,14 +84,14 @@
* keep resources instances . TODO - put this map to application-scope
* attribute, for support clastering environment.
*/
- private Map resources = Collections.synchronizedMap(new HashMap());
+ private Map<String, InternetResource> resources = Collections.synchronizedMap(new HashMap<String, InternetResource>());
private long _startTime;
private Codec codec;
static {
- renderers = new HashMap();
+ renderers = new HashMap<String, ResourceRenderer>();
// append known renderers for extentions.
renderers.put(".gif", new GifRenderer());
ResourceRenderer renderer = new JpegRenderer();
@@ -112,8 +112,7 @@
}
public WebXml getWebXml(FacesContext context) {
- WebXml webXml = (WebXml) context.getExternalContext()
- .getApplicationMap().get(WebXml.CONTEXT_ATTRIBUTE);
+ WebXml webXml = WebXml.getInstance(context);
if (null == webXml) {
throw new FacesException(
"Resources framework is not initialised, check web.xml for Filter configuration");
@@ -133,10 +132,10 @@
protected void registerResources() throws FacesException {
try {
ClassLoader loader = Thread.currentThread().getContextClassLoader();
- Enumeration e = loader
+ Enumeration<URL> e = loader
.getResources("META-INF/resources-config.xml");
while (e.hasMoreElements()) {
- URL resource = (URL) e.nextElement();
+ URL resource = e.nextElement();
registerConfig(resource);
}
} catch (IOException e) {
@@ -243,7 +242,7 @@
// path - is class name ?
InternetResource res;
try {
- Class resourceClass = Class.forName(path);
+ Class<?> resourceClass = Class.forName(path);
res = createDynamicResource(path, resourceClass);
} catch (Exception e) {
try {
@@ -503,7 +502,7 @@
* @return
*/
protected InternetResource createDynamicResource(String path,
- Class instatiate) throws ResourceNotFoundException {
+ Class<?> instatiate) throws ResourceNotFoundException {
if (InternetResource.class.isAssignableFrom(instatiate)) {
InternetResource resource;
try {
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ResourceLifecycle.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ResourceLifecycle.java 2008-03-19 18:20:07 UTC (rev 6978)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ResourceLifecycle.java 2008-03-19 18:20:28 UTC (rev 6979)
@@ -22,9 +22,6 @@
package org.ajax4jsf.resource;
import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
import java.util.Locale;
import javax.faces.FacesException;
@@ -37,10 +34,7 @@
import javax.faces.lifecycle.Lifecycle;
import javax.faces.lifecycle.LifecycleFactory;
import javax.faces.render.RenderKitFactory;
-import javax.servlet.ServletException;
-import org.ajax4jsf.resource.InternetResource;
-import org.ajax4jsf.resource.ResourceContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/resource/StaticResource.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/resource/StaticResource.java 2008-03-19 18:20:07 UTC (rev 6978)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/resource/StaticResource.java 2008-03-19 18:20:28 UTC (rev 6979)
@@ -35,7 +35,7 @@
public class StaticResource extends InternetResourceBase {
private String path;
- private byte[] resourceData = null;
+ //private byte[] resourceData = null;
/**
*
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/resource/TemplateCSSRenderer.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/resource/TemplateCSSRenderer.java 2008-03-19 18:20:07 UTC (rev 6978)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/resource/TemplateCSSRenderer.java 2008-03-19 18:20:28 UTC (rev 6979)
@@ -54,7 +54,7 @@
private RendererBase renderer = new RendererBase() {
- protected Class getComponentClass() {
+ protected Class<? extends UIComponent> getComponentClass() {
// TODO Auto-generated method stub
return UIComponent.class;
}
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/resource/TemplateCSSResource.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/resource/TemplateCSSResource.java 2008-03-19 18:20:07 UTC (rev 6978)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/resource/TemplateCSSResource.java 2008-03-19 18:20:28 UTC (rev 6979)
@@ -80,7 +80,7 @@
* @throws IOException
* @see org.ajax4jsf.resource.InternetResource#encode(javax.faces.context.FacesContext, java.lang.Object, java.util.Map)
*/
- public void encode(FacesContext context, Object data, Map attributes) throws IOException {
+ public void encode(FacesContext context, Object data, Map<String, Object> attributes) throws IOException {
_resource.encode(context, data, attributes);
}
@@ -101,7 +101,7 @@
* @throws IOException
* @see org.ajax4jsf.resource.InternetResource#encodeBegin(javax.faces.context.FacesContext, java.lang.Object, java.util.Map)
*/
- public void encodeBegin(FacesContext context, Object component, Map attrs) throws IOException {
+ public void encodeBegin(FacesContext context, Object component, Map<String, Object> attrs) throws IOException {
_resource.encodeBegin(context, component, attrs);
}
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/util/HtmlColor.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/util/HtmlColor.java 2008-03-19 18:20:07 UTC (rev 6978)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/util/HtmlColor.java 2008-03-19 18:20:28 UTC (rev 6979)
@@ -33,11 +33,11 @@
*
*/
public class HtmlColor {
- private static Map colorNames;
+ private static Map<String, Color> colorNames;
static {
// color names.
- colorNames = new HashMap();
+ colorNames = new HashMap<String, Color>();
colorNames.put("black", new Color(0x000000));
colorNames.put("green", new Color(0x008000));
colorNames.put("silver", new Color(0xC0C0C0));
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/util/SelectUtils.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/util/SelectUtils.java 2008-03-19 18:20:07 UTC (rev 6978)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/util/SelectUtils.java 2008-03-19 18:20:28 UTC (rev 6979)
@@ -23,11 +23,16 @@
import java.lang.reflect.Array;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.Set;
+import java.util.Map.Entry;
+import javax.el.ELContext;
+import javax.el.ValueExpression;
import javax.faces.FacesException;
import javax.faces.component.UIComponent;
import javax.faces.component.UIInput;
@@ -59,18 +64,18 @@
* @param component
* @return list of {@link SelectItems} taken from f:selectItem and f:selectItems
*/
- public static List getSelectItems(FacesContext context, UIComponent component) {
- ArrayList list = new ArrayList();
- Iterator kids = component.getChildren().iterator();
+ public static List<SelectItem> getSelectItems(FacesContext context, UIComponent component) {
+ ArrayList<SelectItem> list = new ArrayList<SelectItem>();
+ Iterator<UIComponent> kids = component.getChildren().iterator();
while (kids.hasNext()) {
- UIComponent kid = (UIComponent) kids.next();
+ UIComponent kid = kids.next();
if (kid instanceof UISelectItem) {
Object value = ((UISelectItem) kid).getValue();
if (value == null) {
UISelectItem item = (UISelectItem) kid;
list.add(new SelectItem(item.getItemValue(), item.getItemLabel(), item.getItemDescription(), item.isItemDisabled()));
} else if (value instanceof SelectItem) {
- list.add(value);
+ list.add((SelectItem)value);
} else {
String valueClass = (value != null ? "'" + value.getClass().getName() + "'" : "");
throw new IllegalArgumentException(Messages.getMessage(Messages.INVALID_ATTRIBUTE_VALUE, valueClass, "<selectItem>"));
@@ -78,30 +83,17 @@
} else if (kid instanceof UISelectItems && null != context) {
Object value = ((UISelectItems) kid).getValue();
if (value instanceof SelectItem) {
- list.add(value);
+ list.add((SelectItem)value);
} else if (value instanceof SelectItem[]) {
SelectItem items[] = (SelectItem[]) value;
- for (int i = 0; i < items.length; i++) {
- list.add(items[i]);
- }
+ list.addAll(Arrays.asList(items));
} else if (value instanceof Collection) {
- Iterator elements = ((Collection) value).iterator();
- while (elements.hasNext()) {
- list.add(elements.next());
- }
+ list.addAll(((Collection<SelectItem>)value));
} else if (value instanceof Map) {
- Iterator keys = ((Map) value).keySet().iterator();
- while (keys.hasNext()) {
- Object key = keys.next();
- if (key == null) {
- continue;
- }
- Object val = ((Map) value).get(key);
- if (val == null) {
- continue;
- }
- list.add(new SelectItem(val.toString(), key.toString(),
- null));
+ Map<Object,Object> map = (Map<Object, Object>) value;
+ Set<Entry<Object,Object>> entrySet = map.entrySet();
+ for (Entry<Object, Object> entry : entrySet) {
+ list.add(new SelectItem(entry.getValue(), entry.getKey().toString(), null));
}
} else {
String valueClass = (value != null ? "'" + value.getClass().getName() + "'" : "");
@@ -132,12 +124,13 @@
if (submittedValue == null)
throw new NullPointerException("submittedValue");
-
- ValueBinding vb = component.getValueBinding("value");
- Class valueType = null;
- Class arrayComponentType = null;
+
+ ELContext elContext = facesContext.getELContext();
+ ValueExpression vb = component.getValueExpression("value");
+ Class<?> valueType = null;
+ Class<?> arrayComponentType = null;
if (vb != null) {
- valueType = vb.getType(facesContext);
+ valueType = vb.getType(elContext);
if (valueType != null && valueType.isArray()) {
arrayComponentType = valueType.getComponentType();
}
@@ -156,11 +149,7 @@
// --> according to javadoc of UISelectMany we assume that the
// element type
// is java.lang.String, and copy the String array to a new List
- int len = submittedValue.length;
- List lst = new ArrayList(len);
- for (int i = 0; i < len; i++) {
- lst.add(submittedValue[i]);
- }
+ List<String> lst = Arrays.asList(submittedValue);
return lst;
}
@@ -205,7 +194,7 @@
// component. Because the user must know what he is doing, we will
// convert the values.
int len = submittedValue.length;
- List lst = new ArrayList(len);
+ List<Object> lst = new ArrayList<Object>(len);
for (int i = 0; i < len; i++) {
lst.add(converter.getAsObject(facesContext, component,
submittedValue[i]));
@@ -229,7 +218,7 @@
} else {
// Object array
int len = submittedValue.length;
- ArrayList convertedValues = new ArrayList(len);
+ ArrayList<Object> convertedValues = new ArrayList<Object>(len);
for (int i = 0; i < len; i++) {
convertedValues.add(i, converter.getAsObject(facesContext,
component, submittedValue[i]));
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/util/ServicesUtils.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/util/ServicesUtils.java 2008-03-19 18:20:07 UTC (rev 6978)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/util/ServicesUtils.java 2008-03-19 18:20:28 UTC (rev 6979)
@@ -42,9 +42,11 @@
private static final Log log = LogFactory.getLog(ServicesUtils.class);
- private static Map _services = Collections.synchronizedMap(new HashMap());
+ private static Map<String, Map<ClassLoader, Class<?>>> _services =
+ Collections.synchronizedMap(new HashMap<String, Map<ClassLoader, Class<?>>>());
- private static Map _instances = Collections.synchronizedMap(new HashMap());
+ private static Map<String, Map<ClassLoader, Object>> _instances =
+ Collections.synchronizedMap(new HashMap<String, Map<ClassLoader, Object>>());
/**
*
*/
@@ -57,14 +59,14 @@
* @return
* @throws ClassNotFoundException
*/
- public static Class getService(String name) throws ClassNotFoundException {
- Map contextClasses = (Map) _services.get(name);
+ public static Class<?> getService(String name) throws ClassNotFoundException {
+ Map<ClassLoader, Class<?>> contextClasses = _services.get(name);
if (null == contextClasses) {
- contextClasses = Collections.synchronizedMap(new HashMap());
+ contextClasses = Collections.synchronizedMap(new HashMap<ClassLoader, Class<?>>());
_services.put(name, contextClasses);
}
ClassLoader loader = Thread.currentThread().getContextClassLoader();
- Class serviceClass = (Class) contextClasses.get(loader);
+ Class<?> serviceClass = contextClasses.get(loader);
if (null == serviceClass) {
serviceClass = loadServiceClass(loader, name);
contextClasses.put(loader, serviceClass);
@@ -79,16 +81,16 @@
* @throws ClassNotFoundException
*/
public static Object getServiceInstance(String name) {
- Map contextInstances = (Map) _instances.get(name);
+ Map<ClassLoader, Object> contextInstances = (Map<ClassLoader, Object>) _instances.get(name);
if (null == contextInstances) {
- contextInstances = Collections.synchronizedMap(new HashMap());
+ contextInstances = Collections.synchronizedMap(new HashMap<ClassLoader, Object>());
_instances.put(name, contextInstances);
}
ClassLoader loader = Thread.currentThread().getContextClassLoader();
Object serviceInstance = contextInstances.get(loader);
if (null == serviceInstance) {
try{
- Class serviceClass = loadServiceClass(loader, name);
+ Class<?> serviceClass = loadServiceClass(loader, name);
serviceInstance = serviceClass.newInstance();
} catch (Exception e) {
throw new FacesException("Error create instance for service "+name,e);
@@ -105,8 +107,8 @@
* @return
* @throws ClassNotFoundException
*/
- public static Class loadServiceClass(ClassLoader loader, String name) throws ClassNotFoundException {
- Class serviceClass;
+ public static Class<?> loadServiceClass(ClassLoader loader, String name) throws ClassNotFoundException {
+ Class<?> serviceClass;
try {
String resource = "META-INF/services/" + name;
InputStream in = URLToStreamHelper.urlToStreamSafe(loader.getResource(resource));
@@ -134,9 +136,9 @@
* @return
* @throws ClassNotFoundException
*/
- public static Class loadClass(ClassLoader loader, String name)
+ public static Class<?> loadClass(ClassLoader loader, String name)
throws ClassNotFoundException {
- Class clazz;
+ Class<?> clazz;
try {
clazz = loader.loadClass(name);
} catch (ClassNotFoundException e) {
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/BaseFilter.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/BaseFilter.java 2008-03-19 18:20:07 UTC (rev 6978)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/BaseFilter.java 2008-03-19 18:20:28 UTC (rev 6979)
@@ -114,10 +114,10 @@
if (log.isDebugEnabled()) {
log.debug("Init ajax4jsf filter with nane: "
+ config.getFilterName());
- Enumeration parameterNames = config.getInitParameterNames();
+ Enumeration<String> parameterNames = config.getInitParameterNames();
StringBuffer parameters = new StringBuffer("Init parameters :\n");
while (parameterNames.hasMoreElements()) {
- String name = (String) parameterNames.nextElement();
+ String name = parameterNames.nextElement();
parameters.append(name).append(" : '").append(
config.getInitParameter(name)).append('\n');
}
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/BaseXMLFilter.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/BaseXMLFilter.java 2008-03-19 18:20:07 UTC (rev 6978)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/BaseXMLFilter.java 2008-03-19 18:20:28 UTC (rev 6979)
@@ -29,8 +29,10 @@
import java.util.Map;
import java.util.Set;
+import javax.faces.context.FacesContext;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
+import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.ServletRequest;
@@ -50,6 +52,8 @@
public static final String RESPONSE_WRAPPER_ATTRIBUTE = "com.exade.vcp.Filter.ResponseWrapper";
+ public static final String APPLICATION_SCOPE_KEY = BaseXMLFilter.class.getName();
+
private String mimetype = "text/xml";
private String publicid = "-//W3C//DTD XHTML 1.0 Transitional//EN";
@@ -81,6 +85,12 @@
public void setFilter(BaseFilter filter) {
this.filter = filter;
}
+
+
+ /*public static final BaseXMLFilter getInstance(FacesContext context) {
+ return (BaseXMLFilter) context.getExternalContext().getApplicationMap().get(APPLICATION_SCOPE_KEY);
+ }*/
+
public void init(FilterConfig config) throws ServletException {
if (log.isDebugEnabled()) {
@@ -101,6 +111,10 @@
getSystemid()));
setNamespace((String) nz(config.getInitParameter(NAMESPACE_PARAMETER),
getNamespace()));
+
+
+ config.getServletContext().setAttribute(APPLICATION_SCOPE_KEY, this);
+
}
/**
@@ -169,7 +183,7 @@
}
response.reset();
// Keep cookies.
- for (Iterator iter = servletResponseWrapper.getCookies()
+ for (Iterator<Cookie> iter = servletResponseWrapper.getCookies()
.iterator(); iter.hasNext();) {
Cookie cookie = (Cookie) iter.next();
response.addCookie(cookie);
@@ -289,11 +303,11 @@
try {
// Setup scripts and styles
- parser.setScripts((Set) request
+ parser.setScripts((Set<String>) request
.getAttribute(AjaxContext.SCRIPTS_PARAMETER));
- parser.setStyles((Set) request
+ parser.setStyles((Set<String>) request
.getAttribute(AjaxContext.STYLES_PARAMETER));
- parser.setUserStyles((Set) request
+ parser.setUserStyles((Set<String>) request
.getAttribute(AjaxContext.USER_STYLES_PARAMETER));
// Process parsing.
long startTimeMills = System.currentTimeMillis();
@@ -361,7 +375,7 @@
protected abstract void reuseParser(HtmlParser parser);
- protected abstract HtmlParser getParser(String mimetype, boolean isAjax,
+ public abstract HtmlParser getParser(String mimetype, boolean isAjax,
String viewId);
/**
@@ -420,7 +434,7 @@
/**
* @return Returns the mimetype.
*/
- protected String getMimetype() {
+ public String getMimetype() {
return mimetype;
}
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/CacheContent.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/CacheContent.java 2008-03-19 18:20:07 UTC (rev 6978)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/CacheContent.java 2008-03-19 18:20:28 UTC (rev 6979)
@@ -29,6 +29,7 @@
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
+import java.util.Map.Entry;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
@@ -69,7 +70,7 @@
boolean filledOutputWriter = false;
- private Map headers = new HashMap();
+ private Map<String, Object> headers = new HashMap<String, Object>();
private String contentType;
@@ -107,8 +108,8 @@
* @param response
*/
public void sendHeaders(HttpServletResponse response) {
- for (Iterator iter = headers.entrySet().iterator(); iter.hasNext();) {
- Map.Entry element = (Map.Entry) iter.next();
+ for (Iterator<Entry<String, Object>> iter = headers.entrySet().iterator(); iter.hasNext();) {
+ Entry<String, Object> element = iter.next();
String header = (String) element.getKey();
Object headerValue = element.getValue();
try {
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/ConfigurableXMLFilter.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/ConfigurableXMLFilter.java 2008-03-19 18:20:07 UTC (rev 6978)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/ConfigurableXMLFilter.java 2008-03-19 18:20:28 UTC (rev 6979)
@@ -103,7 +103,7 @@
* @see org.ajax4jsf.webapp.BaseXMLFilter#getParser(java.lang.String,
* boolean, java.lang.String)
*/
- protected HtmlParser getParser(String mimetype, boolean isAjax,
+ public HtmlParser getParser(String mimetype, boolean isAjax,
String viewId) {
HtmlParser parser = null;
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/FilterBean.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/FilterBean.java 2008-03-19 18:20:07 UTC (rev 6978)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/FilterBean.java 2008-03-19 18:20:28 UTC (rev 6979)
@@ -31,12 +31,17 @@
*
*/
public class FilterBean implements Serializable {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 843405125536857609L;
+
private String _filterName;
private String _filterClass;
private String _displayName;
private String _description;
- private Set _filterMappings = new HashSet();
- private Set _servlets = new HashSet();
+ private Set<String> _filterMappings = new HashSet<String>();
+ private Set<String> _servlets = new HashSet<String>();
/**
* @return Returns the description.
@@ -89,7 +94,7 @@
/* (non-Javadoc)
* @see java.util.Map#keySet()
*/
- public Set getMappings() {
+ public Set<String> getMappings() {
return _filterMappings;
}
/* (non-Javadoc)
@@ -103,7 +108,7 @@
_servlets.add(servlet.trim());
}
- public Set getServlets() {
+ public Set<String> getServlets() {
return _servlets;
}
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/FilterServletResponseWrapper.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/FilterServletResponseWrapper.java 2008-03-19 18:20:07 UTC (rev 6978)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/FilterServletResponseWrapper.java 2008-03-19 18:20:28 UTC (rev 6979)
@@ -107,7 +107,7 @@
private String charterEncoding = null;
- private HashMap headers = new HashMap();
+ private Map<String, Object> headers = new HashMap<String, Object>();
private int bufferSize = 2048;
@@ -117,7 +117,7 @@
private boolean useNullStream = false;
- private List cookies = new ArrayList();
+ private List<Cookie> cookies = new ArrayList<Cookie>();
public FilterServletResponseWrapper(HttpServletResponse response) {
super(response);
@@ -414,7 +414,7 @@
}
}
- public Map getHeaders(){
+ public Map<String, Object> getHeaders(){
return this.headers;
}
/* (non-Javadoc)
@@ -581,7 +581,7 @@
public void reset() {
// TODO Auto-generated method stub
this.resetBuffer();
- this.headers = new HashMap();
+ this.headers = new HashMap<String, Object>();
this.contentType=null;
this.charterEncoding=null;
super.reset();
@@ -646,7 +646,7 @@
super.addCookie(cookie);
}
- public Collection getCookies() {
+ public Collection<Cookie> getCookies() {
return cookies;
}
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/HtmlParser.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/HtmlParser.java 2008-03-19 18:20:07 UTC (rev 6978)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/HtmlParser.java 2008-03-19 18:20:28 UTC (rev 6979)
@@ -52,17 +52,17 @@
/**
* @param scripts The scripts to set.
*/
- public abstract void setScripts(Set scripts);
+ public abstract void setScripts(Set<String> scripts);
/**
* @param styles The styles to set.
*/
- public abstract void setStyles(Set styles);
+ public abstract void setStyles(Set<String> styles);
/**
* @param styles The user styles to set
*/
- public abstract void setUserStyles(Set styles);
+ public abstract void setUserStyles(Set<String> styles);
public abstract void setDoctype(String doctype);
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/PollEventsManager.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/PollEventsManager.java 2008-03-19 18:20:07 UTC (rev 6978)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/PollEventsManager.java 2008-03-19 18:20:28 UTC (rev 6979)
@@ -24,14 +24,19 @@
*/
public class PollEventsManager implements Serializable, CacheLoader, CacheConfigurationLoader {
- public static final String EVENTS_MANAGER_KEY=PollEventsManager.class.getName();
+ /**
+ *
+ */
+ private static final long serialVersionUID = -6257285396790747665L;
+ public static final String EVENTS_MANAGER_KEY=PollEventsManager.class.getName();
+
private Cache cache;
public void init(ServletContext servletContext) {
try {
CacheManager cacheManager = CacheManager.getInstance();
- Map env = new ServletContextInitMap(servletContext);
+ Map<String, String> env = new ServletContextInitMap(servletContext);
CacheFactory cacheFactory = cacheManager.getCacheFactory(env);
this.cache = cacheFactory.createCache(env, this, this);
servletContext.setAttribute(EVENTS_MANAGER_KEY, this);
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/ServletBean.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/ServletBean.java 2008-03-19 18:20:07 UTC (rev 6978)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/ServletBean.java 2008-03-19 18:20:28 UTC (rev 6979)
@@ -31,11 +31,15 @@
*
*/
public class ServletBean implements Serializable {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -7485005767985264890L;
private String _servletName;
private String _servletClass;
private String _displayName;
private String _description;
- private Set _servletMappings = new HashSet();
+ private Set<String> _servletMappings = new HashSet<String>();
/**
* @return Returns the description.
*/
@@ -87,7 +91,7 @@
/* (non-Javadoc)
* @see java.util.Map#keySet()
*/
- public Set getMappings() {
+ public Set<String> getMappings() {
return _servletMappings;
}
/* (non-Javadoc)
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/WebXml.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/WebXml.java 2008-03-19 18:20:07 UTC (rev 6978)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/WebXml.java 2008-03-19 18:20:28 UTC (rev 6979)
@@ -96,15 +96,26 @@
private String _filterName;
- private Map _servlets = new HashMap();
+ private Map<String, ServletBean> _servlets = new HashMap<String, ServletBean>();
- private Map _filters = new HashMap();
+ private Map<String, FilterBean> _filters = new HashMap<String, FilterBean>();
/**
* Prefix for resources handled by Chameleon framework.
*/
private String _resourcePrefix = RESOURCE_URI_PREFIX_WITH_SLASH;
+ public static WebXml getInstance() {
+ return getInstance(FacesContext.getCurrentInstance());
+ }
+
+ public static WebXml getInstance(FacesContext context) {
+ WebXml webXml = (WebXml) context.getExternalContext()
+ .getApplicationMap().get(WebXml.CONTEXT_ATTRIBUTE);
+ return webXml;
+ }
+
+
/**
* Parse application web.xml configuration and detect mapping for resources
* and logs.
@@ -404,10 +415,10 @@
Mapping mapping = checkMapping(filter.getMappings());
// Filter mapped only to servlet.
if (null == mapping) {
- for (Iterator sevlets = filter.getServlets().iterator(); sevlets
+ for (Iterator<String> sevlets = filter.getServlets().iterator(); sevlets
.hasNext()
&& _facesFilterPrefix == null && _facesFilterSuffix == null;) {
- String servletname = (String) sevlets.next();
+ String servletname = sevlets.next();
ServletBean servlet = (ServletBean) _servlets.get(servletname);
if (null != servlet) {
mapping = checkMapping(servlet.getMappings());
@@ -440,10 +451,10 @@
}
}
- private Mapping checkMapping(Set mappings) {
+ private Mapping checkMapping(Set<String> mappings) {
Mapping mapping = null;
if (null != mappings) {
- for (Iterator iter = mappings.iterator(); iter.hasNext();) {
+ for (Iterator<String> iter = mappings.iterator(); iter.hasNext();) {
String mappingPattern = (String) iter.next();
// first test - for prefix, like /xxx/*
// TODO - select correct dispatcher.
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/nekko/NekkoParser.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/nekko/NekkoParser.java 2008-03-19 18:20:07 UTC (rev 6978)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/nekko/NekkoParser.java 2008-03-19 18:20:28 UTC (rev 6979)
@@ -90,11 +90,11 @@
private DocumentFragment fragment = null;
- private Set _scripts;
+ private Set<String> _scripts;
- private Set _styles;
+ private Set<String> _styles;
- private Set _userStyles;
+ private Set<String> _userStyles;
private String _viewState;
@@ -277,7 +277,7 @@
*
* @see org.ajax4jsf.webapp.HtmlParser#setScripts(java.util.Set)
*/
- public void setScripts(Set scripts) {
+ public void setScripts(Set<String> scripts) {
_scripts = scripts;
}
@@ -287,12 +287,12 @@
*
* @see org.ajax4jsf.webapp.HtmlParser#setStyles(java.util.Set)
*/
- public void setStyles(Set styles) {
+ public void setStyles(Set<String> styles) {
_styles = styles;
}
- public void setUserStyles(Set styles) {
+ public void setUserStyles(Set<String> styles) {
_userStyles = styles;
}
@@ -449,21 +449,21 @@
private void insertResources() {
headParsed = true;
if (null != _styles) {
- for (Iterator iter = _styles.iterator(); iter.hasNext();) {
+ for (Iterator<String> iter = _styles.iterator(); iter.hasNext();) {
String style = (String) iter.next();
insertStyle(style, COMPONENT_RESOURCE_LINK_CLASS);
}
}
if (null != _userStyles) {
- for (Iterator iter = _userStyles.iterator(); iter.hasNext();) {
+ for (Iterator<String> iter = _userStyles.iterator(); iter.hasNext();) {
String style = (String) iter.next();
insertStyle(style, USER_RESOURCE_LINK_CLASS);
}
}
if (null != _scripts) {
- for (Iterator iter = _scripts.iterator(); iter.hasNext();) {
+ for (Iterator<String> iter = _scripts.iterator(); iter.hasNext();) {
String script = (String) iter.next();
QName element = new QName(null, "script", "script", null);
XMLAttributes attrs = new XMLAttributesImpl();
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/nekko/NekkoXMLFilter.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/nekko/NekkoXMLFilter.java 2008-03-19 18:20:07 UTC (rev 6978)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/nekko/NekkoXMLFilter.java 2008-03-19 18:20:28 UTC (rev 6979)
@@ -36,7 +36,7 @@
public NekkoXMLFilter() {}
- protected HtmlParser getParser(String mimetype, boolean isAjax, String viewId) {
+ public HtmlParser getParser(String mimetype, boolean isAjax, String viewId) {
HtmlParser parser = null;
if( isAjax ){
parser = getXmlParser();
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/tidy/TidyParser.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/tidy/TidyParser.java 2008-03-19 18:20:07 UTC (rev 6978)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/tidy/TidyParser.java 2008-03-19 18:20:28 UTC (rev 6979)
@@ -55,11 +55,11 @@
private Tidy tidy;
- private Set _scripts;
+ private Set<String> _scripts;
- private Set _styles;
+ private Set<String> _styles;
- private Set _userStyles;
+ private Set<String> _userStyles;
private String _viewState;
@@ -164,7 +164,7 @@
child = null;
}
if (null != _styles) {
- for (Iterator iter = _styles.iterator(); iter.hasNext();) {
+ for (Iterator<String> iter = _styles.iterator(); iter.hasNext();) {
String url = (String) iter.next();
Element style = document.createElement("link");
style.setAttribute("type", "text/css");
@@ -175,7 +175,7 @@
}
}
if (null != _userStyles) {
- for (Iterator iter = _userStyles.iterator(); iter.hasNext();) {
+ for (Iterator<String> iter = _userStyles.iterator(); iter.hasNext();) {
String url = (String) iter.next();
Element style = document.createElement("link");
style.setAttribute("type", "text/css");
@@ -187,7 +187,7 @@
}
// Scripts
if (null != _scripts) {
- for (Iterator iter = _scripts.iterator(); iter
+ for (Iterator<String> iter = _scripts.iterator(); iter
.hasNext();) {
String url = (String) iter.next();
Element script = document.createElement("script");
@@ -387,7 +387,7 @@
*
* @see org.ajax4jsf.webapp.HtmlParser#setScripts(java.util.Set)
*/
- public void setScripts(Set scripts) {
+ public void setScripts(Set<String> scripts) {
this._scripts = scripts;
}
@@ -396,11 +396,11 @@
*
* @see org.ajax4jsf.webapp.HtmlParser#setStyles(java.util.Set)
*/
- public void setStyles(Set styles) {
+ public void setStyles(Set<String> styles) {
this._styles = styles;
}
- public void setUserStyles(Set styles) {
+ public void setUserStyles(Set<String> styles) {
this._userStyles = styles;
}
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/tidy/TidyXMLFilter.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/tidy/TidyXMLFilter.java 2008-03-19 18:20:07 UTC (rev 6978)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/webapp/tidy/TidyXMLFilter.java 2008-03-19 18:20:28 UTC (rev 6979)
@@ -67,7 +67,7 @@
* @param string Encodings for parser
* @return
*/
- protected HtmlParser getParser(String mime, boolean isAjax, String viewId) {
+ public HtmlParser getParser(String mime, boolean isAjax, String viewId) {
// For non-ajax, parse only html types !
if (isAjax || mime.startsWith(TEXT_HTML) || mime.startsWith(APPLICATION_XHTML_XML)) {
if(isAjax || isForcexml()){
16 years, 10 months