JBoss Rich Faces SVN: r7650 - in branches/3.1.x: samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller and 23 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-04-07 19:09:14 -0400 (Mon, 07 Apr 2008)
New Revision: 7650
Modified:
branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/datatable/UpdateBean.java
branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java
branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/demo/calendar/CalendarBean.java
branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/Environment.java
branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/demo/pmenu/PanelMenu.java
branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Library.java
branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Song.java
branches/3.1.x/samples/richfaces-demo/src/main/resources/org/richfaces/demo/capitals/capitals.xml
branches/3.1.x/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
branches/3.1.x/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/calSample.xhtml
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/calendar/usage.xhtml
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/dragSupport/examples/dnd.xhtml
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/dropDownMenu/examples/topmenu.xhtml
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/gmap/examples/mapUsage.xhtml
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/orderingList/example/playlist.xhtml
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/examples/custom.xhtml
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/usage.xhtml
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/toolTip/examples/tooltipUsage.xhtml
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/toolTip/examples/withTable.xhtml
branches/3.1.x/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml
branches/3.1.x/samples/richfaces-demo/src/main/webapp/templates/include/header.xhtml
branches/3.1.x/samples/richfaces-demo/src/main/webapp/templates/main.xhtml
branches/3.1.x/samples/seamPortletEar/ear/
branches/3.1.x/samples/simpleTogglePanel-sample/src/main/webapp/WEB-INF/web.xml
branches/3.1.x/samples/simpleTogglePanel-sample/src/main/webapp/pages/index.jsp
branches/3.1.x/samples/virtualEarth-sample/
branches/3.1.x/ui/assembly/pom.xml
branches/3.1.x/ui/simpleTogglePanel/src/main/templates/simpleTogglePanel.jspx
Log:
Modified: branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/datatable/UpdateBean.java
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/datatable/UpdateBean.java 2008-04-07 22:49:35 UTC (rev 7649)
+++ branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/datatable/UpdateBean.java 2008-04-07 23:09:14 UTC (rev 7650)
@@ -1,15 +1,17 @@
package org.richfaces.datatable;
+import java.util.HashSet;
+import java.util.Set;
+
import javax.faces.component.html.HtmlInputText;
import javax.faces.context.FacesContext;
+
import org.ajax4jsf.component.UIRepeat;
-import java.util.HashSet;
-import java.util.Set;
public class UpdateBean {
HtmlInputText priceRef;
- private UIRepeat repeater=null;
+ private UIRepeat repeater;
private Set<Integer> keys = null;
/**
Modified: branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java 2008-04-07 22:49:35 UTC (rev 7649)
+++ branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java 2008-04-07 23:09:14 UTC (rev 7650)
@@ -25,7 +25,7 @@
private static int DECIMALS = 1;
private static int ROUNDING_MODE = BigDecimal.ROUND_HALF_UP;
- private static List <DemoInventoryItem> allCars = null;
+ private List <DemoInventoryItem> allCars = null;
public List <DemoInventoryItem> getAllCars() {
synchronized (this) {
Modified: branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/demo/calendar/CalendarBean.java
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/demo/calendar/CalendarBean.java 2008-04-07 22:49:35 UTC (rev 7649)
+++ branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/demo/calendar/CalendarBean.java 2008-04-07 23:09:14 UTC (rev 7650)
@@ -12,7 +12,7 @@
private boolean popup;
private String pattern;
private Date selectedDate;
- private boolean showApply=true;
+
private boolean useCustomDayLabels;
public Locale getLocale() {
@@ -43,7 +43,7 @@
locale = Locale.US;
popup = true;
- pattern = "MMM d, yyyy, HH:mm";
+ pattern = "MMM d, yyyy";
}
public void selectLocale(ValueChangeEvent event) {
@@ -72,12 +72,4 @@
this.selectedDate = selectedDate;
}
- public boolean isShowApply() {
- return showApply;
- }
-
- public void setShowApply(boolean showApply) {
- this.showApply = showApply;
- }
-
}
\ No newline at end of file
Modified: branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/Environment.java
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/Environment.java 2008-04-07 22:49:35 UTC (rev 7649)
+++ branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/Environment.java 2008-04-07 23:09:14 UTC (rev 7650)
@@ -3,12 +3,9 @@
import java.util.HashMap;
import java.util.Map;
-import javax.faces.application.Application;
-import javax.faces.context.FacesContext;
-
public class Environment {
private Map params = new HashMap();
- private String version;
+
public Map getParams() {
return params;
}
@@ -17,8 +14,4 @@
this.params = params;
}
- public String getVersion() {
- String shortVersion = FacesContext.getCurrentInstance().getApplication().getExpressionFactory().createValueExpression(FacesContext.getCurrentInstance().getELContext(), "#{a4j.version}", String.class).getValue(FacesContext.getCurrentInstance().getELContext()).toString();
- return shortVersion.substring(0, shortVersion.indexOf("$Date"));
- }
}
Modified: branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/demo/pmenu/PanelMenu.java
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/demo/pmenu/PanelMenu.java 2008-04-07 22:49:35 UTC (rev 7649)
+++ branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/demo/pmenu/PanelMenu.java 2008-04-07 23:09:14 UTC (rev 7650)
@@ -6,7 +6,7 @@
import org.richfaces.component.UIPanelMenuItem;
public class PanelMenu {
- private Object current;
+ private String current;
private boolean singleMode;
public boolean isSingleMode() {
return singleMode;
@@ -19,11 +19,11 @@
public PanelMenu() {
}
- public Object getCurrent() {
+ public String getCurrent() {
return this.current;
}
- public void setCurrent(Object current) {
+ public void setCurrent(String current) {
this.current = current;
}
public String updateCurrent() {
Modified: branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Library.java
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Library.java 2008-04-07 22:49:35 UTC (rev 7649)
+++ branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Library.java 2008-04-07 23:09:14 UTC (rev 7650)
@@ -113,9 +113,7 @@
} while (read>0);
String buf = os.toString();
StringTokenizer toc1 = new StringTokenizer(buf,"\n");
- int index = 0;
while (toc1.hasMoreTokens()) {
- index++;
String str = toc1.nextToken();
StringTokenizer toc2 = new StringTokenizer(str, "\t");
String songTitle = toc2.nextToken();
@@ -129,7 +127,6 @@
album.setYear(new Integer(albumYear));
Song song = new Song(getNextId());
song.setTitle(songTitle);
- song.setTrackNumber(index);
album.addSong(song);
}
} catch (IOException e) {
@@ -165,5 +162,4 @@
walk(this, appendTo, Song.class);
return appendTo;
}
-
}
Modified: branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Song.java
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Song.java 2008-04-07 22:49:35 UTC (rev 7649)
+++ branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/demo/tree/Song.java 2008-04-07 23:09:14 UTC (rev 7650)
@@ -19,13 +19,6 @@
public Song(long id) {
this.id = id;
}
-
- public Song(long id, int index) {
- this.trackNumber=index;
- this.id = id;
- System.out.println(index);
- }
-
public void addChild(Object identifier, TreeNode child) {
throw new UnsupportedOperationException("Songs do not have children");
Modified: branches/3.1.x/samples/richfaces-demo/src/main/resources/org/richfaces/demo/capitals/capitals.xml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/resources/org/richfaces/demo/capitals/capitals.xml 2008-04-07 22:49:35 UTC (rev 7649)
+++ branches/3.1.x/samples/richfaces-demo/src/main/resources/org/richfaces/demo/capitals/capitals.xml 2008-04-07 23:09:14 UTC (rev 7650)
@@ -5,7 +5,70 @@
<name>Montgomery</name>
<timeZone>GMT-6</timeZone>
</capital>
+
<capital>
+ <state>Alabama1</state>
+ <name>Montgomery</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Alabama2</state>
+ <name>Montgomery</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Alabama3</state>
+ <name>Montgomery</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Alabama4</state>
+ <name>Montgomery</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Alabama5</state>
+ <name>Montgomery</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Alabama6</state>
+ <name>Montgomery</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Alabama7</state>
+ <name>Montgomery</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Alabama8</state>
+ <name>Montgomery</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Alabama9</state>
+ <name>Montgomery</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Alabama10</state>
+ <name>Montgomery</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Alabama11</state>
+ <name>Montgomery</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Alabama12</state>
+ <name>Montgomery</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+
+
+ <capital>
<state>Alaska</state>
<name>Juneau</name>
<timeZone>GMT-9</timeZone>
@@ -216,6 +279,230 @@
<timeZone>GMT-6</timeZone>
</capital>
<capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+ <capital>
+ <state>Texas</state>
+ <name>Austin</name>
+ <timeZone>GMT-6</timeZone>
+ </capital>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <capital>
<state>Utah</state>
<name>Salt Lake City</name>
<timeZone>GMT-7</timeZone>
Modified: branches/3.1.x/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2008-04-07 22:49:35 UTC (rev 7649)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2008-04-07 23:09:14 UTC (rev 7650)
@@ -73,7 +73,7 @@
<managed-bean>
<managed-bean-name>dataTableScrollerBean</managed-bean-name>
<managed-bean-class>org.richfaces.datatablescroller.DataTableScrollerBean</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
+ <managed-bean-scope>application</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>toggleBean</managed-bean-name>
@@ -167,18 +167,18 @@
<property-class>java.lang.String</property-class>
<value>Paint 2D</value>
</managed-property>
- </managed-bean>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>treeDemoStateAdvisor</managed-bean-name>
+ <managed-bean-class>org.richfaces.treemodeladaptor.TreeDemoStateAdvisor</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>fileSystemBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.treemodeladaptor.FileSystemBean</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ </managed-bean>
<managed-bean>
- <managed-bean-name>treeDemoStateAdvisor</managed-bean-name>
- <managed-bean-class>org.richfaces.treemodeladaptor.TreeDemoStateAdvisor</managed-bean-class>
- <managed-bean-scope>application</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>fileSystemBean</managed-bean-name>
- <managed-bean-class>org.richfaces.treemodeladaptor.FileSystemBean</managed-bean-class>
- <managed-bean-scope>application</managed-bean-scope>
- </managed-bean>
- <managed-bean>
<managed-bean-name>simpleTreeBean</managed-bean-name>
<managed-bean-class>org.richfaces.demo.tree.SimpleTreeBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
@@ -251,7 +251,7 @@
<managed-bean>
<managed-bean-name>updateBean</managed-bean-name>
<managed-bean-class>org.richfaces.datatable.UpdateBean</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
+ <managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>panelMenu</managed-bean-name>
@@ -264,7 +264,7 @@
</managed-property>
<managed-property>
<property-name>singleMode</property-name>
- <property-class>boolean</property-class>
+ <property-class>java.lang.Boolean</property-class>
<value>true</value>
</managed-property>
</managed-bean>
@@ -297,8 +297,8 @@
<from-outcome>previous</from-outcome>
<to-view-id>/richfaces/include/examples/wstep2.xhtml</to-view-id>
</navigation-case>
- </navigation-rule>
- <lifecycle>
- <phase-listener>org.richfaces.treemodeladaptor.PostbackPhaseListener</phase-listener>
- </lifecycle>
+ </navigation-rule>
+ <lifecycle>
+ <phase-listener>org.richfaces.treemodeladaptor.PostbackPhaseListener</phase-listener>
+ </lifecycle>
</faces-config>
Modified: branches/3.1.x/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml 2008-04-07 22:49:35 UTC (rev 7649)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml 2008-04-07 23:09:14 UTC (rev 7650)
@@ -37,20 +37,16 @@
</context-param>
<context-param>
<param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
- <param-value>true</param-value>
- </context-param>
- <context-param>
- <param-name>org.ajax4jsf.COMPRESS_STYLE</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>org.ajax4jsf.xmlparser.ORDER</param-name>
<param-value>NEKO</param-value>
</context-param>
- <!--context-param>
+ <context-param>
<param-name>org.richfaces.LoadStyleStrategy</param-name>
<param-value>DEFAULT</param-value>
- </context-param-->
+ </context-param>
<context-param>
<param-name>org.richfaces.LoadScriptStrategy</param-name>
<param-value>DEFAULT</param-value>
Modified: branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/calSample.xhtml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/calSample.xhtml 2008-04-07 22:49:35 UTC (rev 7649)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/calSample.xhtml 2008-04-07 23:09:14 UTC (rev 7650)
@@ -7,10 +7,7 @@
<style type="text/css">
.ecol1 { width:250px; vertical-align: top; }
- .ecol2 { vertical-align: top; border-left:1px solid #CCC; }
- .rich-calendar-tool-btn{
- font-family: Arial, Verdana;
- }
+ .ecol2 { vertical-align: top; border-left:1px solid #CCC; }
</style>
<h:form>
@@ -21,7 +18,7 @@
locale="#{calendarBean.locale}"
popup="#{calendarBean.popup}"
datePattern="#{calendarBean.pattern}"
- showApplyButton="#{calendarBean.showApply}"/>
+ />
</a4j:outputPanel>
@@ -30,10 +27,7 @@
<h:selectBooleanCheckbox value="#{calendarBean.popup}">
<a4j:support event="onclick" reRender="calendar"/>
</h:selectBooleanCheckbox>
- <h:outputText value="Apply Button:" />
- <h:selectBooleanCheckbox value="#{calendarBean.showApply}">
- <a4j:support event="onclick" reRender="calendar"/>
- </h:selectBooleanCheckbox>
+
<h:outputText value="Select Locale" />
<h:selectOneRadio value="en/US" valueChangeListener="#{calendarBean.selectLocale}">
<a4j:support event="onclick" reRender="calendar"/>
@@ -46,12 +40,12 @@
<h:outputText value="Select Date Pattern:"/>
<h:selectOneMenu value="#{calendarBean.pattern}">
<a4j:support event="onchange" reRender="calendar"/>
- <f:selectItem itemLabel="d/M/yy HH:mm" itemValue="d/M/yy HH:mm"/>
- <f:selectItem itemLabel="dd/M/yy hh:mm a" itemValue="dd/M/yy hh:mm a"/>
+ <f:selectItem itemLabel="d/M/yy" itemValue="d/M/yy"/>
+ <f:selectItem itemLabel="dd/M/yy" itemValue="dd/M/yy"/>
<f:selectItem itemLabel="d/MMM/y" itemValue="d/MMM/y"/>
<f:selectItem itemLabel="MMM d, yyyy" itemValue="MMM d, yyyy"/>
</h:selectOneMenu>
-
+
</h:panelGrid>
</h:panelGrid>
Modified: branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/calendar/usage.xhtml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/calendar/usage.xhtml 2008-04-07 22:49:35 UTC (rev 7649)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/calendar/usage.xhtml 2008-04-07 23:09:14 UTC (rev 7650)
@@ -8,8 +8,8 @@
<ui:composition template="/templates/component-sample.xhtml">
<ui:define name="sample">
- <p><b>
- rich:calendar</b> allows to select the date using monthly calendar elements on pages.
+ <p>
+ rich:calendar allows to select the date using monthly calendar elements on pages.
It is possible to use the component in a popup and inline code. At a popup mode Calendar
is initially rendered as input for date and button on the right side to call a popup.
In case of an inline mode, the monthly calendar is located on a page initially.
@@ -23,13 +23,9 @@
</ui:include>
</div>
- <p>Calendar component allows to work with <b>time</b> also. You should just define time in pattern ( for example "<i>d/M/yy HH:mm</i>" as it's defined in this sample by default)
- </p>
- <p>After you choose some date, you'll be able to manage time for this date. Spinner will be called after click on the time fields to edit them.</p>
- <p>Calendar could be used without "Apply" button (will be closed after date selected)</p>
<p>
<b>locale</b> attribute is defined as a Locale. The default value is set to the Locale of the current page.
- The name of the month and week days depend on the Locale.
+ The name of the month and week days names depend of the Locale.
</p>
<p>
Modified: branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/dragSupport/examples/dnd.xhtml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/dragSupport/examples/dnd.xhtml 2008-04-07 22:49:35 UTC (rev 7649)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/dragSupport/examples/dnd.xhtml 2008-04-07 23:09:14 UTC (rev 7650)
@@ -24,7 +24,7 @@
<h:panelGrid columnClasses="panelc" columns="4" width="100%">
- <rich:panel style="width:133px">
+ <rich:panel style="width:100px">
<f:facet name="header">
<h:outputText value="Source List" />
</f:facet>
@@ -32,7 +32,7 @@
var="fm" >
<h:column>
- <a4j:outputPanel style="width:100px;border:1px solid gray;padding:2px"
+ <a4j:outputPanel style="border:1px solid gray;padding:2px;"
layout="block">
<rich:dragSupport dragIndicator=":indicator"
dragType="#{fm.family}" dragValue="#{fm}">
Modified: branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/dropDownMenu/examples/topmenu.xhtml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/dropDownMenu/examples/topmenu.xhtml 2008-04-07 22:49:35 UTC (rev 7649)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/dropDownMenu/examples/topmenu.xhtml 2008-04-07 23:09:14 UTC (rev 7650)
@@ -58,4 +58,4 @@
<h:outputText style="font-weight:bold" value="#{ddmenu.current}"></h:outputText>
</a4j:outputPanel>
-</ui:composition>
+</ui:composition>
\ No newline at end of file
Modified: branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/gmap/examples/mapUsage.xhtml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/gmap/examples/mapUsage.xhtml 2008-04-07 22:49:35 UTC (rev 7649)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/gmap/examples/mapUsage.xhtml 2008-04-07 23:09:14 UTC (rev 7650)
@@ -11,8 +11,9 @@
height:30px;
}
</style>
+
<h:panelGrid columns="2">
- <rich:gmap gmapVar="map" zoom="#{gmBean.zoom}" style="width:400px;height:400px" gmapKey="#{gmBean.gmapkey}" id="gmap"/>
+ <rich:gmap gmapVar="map" zoom="#{gmBean.zoom}" style="width:400px;height:400px" gmapKey="#{gmBean.gmapkey}" />
<h:panelGroup>
<rich:tabPanel switchType="ajax" width="350" height="400">
Modified: branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/orderingList/example/playlist.xhtml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/orderingList/example/playlist.xhtml 2008-04-07 22:49:35 UTC (rev 7649)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/orderingList/example/playlist.xhtml 2008-04-07 23:09:14 UTC (rev 7650)
@@ -12,13 +12,13 @@
<rich:orderingList value="#{library.libraryAsList}" var="lib" listHeight="300" listWidth="350">
<rich:column width="180">
<f:facet name="header">
- <h:outputText value="Song Name"/>
+ Song Name
</f:facet>
<h:outputText value="#{lib.title}"></h:outputText>
</rich:column>
<rich:column>
<f:facet name="header">
- <h:outputText value="Artist Name"/>
+ Artist Name
</f:facet>
<h:outputText value="#{lib.album.artist.name}"></h:outputText>
</rich:column>
Modified: branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/examples/custom.xhtml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/examples/custom.xhtml 2008-04-07 22:49:35 UTC (rev 7649)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/examples/custom.xhtml 2008-04-07 23:09:14 UTC (rev 7650)
@@ -6,8 +6,10 @@
xmlns:rich="http://richfaces.org/rich">
<h:form id="suggestionbox_form">
+
<p>
- Suggestion Box will suggest you should state capitals names. Comma and space could be used as suggestions separators." </p>
+ Suggestion Box will suggest you states capitals names. Comma and space could be used as suggestions separators."
+ </p>
<h:inputText value="#{capitalsBean.capital}" id="text" />
<rich:suggestionbox id="suggestionBoxId" for="text" tokens=",["
rules="#{suggestionBox.rules}"
@@ -19,12 +21,24 @@
border="#{suggestionBox.border}" width="#{suggestionBox.width}"
height="#{suggestionBox.height}"
shadowDepth="#{suggestionBox.shadowDepth}"
- cellpadding="#{suggestionBox.cellpadding}" nothingLabel="No capitals found" columnClasses="center">
- <h:column> <f:facet name="header"> <h:outputText value="123"></h:outputText> </f:facet>
+ cellpadding="#{suggestionBox.cellpadding}"
+ nothingLabel="No capitals found" columnClasses="center">
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="123"></h:outputText>
+ </f:facet>
<h:graphicImage value="#{result.stateFlag}" />
</h:column>
- <h:column> <h:outputText value="#{result.name}" /> </h:column> <h:column> <h:outputText value="#{result.state}" style="font-style:italic"/> </h:column> </rich:suggestionbox>
- <rich:spacer height="30px"/>
+ <h:column>
+ <h:outputText value="#{result.name}" />
+ </h:column>
+ <h:column>
+ <h:outputText value="#{result.state}" style="font-style:italic"/>
+ </h:column>
+ </rich:suggestionbox>
+
+ <rich:spacer height="30px"/>
+
<h:panelGrid columns="2" border="0" >
<h:outputText value="Border" />
Modified: branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/usage.xhtml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/usage.xhtml 2008-04-07 22:49:35 UTC (rev 7649)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/usage.xhtml 2008-04-07 23:09:14 UTC (rev 7650)
@@ -12,11 +12,11 @@
<p>RichFaces Suggestion Box component adds the autocomplete
capability to the existing input component such as h:inputText or
- t:inputText. Use the attribute 'for', in order to point to the necessary input component
+ t:inputText. Use the attribute 'for', in order to pint to the necessary input component
to add the autocomplete capabity to it.</p>
<p>Working with Suggestion Box is similar to the h:dataTable
component, but instead of the 'value' attribute it has a
- suggestionAction attribute that points to the method, which returns a
+ suggestionAction attribute that points to the method that returns the
filtered collection. The 'fetch' attribute points to the data that
is inserted into the input field if a particular row is selected
or clicked from the suggested list.</p>
Modified: branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/toolTip/examples/tooltipUsage.xhtml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/toolTip/examples/tooltipUsage.xhtml 2008-04-07 22:49:35 UTC (rev 7649)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/toolTip/examples/tooltipUsage.xhtml 2008-04-07 23:09:14 UTC (rev 7650)
@@ -23,6 +23,20 @@
}
</style>
+ <h:outputText id="text" value="abc">
+ <rich:toolTip value="Test1111">
+ </rich:toolTip>
+ </h:outputText>
+<br />
+<br />
+<br />
+
+<h:graphicImage value="/images/page_bg.gif" width="100" height="100" id="img">
+ <rich:toolTip value="Test">
+ </rich:toolTip>
+</h:graphicImage>
+
+
<h:panelGrid columns="2">
<rich:panel id="sample1" styleClass="tooltip-text">
<rich:toolTip>
@@ -36,7 +50,7 @@
</p>
</rich:panel>
<rich:panel id="sample2" styleClass="tooltip-text">
- <rich:toolTip followMouse="true" direction="top-right" showDelay="500" styleClass="tooltip">
+ <rich:toolTip followMouse="true" direction="top-right" delay="500" styleClass="tooltip" style="width:250px">
<span style="white-space:nowrap">
This tool-tip content also <strong>pre-rendered</strong> to the page.<br/>
However, the look of this tool-tip is customized<br/>
Modified: branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/toolTip/examples/withTable.xhtml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/toolTip/examples/withTable.xhtml 2008-04-07 22:49:35 UTC (rev 7649)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/toolTip/examples/withTable.xhtml 2008-04-07 23:09:14 UTC (rev 7650)
@@ -45,7 +45,7 @@
<h:outputText value="Make"/>
</f:facet>
<h:outputText id="make" value="#{vehicle.make}" >
- <rich:toolTip direction="top-right" mode="ajax" showDelay="300" styleClass="tooltip" immediate="true" layout="block">
+ <rich:toolTip direction="top-right" mode="ajax" delay="30" styleClass="tooltip" immediate="true" layout="block">
<a4j:actionparam name="key" value="#{row}" assignTo="#{toolTipData.currentVehicleIndex}" />
<h:panelGrid columns="4">
Modified: branches/3.1.x/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml 2008-04-07 22:49:35 UTC (rev 7649)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml 2008-04-07 23:09:14 UTC (rev 7650)
@@ -7,7 +7,7 @@
<ui:composition>
<rich:panel styleClass="panel_menu">
-<rich:panelBar selectedPanel="#{componentNavigator.currentComponent.group}" height="600" width="100%">
+<rich:panelBar selectedPanel="#{componentNavigator.currentComponent.group}" height="550" width="100%">
<rich:panelBarItem id="ajaxSupport" label="Ajax Support">
<ui:include src="/templates/include/components-group.xhtml" >
<ui:param name="components" value="#{componentNavigator.ajaxSupport}" />
@@ -58,11 +58,11 @@
<ui:param name="components" value="#{componentNavigator.richInputs}" />
</ui:include>
</rich:panelBarItem>
- <rich:panelBarItem id="richSelect" label="Rich Selects">
- <ui:include src="/templates/include/components-group.xhtml" >
- <ui:param name="components" value="#{componentNavigator.selectComponents}" />
- </ui:include>
- </rich:panelBarItem>
+ <rich:panelBarItem id="richSelect" label="Rich Selects">
+ <ui:include src="/templates/include/components-group.xhtml" >
+ <ui:param name="components" value="#{componentNavigator.selectComponents}" />
+ </ui:include>
+ </rich:panelBarItem>
<rich:panelBarItem id="richMisc" label="Rich Miscellaneous">
<ui:include src="/templates/include/components-group.xhtml" >
<ui:param name="components" value="#{componentNavigator.richMisc}" />
Modified: branches/3.1.x/samples/richfaces-demo/src/main/webapp/templates/include/header.xhtml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/templates/include/header.xhtml 2008-04-07 22:49:35 UTC (rev 7649)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/templates/include/header.xhtml 2008-04-07 23:09:14 UTC (rev 7650)
@@ -114,14 +114,12 @@
<f:param value="DEFAULT" name="s"/>
</h:outputLink>
</td>
- <ui:remove>
<td>
<h:outputLink value="#{componentNavigator.currentComponent.contextRelativeDemoLocation}">
Null
<f:param value="NULL" name="s"/>
</h:outputLink>
</td>
- </ui:remove>
<td class="control">
<rich:toggleControl for="skin_chooser" value="« less" />
</td>
Modified: branches/3.1.x/samples/richfaces-demo/src/main/webapp/templates/main.xhtml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/templates/main.xhtml 2008-04-07 22:49:35 UTC (rev 7649)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/templates/main.xhtml 2008-04-07 23:09:14 UTC (rev 7650)
@@ -47,8 +47,8 @@
<ui:insert name="body">Body</ui:insert>
<!-- tabpanel end -->
<rich:spacer style="height:10px;" />
- <rich:separator style="height:1px" />
- <div style="float:right;" class="footer-text">#{environment.version}</div>
+ <rich:separator style="height:1px" />
+ <div style="float:right" class="footer-text">${a4j.version}</div>
<div style="float:none">
<a href="http://jboss.com/index.html?module=bb&op=viewtopic&t=104575"
style="color:#000; display:block" class="footer-text">RichFaces. Most Important Links</a>
Property changes on: branches/3.1.x/samples/seamPortletEar/ear
___________________________________________________________________
Name: svn:ignore
+ target
Modified: branches/3.1.x/samples/simpleTogglePanel-sample/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/3.1.x/samples/simpleTogglePanel-sample/src/main/webapp/WEB-INF/web.xml 2008-04-07 22:49:35 UTC (rev 7649)
+++ branches/3.1.x/samples/simpleTogglePanel-sample/src/main/webapp/WEB-INF/web.xml 2008-04-07 23:09:14 UTC (rev 7650)
@@ -19,7 +19,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>
Modified: branches/3.1.x/samples/simpleTogglePanel-sample/src/main/webapp/pages/index.jsp
===================================================================
--- branches/3.1.x/samples/simpleTogglePanel-sample/src/main/webapp/pages/index.jsp 2008-04-07 22:49:35 UTC (rev 7649)
+++ branches/3.1.x/samples/simpleTogglePanel-sample/src/main/webapp/pages/index.jsp 2008-04-07 23:09:14 UTC (rev 7650)
@@ -18,7 +18,9 @@
<body>
<f:view>
<h:form id="SimpleToglePanel_form">
+ <h:outputText id="text" value="abc" />
+
<h:selectOneRadio binding="#{skinBean.component}" />
<h:commandLink action="#{skinBean.change}" value="set skin" />
<br/><br/>
Property changes on: branches/3.1.x/samples/virtualEarth-sample
___________________________________________________________________
Name: svn:ignore
- target
+ target
.classpath
.project
.settings
Modified: branches/3.1.x/ui/assembly/pom.xml
===================================================================
--- branches/3.1.x/ui/assembly/pom.xml 2008-04-07 22:49:35 UTC (rev 7649)
+++ branches/3.1.x/ui/assembly/pom.xml 2008-04-07 23:09:14 UTC (rev 7650)
@@ -69,7 +69,7 @@
</executions>
</plugin>
<!-- append extracted sources , for pack with library -->
- <plugin>
+ <!--plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
@@ -88,8 +88,8 @@
</configuration>
</execution>
</executions>
- </plugin>
- <plugin>
+ </plugin-->
+ <!--plugin>
<groupId>net.sourceforge.maven-taglib</groupId>
<artifactId>maven-taglib-plugin</artifactId>
<configuration>
@@ -123,8 +123,8 @@
</goals>
</execution>
</executions>
- </plugin>
- <plugin>
+ </plugin-->
+ <!--plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
@@ -189,7 +189,7 @@
</configuration>
</execution>
</executions>
- </plugin>
+ </plugin-->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
@@ -200,9 +200,9 @@
<descriptor>
${basedir}/src/main/assembly/richfaces.xml
</descriptor>
- <descriptor>
+ <!--descriptor>
${basedir}/src/main/assembly/src.xml
- </descriptor>
+ </descriptor-->
</descriptors>
</configuration>
<executions>
Modified: branches/3.1.x/ui/simpleTogglePanel/src/main/templates/simpleTogglePanel.jspx
===================================================================
--- branches/3.1.x/ui/simpleTogglePanel/src/main/templates/simpleTogglePanel.jspx 2008-04-07 22:49:35 UTC (rev 7649)
+++ branches/3.1.x/ui/simpleTogglePanel/src/main/templates/simpleTogglePanel.jspx 2008-04-07 23:09:14 UTC (rev 7650)
@@ -41,7 +41,7 @@
<u:insertFacet name="closeMarker" />
<jsp:scriptlet><![CDATA[
} else {
- writer.write("«");
+ writer.writeText("»", null);
}
]]></jsp:scriptlet>
</div>
@@ -53,7 +53,7 @@
<u:insertFacet name="openMarker" />
<jsp:scriptlet><![CDATA[
} else {
- writer.write("»");
+ writer.writeText("«", null);
}
]]></jsp:scriptlet>
</div>
16 years, 9 months
JBoss Rich Faces SVN: r7649 - in branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html: facelets and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-04-07 18:49:35 -0400 (Mon, 07 Apr 2008)
New Revision: 7649
Added:
branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/
branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/ActionParamHandler.java
branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxListenerHandler.java
branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxPushHandler.java
branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxSupportHandler.java
branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/FacetHandler.java
branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/IncludeFaceletContext.java
branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/IncludeHandler.java
branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/KeepAliveHandler.java
branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/MediaOutputHandler.java
branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/RowKeyConverterRule.java
branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/package-info.java
Removed:
branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/ActionParamHandler.java
branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxListenerHandler.java
branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxSupportHandler.java
branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/FacetHandler.java
branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/IncludeFaceletContext.java
branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/IncludeHandler.java
branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/KeepAliveHandler.java
branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/MediaOutputHandler.java
branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/RowKeyConverterRule.java
branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/package-info.java
Log:
reverted changes from r7644-r7646
Copied: branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets (from rev 7566, branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets)
Deleted: branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/ActionParamHandler.java
===================================================================
--- branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/ActionParamHandler.java 2008-04-02 00:36:29 UTC (rev 7566)
+++ branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/ActionParamHandler.java 2008-04-07 22:49:35 UTC (rev 7649)
@@ -1,176 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.taglib.html.facelets;
-
-import javax.faces.application.Application;
-import javax.faces.component.ActionSource;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.convert.Converter;
-
-import org.ajax4jsf.Messages;
-import org.ajax4jsf.component.UIActionParameter;
-
-import com.sun.facelets.FaceletContext;
-import com.sun.facelets.tag.MetaRule;
-import com.sun.facelets.tag.MetaRuleset;
-import com.sun.facelets.tag.Metadata;
-import com.sun.facelets.tag.MetadataTarget;
-import com.sun.facelets.tag.TagAttribute;
-import com.sun.facelets.tag.TagAttributeException;
-import com.sun.facelets.tag.jsf.ComponentConfig;
-import com.sun.facelets.tag.jsf.ComponentHandler;
-
-/**
- * @author shura (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:23 $
- *
- */
-public class ActionParamHandler extends ComponentHandler {
-
- /**
- * @author shura (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:23 $
- *
- */
- public static class ActionParamMetaRule extends MetaRule {
-
- /* (non-Javadoc)
- * @see org.ajax4jsf.tag.SuggestionHandler.SuggestionMetaRule#applyRule(java.lang.String, com.sun.facelets.tag.TagAttribute, com.sun.facelets.tag.MetadataTarget)
- */
- public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) {
- if (meta.isTargetInstanceOf(UIActionParameter.class)) {
- if ("assignTo".equals(name)) {
- return new AssignToValueBindingMetadata(attribute);
- } else if ("converter".equals(name)) {
- if (attribute.isLiteral()) {
- return new LiteralConverterMetadata(attribute.getValue());
- } else {
- return new DynamicConverterMetadata(attribute);
- }
-
- }
- }
-
- return null;
- }
-
-
- }
-
- final static class LiteralConverterMetadata extends Metadata {
-
- private final String converterId;
-
- public LiteralConverterMetadata(String converterId) {
- this.converterId = converterId;
- }
-
- public void applyMetadata(FaceletContext ctx, Object instance) {
- ((UIActionParameter) instance).setConverter(ctx.getFacesContext()
- .getApplication().createConverter(this.converterId));
- }
- }
-
- final static class DynamicConverterMetadata extends Metadata {
-
- private final TagAttribute attr;
-
- public DynamicConverterMetadata(TagAttribute attr) {
- this.attr = attr;
- }
-
- public void applyMetadata(FaceletContext ctx, Object instance) {
- ((UIActionParameter) instance).setConverter((Converter) this.attr
- .getObject(ctx, Converter.class));
- }
- }
-
- final static class AssignToValueBindingMetadata extends Metadata {
-
- private final TagAttribute attr;
-
- public AssignToValueBindingMetadata(TagAttribute attr) {
- this.attr = attr;
- }
-
- public void applyMetadata(FaceletContext ctx, Object instance) {
- ((UIActionParameter) instance).setAssignToBinding(attr.getValueExpression(ctx,
- Object.class));
- }
- }
-
-
- private TagAttribute _assignTo;
- private TagAttribute _converter;
-
- /**
- * @param config
- */
- public ActionParamHandler(ComponentConfig config) {
- super(config);
- _assignTo = getAttribute("assignTo");
- _converter = getAttribute("converter");
- if(null != _assignTo) {
- if (_assignTo.isLiteral()) {
- throw new TagAttributeException(this.tag, this._assignTo, Messages.getMessage(Messages.MUST_BE_EXPRESSION_ERROR));
- }
-
- }
- // TODO Auto-generated constructor stub
- }
- /*
- * (non-Javadoc)
- *
- * @see com.sun.facelets.FaceletHandler#apply(com.sun.facelets.FaceletContext,
- * javax.faces.component.UIComponent)
- */
- public void onComponentCreated(FaceletContext ctx, UIComponent c, UIComponent parent) {
- if (parent instanceof ActionSource)
- {
- FacesContext facesContext = FacesContext.getCurrentInstance();
- Application application = facesContext.getApplication();
- if (_assignTo != null) {
- UIActionParameter al = (UIActionParameter)c;
- // TODO - in jsf 1.2 use ELValueExpression
-// al.setAssignToBinding(application.createValueBinding(_assignTo.getValue()));
-// if (_converter != null) {
-// Converter converter = application.createConverter(_converter.getValue(ctx));
-// al.setConverter(converter);
-// }
- ((ActionSource)parent).addActionListener(al);
- }
- }
- }
-
- private static final ActionParamMetaRule actionParamMetaRule = new ActionParamMetaRule();
-
- /* (non-Javadoc)
- * @see org.ajax4jsf.tag.AjaxComponentHandler#createMetaRuleset(java.lang.Class)
- */
- protected MetaRuleset createMetaRuleset(Class type) {
- MetaRuleset metaRules = super.createMetaRuleset(type);
- metaRules.addRule(actionParamMetaRule);
- return metaRules;
- }
-
-}
Copied: branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/ActionParamHandler.java (from rev 7566, branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/ActionParamHandler.java)
===================================================================
--- branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/ActionParamHandler.java (rev 0)
+++ branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/ActionParamHandler.java 2008-04-07 22:49:35 UTC (rev 7649)
@@ -0,0 +1,176 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.taglib.html.facelets;
+
+import javax.faces.application.Application;
+import javax.faces.component.ActionSource;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+
+import org.ajax4jsf.Messages;
+import org.ajax4jsf.component.UIActionParameter;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.MetaRule;
+import com.sun.facelets.tag.MetaRuleset;
+import com.sun.facelets.tag.Metadata;
+import com.sun.facelets.tag.MetadataTarget;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagAttributeException;
+import com.sun.facelets.tag.jsf.ComponentConfig;
+import com.sun.facelets.tag.jsf.ComponentHandler;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:23 $
+ *
+ */
+public class ActionParamHandler extends ComponentHandler {
+
+ /**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:23 $
+ *
+ */
+ public static class ActionParamMetaRule extends MetaRule {
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.tag.SuggestionHandler.SuggestionMetaRule#applyRule(java.lang.String, com.sun.facelets.tag.TagAttribute, com.sun.facelets.tag.MetadataTarget)
+ */
+ public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) {
+ if (meta.isTargetInstanceOf(UIActionParameter.class)) {
+ if ("assignTo".equals(name)) {
+ return new AssignToValueBindingMetadata(attribute);
+ } else if ("converter".equals(name)) {
+ if (attribute.isLiteral()) {
+ return new LiteralConverterMetadata(attribute.getValue());
+ } else {
+ return new DynamicConverterMetadata(attribute);
+ }
+
+ }
+ }
+
+ return null;
+ }
+
+
+ }
+
+ final static class LiteralConverterMetadata extends Metadata {
+
+ private final String converterId;
+
+ public LiteralConverterMetadata(String converterId) {
+ this.converterId = converterId;
+ }
+
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((UIActionParameter) instance).setConverter(ctx.getFacesContext()
+ .getApplication().createConverter(this.converterId));
+ }
+ }
+
+ final static class DynamicConverterMetadata extends Metadata {
+
+ private final TagAttribute attr;
+
+ public DynamicConverterMetadata(TagAttribute attr) {
+ this.attr = attr;
+ }
+
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((UIActionParameter) instance).setConverter((Converter) this.attr
+ .getObject(ctx, Converter.class));
+ }
+ }
+
+ final static class AssignToValueBindingMetadata extends Metadata {
+
+ private final TagAttribute attr;
+
+ public AssignToValueBindingMetadata(TagAttribute attr) {
+ this.attr = attr;
+ }
+
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((UIActionParameter) instance).setAssignToBinding(attr.getValueExpression(ctx,
+ Object.class));
+ }
+ }
+
+
+ private TagAttribute _assignTo;
+ private TagAttribute _converter;
+
+ /**
+ * @param config
+ */
+ public ActionParamHandler(ComponentConfig config) {
+ super(config);
+ _assignTo = getAttribute("assignTo");
+ _converter = getAttribute("converter");
+ if(null != _assignTo) {
+ if (_assignTo.isLiteral()) {
+ throw new TagAttributeException(this.tag, this._assignTo, Messages.getMessage(Messages.MUST_BE_EXPRESSION_ERROR));
+ }
+
+ }
+ // TODO Auto-generated constructor stub
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.sun.facelets.FaceletHandler#apply(com.sun.facelets.FaceletContext,
+ * javax.faces.component.UIComponent)
+ */
+ public void onComponentCreated(FaceletContext ctx, UIComponent c, UIComponent parent) {
+ if (parent instanceof ActionSource)
+ {
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ Application application = facesContext.getApplication();
+ if (_assignTo != null) {
+ UIActionParameter al = (UIActionParameter)c;
+ // TODO - in jsf 1.2 use ELValueExpression
+// al.setAssignToBinding(application.createValueBinding(_assignTo.getValue()));
+// if (_converter != null) {
+// Converter converter = application.createConverter(_converter.getValue(ctx));
+// al.setConverter(converter);
+// }
+ ((ActionSource)parent).addActionListener(al);
+ }
+ }
+ }
+
+ private static final ActionParamMetaRule actionParamMetaRule = new ActionParamMetaRule();
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.tag.AjaxComponentHandler#createMetaRuleset(java.lang.Class)
+ */
+ protected MetaRuleset createMetaRuleset(Class type) {
+ MetaRuleset metaRules = super.createMetaRuleset(type);
+ metaRules.addRule(actionParamMetaRule);
+ return metaRules;
+ }
+
+}
Deleted: branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxListenerHandler.java
===================================================================
--- branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxListenerHandler.java 2008-04-02 00:36:29 UTC (rev 7566)
+++ branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxListenerHandler.java 2008-04-07 22:49:35 UTC (rev 7649)
@@ -1,122 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.taglib.html.facelets;
-
-import java.io.IOException;
-
-import javax.el.ELException;
-import javax.el.ValueExpression;
-import javax.faces.FacesException;
-import javax.faces.component.UIComponent;
-
-import org.ajax4jsf.Messages;
-import org.ajax4jsf.event.AjaxListener;
-import org.ajax4jsf.event.AjaxListenerHelper;
-import org.ajax4jsf.event.AjaxSource;
-
-import com.sun.facelets.FaceletContext;
-import com.sun.facelets.FaceletException;
-import com.sun.facelets.el.LegacyValueBinding;
-import com.sun.facelets.tag.TagAttribute;
-import com.sun.facelets.tag.TagAttributeException;
-import com.sun.facelets.tag.TagConfig;
-import com.sun.facelets.tag.TagException;
-import com.sun.facelets.tag.TagHandler;
-
-/**
- * Register an ActionListener instance on the UIComponent associated with the
- * closest parent UIComponent custom action. <p/> See <a target="_new"
- * href="http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/f/actionList...">tag
- * documentation</a>.
- *
- * @see javax.faces.event.ActionListener
- * @see javax.faces.component.AjaxContainer
- * @author Jacob Hookom
- * @version $Id: AjaxListenerHandler.java,v 1.1.2.1 2007/02/01 15:31:23 alexsmirnov Exp $
- */
-public final class AjaxListenerHandler extends TagHandler {
-
- private Class listenerType;
-
- private final TagAttribute type;
-
- private final TagAttribute binding;
-
- /**
- * @param config
- */
- public AjaxListenerHandler(TagConfig config) {
- super(config);
- this.binding = this.getAttribute("binding");
- this.type = this.getAttribute("type");
- if(binding == null && type == null){
- throw new TagException(this.tag, "One of the attribute 'binding' or type' is required");
- }
- if (binding == null && type != null) {
- if (!type.isLiteral()) {
- throw new TagAttributeException(this.tag, this.type, Messages.getMessage(Messages.MUST_BE_LITERAL_ERROR));
- }
- try {
- this.listenerType = Class.forName(type.getValue());
- } catch (Exception e) {
- throw new TagAttributeException(this.tag, this.type, e);
- }
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.sun.facelets.FaceletHandler#apply(com.sun.facelets.FaceletContext,
- * javax.faces.component.UIComponent)
- */
- public void apply(FaceletContext ctx, UIComponent parent)
- throws IOException, FacesException, FaceletException, ELException {
- if (parent instanceof AjaxSource) {
- // only process if parent was just created
- if (parent.getParent() == null) {
- AjaxSource src = (AjaxSource) parent;
- AjaxListener listener = null;
- ValueExpression ve = null;
- if (this.binding != null) {
- ve = this.binding.getValueExpression(ctx,
- AjaxListener.class);
- // TODO - handle both JSF 1.2/1.1 cases.
- listener = new AjaxListenerHelper(new LegacyValueBinding(ve));
- }
- if (listener == null) {
- try {
- listener = (AjaxListener) listenerType.newInstance();
- } catch (Exception e) {
- throw new TagAttributeException(this.tag, this.type, e.getCause());
- }
- if (ve != null) {
- ve.setValue(ctx, ve);
- }
- }
- src.addAjaxListener(listener);
- }
- } else {
- throw new TagException(this.tag, Messages.getMessage(Messages.NOT_PARENT_AJAX_COMPONENT_ERROR, parent));
- }
- }
-}
Copied: branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxListenerHandler.java (from rev 7566, branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxListenerHandler.java)
===================================================================
--- branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxListenerHandler.java (rev 0)
+++ branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxListenerHandler.java 2008-04-07 22:49:35 UTC (rev 7649)
@@ -0,0 +1,122 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.taglib.html.facelets;
+
+import java.io.IOException;
+
+import javax.el.ELException;
+import javax.el.ValueExpression;
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+
+import org.ajax4jsf.Messages;
+import org.ajax4jsf.event.AjaxListener;
+import org.ajax4jsf.event.AjaxListenerHelper;
+import org.ajax4jsf.event.AjaxSource;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.FaceletException;
+import com.sun.facelets.el.LegacyValueBinding;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagAttributeException;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.tag.TagException;
+import com.sun.facelets.tag.TagHandler;
+
+/**
+ * Register an ActionListener instance on the UIComponent associated with the
+ * closest parent UIComponent custom action. <p/> See <a target="_new"
+ * href="http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/f/actionList...">tag
+ * documentation</a>.
+ *
+ * @see javax.faces.event.ActionListener
+ * @see javax.faces.component.AjaxContainer
+ * @author Jacob Hookom
+ * @version $Id: AjaxListenerHandler.java,v 1.1.2.1 2007/02/01 15:31:23 alexsmirnov Exp $
+ */
+public final class AjaxListenerHandler extends TagHandler {
+
+ private Class listenerType;
+
+ private final TagAttribute type;
+
+ private final TagAttribute binding;
+
+ /**
+ * @param config
+ */
+ public AjaxListenerHandler(TagConfig config) {
+ super(config);
+ this.binding = this.getAttribute("binding");
+ this.type = this.getAttribute("type");
+ if(binding == null && type == null){
+ throw new TagException(this.tag, "One of the attribute 'binding' or type' is required");
+ }
+ if (binding == null && type != null) {
+ if (!type.isLiteral()) {
+ throw new TagAttributeException(this.tag, this.type, Messages.getMessage(Messages.MUST_BE_LITERAL_ERROR));
+ }
+ try {
+ this.listenerType = Class.forName(type.getValue());
+ } catch (Exception e) {
+ throw new TagAttributeException(this.tag, this.type, e);
+ }
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.sun.facelets.FaceletHandler#apply(com.sun.facelets.FaceletContext,
+ * javax.faces.component.UIComponent)
+ */
+ public void apply(FaceletContext ctx, UIComponent parent)
+ throws IOException, FacesException, FaceletException, ELException {
+ if (parent instanceof AjaxSource) {
+ // only process if parent was just created
+ if (parent.getParent() == null) {
+ AjaxSource src = (AjaxSource) parent;
+ AjaxListener listener = null;
+ ValueExpression ve = null;
+ if (this.binding != null) {
+ ve = this.binding.getValueExpression(ctx,
+ AjaxListener.class);
+ // TODO - handle both JSF 1.2/1.1 cases.
+ listener = new AjaxListenerHelper(new LegacyValueBinding(ve));
+ }
+ if (listener == null) {
+ try {
+ listener = (AjaxListener) listenerType.newInstance();
+ } catch (Exception e) {
+ throw new TagAttributeException(this.tag, this.type, e.getCause());
+ }
+ if (ve != null) {
+ ve.setValue(ctx, ve);
+ }
+ }
+ src.addAjaxListener(listener);
+ }
+ } else {
+ throw new TagException(this.tag, Messages.getMessage(Messages.NOT_PARENT_AJAX_COMPONENT_ERROR, parent));
+ }
+ }
+}
Added: branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxPushHandler.java
===================================================================
--- branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxPushHandler.java (rev 0)
+++ branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxPushHandler.java 2008-04-07 22:49:35 UTC (rev 7649)
@@ -0,0 +1,118 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.taglib.html.facelets;
+
+import java.util.EventListener;
+
+import org.ajax4jsf.component.UIPush;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.MetaRule;
+import com.sun.facelets.tag.MetaRuleset;
+import com.sun.facelets.tag.Metadata;
+import com.sun.facelets.tag.MetadataTarget;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.jsf.ComponentConfig;
+import com.sun.facelets.tag.jsf.ComponentHandler;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 7646 $ $Date: 2008-04-08 01:31:52 +0300 (Вт, 08 апр 2008) $
+ *
+ */
+public class AjaxPushHandler extends ComponentHandler {
+
+ private static final MetaRule ajaxPushMetaRule = new AjaxPushMetaRule();
+ /**
+ * @param config
+ */
+ public AjaxPushHandler(ComponentConfig config) {
+ super(config);
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.tag.AjaxComponentHandler#createMetaRuleset(java.lang.Class)
+ */
+ protected MetaRuleset createMetaRuleset(Class type) {
+ MetaRuleset metaRules = super.createMetaRuleset(type);
+ metaRules.addRule(ajaxPushMetaRule);
+ return metaRules;
+ }
+
+ /**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 7646 $ $Date: 2008-04-08 01:31:52 +0300 (Вт, 08 апр 2008) $
+ *
+ */
+ static class AjaxPushMetaRule extends MetaRule{
+
+ /**
+ *
+ */
+ public AjaxPushMetaRule() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.facelets.tag.MetaRule#applyRule(java.lang.String, com.sun.facelets.tag.TagAttribute, com.sun.facelets.tag.MetadataTarget)
+ */
+ public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) {
+ if (meta.isTargetInstanceOf(UIPush.class)) {
+
+
+ if ("eventProducer".equals(name)) {
+ return new AjaxPushActionMapper(attribute);
+ }
+ }
+ return null;
+ }
+
+ }
+ /**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 7646 $ $Date: 2008-04-08 01:31:52 +0300 (Вт, 08 апр 2008) $
+ *
+ */
+ static class AjaxPushActionMapper extends Metadata {
+
+ private static final Class<?>[] AJAX_PUSH_ACTION_SIG = new Class[] {EventListener.class};
+
+ private final TagAttribute _send;
+ /**
+ * @param attribute
+ */
+ public AjaxPushActionMapper(TagAttribute attribute) {
+ _send = attribute;
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.facelets.tag.Metadata#applyMetadata(com.sun.facelets.FaceletContext, java.lang.Object)
+ */
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((UIPush) instance).setEventProducer(this._send.getMethodExpression(ctx, null,
+ AJAX_PUSH_ACTION_SIG));
+ }
+
+ }
+
+}
Deleted: branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxSupportHandler.java
===================================================================
--- branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxSupportHandler.java 2008-04-02 00:36:29 UTC (rev 7566)
+++ branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxSupportHandler.java 2008-04-07 22:49:35 UTC (rev 7649)
@@ -1,98 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.taglib.html.facelets;
-
-import java.io.IOException;
-
-import javax.el.ELException;
-import javax.faces.FacesException;
-import javax.faces.component.UIComponent;
-import javax.faces.component.UIComponentBase;
-
-import org.ajax4jsf.taglib.html.jsp.AjaxSupportTag;
-import org.ajax4jsf.webapp.taglib.AjaxComponentHandler;
-
-import com.sun.facelets.FaceletContext;
-import com.sun.facelets.FaceletException;
-import com.sun.facelets.tag.TagAttribute;
-import com.sun.facelets.tag.TagHandler;
-import com.sun.facelets.tag.jsf.ComponentConfig;
-
-/**
- * "proxy" class for creating UIAjaxSupport component as facet for it's parent.
- * @author shura (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:22 $
- *
- */
-public class AjaxSupportHandler extends TagHandler {
- /**
- * A UIComponent for capturing a child UIComponent, representative of the
- * desired Facet
- *
- * @author Jacob Hookom
- *
- */
- private final static class UIFacet extends UIComponentBase {
- public String getFamily() {
- return null;
- }
- }
-
- /**
- * Real tag handler for create component.
- */
- private TagHandler _ajaxSupportHandler;
-
- private TagAttribute _event;
- /**
- * @param config
- */
- public AjaxSupportHandler(ComponentConfig config) {
- super(config);
- _event = getRequiredAttribute("event");
- _ajaxSupportHandler = new AjaxComponentHandler(config);
- }
-
- /* (non-Javadoc)
- * @see com.sun.facelets.FaceletHandler#apply(com.sun.facelets.FaceletContext, javax.faces.component.UIComponent)
- */
- public void apply(FaceletContext ctx, UIComponent parent)
- throws IOException, FacesException, FaceletException, ELException {
- UIComponent c;
- // our id
-// String id = ctx.generateUniqueId(this.tagId);
- UIFacet facet = new UIFacet();
- // Find facet for support component
- String facetName = AjaxSupportTag.AJAX_SUPPORT_FACET+_event.getValue();
- c = parent.getFacet(facetName);
- if (null != c) {
- parent.getFacets().remove(facetName);
- facet.getChildren().add(c);
- }
- this._ajaxSupportHandler.apply(ctx, facet);
- c = (UIComponent) facet.getChildren().get(0);
- parent.getFacets().put(facetName, c);
- // Fix for possible incompabilites in different frameworks.
-// c.setParentProperties(parent);
- }
-
-}
Copied: branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxSupportHandler.java (from rev 7566, branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxSupportHandler.java)
===================================================================
--- branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxSupportHandler.java (rev 0)
+++ branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxSupportHandler.java 2008-04-07 22:49:35 UTC (rev 7649)
@@ -0,0 +1,98 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.taglib.html.facelets;
+
+import java.io.IOException;
+
+import javax.el.ELException;
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIComponentBase;
+
+import org.ajax4jsf.taglib.html.jsp.AjaxSupportTag;
+import org.ajax4jsf.webapp.taglib.AjaxComponentHandler;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.FaceletException;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagHandler;
+import com.sun.facelets.tag.jsf.ComponentConfig;
+
+/**
+ * "proxy" class for creating UIAjaxSupport component as facet for it's parent.
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:22 $
+ *
+ */
+public class AjaxSupportHandler extends TagHandler {
+ /**
+ * A UIComponent for capturing a child UIComponent, representative of the
+ * desired Facet
+ *
+ * @author Jacob Hookom
+ *
+ */
+ private final static class UIFacet extends UIComponentBase {
+ public String getFamily() {
+ return null;
+ }
+ }
+
+ /**
+ * Real tag handler for create component.
+ */
+ private TagHandler _ajaxSupportHandler;
+
+ private TagAttribute _event;
+ /**
+ * @param config
+ */
+ public AjaxSupportHandler(ComponentConfig config) {
+ super(config);
+ _event = getRequiredAttribute("event");
+ _ajaxSupportHandler = new AjaxComponentHandler(config);
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.facelets.FaceletHandler#apply(com.sun.facelets.FaceletContext, javax.faces.component.UIComponent)
+ */
+ public void apply(FaceletContext ctx, UIComponent parent)
+ throws IOException, FacesException, FaceletException, ELException {
+ UIComponent c;
+ // our id
+// String id = ctx.generateUniqueId(this.tagId);
+ UIFacet facet = new UIFacet();
+ // Find facet for support component
+ String facetName = AjaxSupportTag.AJAX_SUPPORT_FACET+_event.getValue();
+ c = parent.getFacet(facetName);
+ if (null != c) {
+ parent.getFacets().remove(facetName);
+ facet.getChildren().add(c);
+ }
+ this._ajaxSupportHandler.apply(ctx, facet);
+ c = (UIComponent) facet.getChildren().get(0);
+ parent.getFacets().put(facetName, c);
+ // Fix for possible incompabilites in different frameworks.
+// c.setParentProperties(parent);
+ }
+
+}
Deleted: branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/FacetHandler.java
===================================================================
--- branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/FacetHandler.java 2008-04-02 00:36:29 UTC (rev 7566)
+++ branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/FacetHandler.java 2008-04-07 22:49:35 UTC (rev 7649)
@@ -1,94 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.taglib.html.facelets;
-
-import java.io.IOException;
-
-import javax.el.ELException;
-import javax.faces.FacesException;
-import javax.faces.component.UIComponent;
-import javax.faces.component.UIComponentBase;
-
-import org.ajax4jsf.Messages;
-
-import com.sun.facelets.FaceletContext;
-import com.sun.facelets.FaceletException;
-import com.sun.facelets.tag.TagAttribute;
-import com.sun.facelets.tag.TagConfig;
-import com.sun.facelets.tag.TagException;
-import com.sun.facelets.tag.TagHandler;
-
-/**
- * Register a named facet on the UIComponent associated with the closest parent
- * UIComponent custom action. <p/> See <a target="_new"
- * href="http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/f/facet.html">tag
- * documentation</a>.
- *
- * @author Jacob Hookom
- * @version $Id: FacetHandler.java,v 1.1.2.1 2007/02/01 15:31:21 alexsmirnov Exp $
- */
-public final class FacetHandler extends TagHandler {
-
- /**
- * A UIComponent for capturing a child UIComponent, representative of the
- * desired Facet
- *
- * @author Jacob Hookom
- *
- */
- private final static class UIFacet extends UIComponentBase {
- public String getFamily() {
- return null;
- }
- }
-
- protected final TagAttribute name;
-
- public FacetHandler(TagConfig config) {
- super(config);
- this.name = this.getRequiredAttribute("name");
- }
-
- /* (non-Javadoc)
- * @see com.sun.facelets.FaceletHandler#apply(com.sun.facelets.FaceletContext, javax.faces.component.UIComponent)
- */
- public void apply(FaceletContext ctx, UIComponent parent)
- throws IOException, FacesException, FaceletException, ELException {
- UIFacet facet = new UIFacet();
- UIComponent c;
- // Check for existing facet
- String facetName = this.name.getValue(ctx);
- c = parent.getFacet(facetName);
- if (null != c) {
- parent.getFacets().remove(facetName);
- facet.getChildren().add(c);
- }
- this.nextHandler.apply(ctx, facet);
- int childCount = facet.getChildCount();
- if (childCount == 1) {
- c = (UIComponent) facet.getChildren().get(0);
- parent.getFacets().put(facetName, c);
- } else {
- throw new TagException(this.tag, Messages.getMessage(Messages.FACET_TAG_MANY_CHILDREN_ERROR));
- }
- }
-}
Copied: branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/FacetHandler.java (from rev 7566, branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/FacetHandler.java)
===================================================================
--- branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/FacetHandler.java (rev 0)
+++ branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/FacetHandler.java 2008-04-07 22:49:35 UTC (rev 7649)
@@ -0,0 +1,94 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.taglib.html.facelets;
+
+import java.io.IOException;
+
+import javax.el.ELException;
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIComponentBase;
+
+import org.ajax4jsf.Messages;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.FaceletException;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.tag.TagException;
+import com.sun.facelets.tag.TagHandler;
+
+/**
+ * Register a named facet on the UIComponent associated with the closest parent
+ * UIComponent custom action. <p/> See <a target="_new"
+ * href="http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/f/facet.html">tag
+ * documentation</a>.
+ *
+ * @author Jacob Hookom
+ * @version $Id: FacetHandler.java,v 1.1.2.1 2007/02/01 15:31:21 alexsmirnov Exp $
+ */
+public final class FacetHandler extends TagHandler {
+
+ /**
+ * A UIComponent for capturing a child UIComponent, representative of the
+ * desired Facet
+ *
+ * @author Jacob Hookom
+ *
+ */
+ private final static class UIFacet extends UIComponentBase {
+ public String getFamily() {
+ return null;
+ }
+ }
+
+ protected final TagAttribute name;
+
+ public FacetHandler(TagConfig config) {
+ super(config);
+ this.name = this.getRequiredAttribute("name");
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.facelets.FaceletHandler#apply(com.sun.facelets.FaceletContext, javax.faces.component.UIComponent)
+ */
+ public void apply(FaceletContext ctx, UIComponent parent)
+ throws IOException, FacesException, FaceletException, ELException {
+ UIFacet facet = new UIFacet();
+ UIComponent c;
+ // Check for existing facet
+ String facetName = this.name.getValue(ctx);
+ c = parent.getFacet(facetName);
+ if (null != c) {
+ parent.getFacets().remove(facetName);
+ facet.getChildren().add(c);
+ }
+ this.nextHandler.apply(ctx, facet);
+ int childCount = facet.getChildCount();
+ if (childCount == 1) {
+ c = (UIComponent) facet.getChildren().get(0);
+ parent.getFacets().put(facetName, c);
+ } else {
+ throw new TagException(this.tag, Messages.getMessage(Messages.FACET_TAG_MANY_CHILDREN_ERROR));
+ }
+ }
+}
Deleted: branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/IncludeFaceletContext.java
===================================================================
--- branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/IncludeFaceletContext.java 2008-04-02 00:36:29 UTC (rev 7566)
+++ branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/IncludeFaceletContext.java 2008-04-07 22:49:35 UTC (rev 7649)
@@ -1,274 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.taglib.html.facelets;
-
-import java.io.IOException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.Map;
-
-import javax.el.ELException;
-import javax.el.ELResolver;
-import javax.el.ExpressionFactory;
-import javax.el.FunctionMapper;
-import javax.el.VariableMapper;
-import javax.faces.FacesException;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-
-import com.sun.facelets.FaceletContext;
-import com.sun.facelets.FaceletException;
-import com.sun.facelets.TemplateClient;
-
-/**
- * @author shura
- *
- */
-public class IncludeFaceletContext extends FaceletContext {
-
- private FaceletContext defaultContext;
-
- private Map ids;
-
- /**
- * @param defaultContext
- */
- public IncludeFaceletContext(FaceletContext defaultContext) {
- this.defaultContext = defaultContext;
- this.ids = new HashMap();
- }
-
- /**
- * @param client
- * @see com.sun.facelets.FaceletContext#extendClient(com.sun.facelets.TemplateClient)
- */
- public void extendClient(TemplateClient client) {
- this.defaultContext.extendClient(client);
- }
-
- /**
- * @param base
- * @return
- * @see com.sun.facelets.FaceletContext#generateUniqueId(java.lang.String)
- */
- public String generateUniqueId(String base) {
- Integer cnt = (Integer) this.ids.get(base);
- if (cnt == null) {
- this.ids.put(base, new Integer(0));
- return base;
- } else {
- int i = cnt.intValue() + 1;
- this.ids.put(base, new Integer(i));
- return base + "_" + i;
- }
- }
-
- /**
- * @param name
- * @return
- * @see com.sun.facelets.FaceletContext#getAttribute(java.lang.String)
- */
- public Object getAttribute(String name) {
- return this.defaultContext.getAttribute(name);
- }
-
- /**
- * @param key
- * @return
- * @see javax.el.ELContext#getContext(java.lang.Class)
- */
- public Object getContext(Class key) {
- return this.defaultContext.getContext(key);
- }
-
- /**
- * @return
- * @see javax.el.ELContext#getELResolver()
- */
- public ELResolver getELResolver() {
- return this.defaultContext.getELResolver();
- }
-
- /**
- * @return
- * @see com.sun.facelets.FaceletContext#getExpressionFactory()
- */
- public ExpressionFactory getExpressionFactory() {
- return this.defaultContext.getExpressionFactory();
- }
-
- /**
- * @return
- * @see com.sun.facelets.FaceletContext#getFacesContext()
- */
- public FacesContext getFacesContext() {
- return this.defaultContext.getFacesContext();
- }
-
- /**
- * @return
- * @see javax.el.ELContext#getFunctionMapper()
- */
- public FunctionMapper getFunctionMapper() {
- return this.defaultContext.getFunctionMapper();
- }
-
- /**
- * @return
- * @see javax.el.ELContext#getLocale()
- */
- public Locale getLocale() {
- return this.defaultContext.getLocale();
- }
-
- /**
- * @return
- * @see javax.el.ELContext#getVariableMapper()
- */
- public VariableMapper getVariableMapper() {
- return this.defaultContext.getVariableMapper();
- }
-
- /**
- * @return
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return this.defaultContext.hashCode();
- }
-
- /**
- * @param parent
- * @param name
- * @return
- * @throws IOException
- * @throws FaceletException
- * @throws FacesException
- * @throws ELException
- * @see com.sun.facelets.FaceletContext#includeDefinition(javax.faces.component.UIComponent, java.lang.String)
- */
- public boolean includeDefinition(UIComponent parent, String name) throws IOException, FaceletException, FacesException, ELException {
- return this.defaultContext.includeDefinition(parent, name);
- }
-
- /**
- * @param parent
- * @param relativePath
- * @throws IOException
- * @throws FaceletException
- * @throws FacesException
- * @throws ELException
- * @see com.sun.facelets.FaceletContext#includeFacelet(javax.faces.component.UIComponent, java.lang.String)
- */
- public void includeFacelet(UIComponent parent, String relativePath) throws IOException, FaceletException, FacesException, ELException {
- this.defaultContext.includeFacelet(parent, relativePath);
- }
-
- /**
- * @param parent
- * @param absolutePath
- * @throws IOException
- * @throws FaceletException
- * @throws FacesException
- * @throws ELException
- * @see com.sun.facelets.FaceletContext#includeFacelet(javax.faces.component.UIComponent, java.net.URL)
- */
- public void includeFacelet(UIComponent parent, URL absolutePath) throws IOException, FaceletException, FacesException, ELException {
- this.defaultContext.includeFacelet(parent, absolutePath);
- }
-
- /**
- * @return
- * @see javax.el.ELContext#isPropertyResolved()
- */
- public boolean isPropertyResolved() {
- return this.defaultContext.isPropertyResolved();
- }
-
- /**
- * @param client
- * @see com.sun.facelets.FaceletContext#popClient(com.sun.facelets.TemplateClient)
- */
- public void popClient(TemplateClient client) {
- this.defaultContext.popClient(client);
- }
-
- /**
- * @param client
- * @see com.sun.facelets.FaceletContext#pushClient(com.sun.facelets.TemplateClient)
- */
- public void pushClient(TemplateClient client) {
- this.defaultContext.pushClient(client);
- }
-
- /**
- * @param key
- * @param contextObject
- * @see javax.el.ELContext#putContext(java.lang.Class, java.lang.Object)
- */
- public void putContext(Class key, Object contextObject) {
- this.defaultContext.putContext(key, contextObject);
- }
-
- /**
- * @param name
- * @param value
- * @see com.sun.facelets.FaceletContext#setAttribute(java.lang.String, java.lang.Object)
- */
- public void setAttribute(String name, Object value) {
- this.defaultContext.setAttribute(name, value);
- }
-
- /**
- * @param fnMapper
- * @see com.sun.facelets.FaceletContext#setFunctionMapper(javax.el.FunctionMapper)
- */
- public void setFunctionMapper(FunctionMapper fnMapper) {
- this.defaultContext.setFunctionMapper(fnMapper);
- }
-
- /**
- * @param locale
- * @see javax.el.ELContext#setLocale(java.util.Locale)
- */
- public void setLocale(Locale locale) {
- this.defaultContext.setLocale(locale);
- }
-
- /**
- * @param resolved
- * @see javax.el.ELContext#setPropertyResolved(boolean)
- */
- public void setPropertyResolved(boolean resolved) {
- this.defaultContext.setPropertyResolved(resolved);
- }
-
- /**
- * @param varMapper
- * @see com.sun.facelets.FaceletContext#setVariableMapper(javax.el.VariableMapper)
- */
- public void setVariableMapper(VariableMapper varMapper) {
- this.defaultContext.setVariableMapper(varMapper);
- }
-
-}
Copied: branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/IncludeFaceletContext.java (from rev 7566, branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/IncludeFaceletContext.java)
===================================================================
--- branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/IncludeFaceletContext.java (rev 0)
+++ branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/IncludeFaceletContext.java 2008-04-07 22:49:35 UTC (rev 7649)
@@ -0,0 +1,274 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.taglib.html.facelets;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+
+import javax.el.ELException;
+import javax.el.ELResolver;
+import javax.el.ExpressionFactory;
+import javax.el.FunctionMapper;
+import javax.el.VariableMapper;
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.FaceletException;
+import com.sun.facelets.TemplateClient;
+
+/**
+ * @author shura
+ *
+ */
+public class IncludeFaceletContext extends FaceletContext {
+
+ private FaceletContext defaultContext;
+
+ private Map ids;
+
+ /**
+ * @param defaultContext
+ */
+ public IncludeFaceletContext(FaceletContext defaultContext) {
+ this.defaultContext = defaultContext;
+ this.ids = new HashMap();
+ }
+
+ /**
+ * @param client
+ * @see com.sun.facelets.FaceletContext#extendClient(com.sun.facelets.TemplateClient)
+ */
+ public void extendClient(TemplateClient client) {
+ this.defaultContext.extendClient(client);
+ }
+
+ /**
+ * @param base
+ * @return
+ * @see com.sun.facelets.FaceletContext#generateUniqueId(java.lang.String)
+ */
+ public String generateUniqueId(String base) {
+ Integer cnt = (Integer) this.ids.get(base);
+ if (cnt == null) {
+ this.ids.put(base, new Integer(0));
+ return base;
+ } else {
+ int i = cnt.intValue() + 1;
+ this.ids.put(base, new Integer(i));
+ return base + "_" + i;
+ }
+ }
+
+ /**
+ * @param name
+ * @return
+ * @see com.sun.facelets.FaceletContext#getAttribute(java.lang.String)
+ */
+ public Object getAttribute(String name) {
+ return this.defaultContext.getAttribute(name);
+ }
+
+ /**
+ * @param key
+ * @return
+ * @see javax.el.ELContext#getContext(java.lang.Class)
+ */
+ public Object getContext(Class key) {
+ return this.defaultContext.getContext(key);
+ }
+
+ /**
+ * @return
+ * @see javax.el.ELContext#getELResolver()
+ */
+ public ELResolver getELResolver() {
+ return this.defaultContext.getELResolver();
+ }
+
+ /**
+ * @return
+ * @see com.sun.facelets.FaceletContext#getExpressionFactory()
+ */
+ public ExpressionFactory getExpressionFactory() {
+ return this.defaultContext.getExpressionFactory();
+ }
+
+ /**
+ * @return
+ * @see com.sun.facelets.FaceletContext#getFacesContext()
+ */
+ public FacesContext getFacesContext() {
+ return this.defaultContext.getFacesContext();
+ }
+
+ /**
+ * @return
+ * @see javax.el.ELContext#getFunctionMapper()
+ */
+ public FunctionMapper getFunctionMapper() {
+ return this.defaultContext.getFunctionMapper();
+ }
+
+ /**
+ * @return
+ * @see javax.el.ELContext#getLocale()
+ */
+ public Locale getLocale() {
+ return this.defaultContext.getLocale();
+ }
+
+ /**
+ * @return
+ * @see javax.el.ELContext#getVariableMapper()
+ */
+ public VariableMapper getVariableMapper() {
+ return this.defaultContext.getVariableMapper();
+ }
+
+ /**
+ * @return
+ * @see java.lang.Object#hashCode()
+ */
+ public int hashCode() {
+ return this.defaultContext.hashCode();
+ }
+
+ /**
+ * @param parent
+ * @param name
+ * @return
+ * @throws IOException
+ * @throws FaceletException
+ * @throws FacesException
+ * @throws ELException
+ * @see com.sun.facelets.FaceletContext#includeDefinition(javax.faces.component.UIComponent, java.lang.String)
+ */
+ public boolean includeDefinition(UIComponent parent, String name) throws IOException, FaceletException, FacesException, ELException {
+ return this.defaultContext.includeDefinition(parent, name);
+ }
+
+ /**
+ * @param parent
+ * @param relativePath
+ * @throws IOException
+ * @throws FaceletException
+ * @throws FacesException
+ * @throws ELException
+ * @see com.sun.facelets.FaceletContext#includeFacelet(javax.faces.component.UIComponent, java.lang.String)
+ */
+ public void includeFacelet(UIComponent parent, String relativePath) throws IOException, FaceletException, FacesException, ELException {
+ this.defaultContext.includeFacelet(parent, relativePath);
+ }
+
+ /**
+ * @param parent
+ * @param absolutePath
+ * @throws IOException
+ * @throws FaceletException
+ * @throws FacesException
+ * @throws ELException
+ * @see com.sun.facelets.FaceletContext#includeFacelet(javax.faces.component.UIComponent, java.net.URL)
+ */
+ public void includeFacelet(UIComponent parent, URL absolutePath) throws IOException, FaceletException, FacesException, ELException {
+ this.defaultContext.includeFacelet(parent, absolutePath);
+ }
+
+ /**
+ * @return
+ * @see javax.el.ELContext#isPropertyResolved()
+ */
+ public boolean isPropertyResolved() {
+ return this.defaultContext.isPropertyResolved();
+ }
+
+ /**
+ * @param client
+ * @see com.sun.facelets.FaceletContext#popClient(com.sun.facelets.TemplateClient)
+ */
+ public void popClient(TemplateClient client) {
+ this.defaultContext.popClient(client);
+ }
+
+ /**
+ * @param client
+ * @see com.sun.facelets.FaceletContext#pushClient(com.sun.facelets.TemplateClient)
+ */
+ public void pushClient(TemplateClient client) {
+ this.defaultContext.pushClient(client);
+ }
+
+ /**
+ * @param key
+ * @param contextObject
+ * @see javax.el.ELContext#putContext(java.lang.Class, java.lang.Object)
+ */
+ public void putContext(Class key, Object contextObject) {
+ this.defaultContext.putContext(key, contextObject);
+ }
+
+ /**
+ * @param name
+ * @param value
+ * @see com.sun.facelets.FaceletContext#setAttribute(java.lang.String, java.lang.Object)
+ */
+ public void setAttribute(String name, Object value) {
+ this.defaultContext.setAttribute(name, value);
+ }
+
+ /**
+ * @param fnMapper
+ * @see com.sun.facelets.FaceletContext#setFunctionMapper(javax.el.FunctionMapper)
+ */
+ public void setFunctionMapper(FunctionMapper fnMapper) {
+ this.defaultContext.setFunctionMapper(fnMapper);
+ }
+
+ /**
+ * @param locale
+ * @see javax.el.ELContext#setLocale(java.util.Locale)
+ */
+ public void setLocale(Locale locale) {
+ this.defaultContext.setLocale(locale);
+ }
+
+ /**
+ * @param resolved
+ * @see javax.el.ELContext#setPropertyResolved(boolean)
+ */
+ public void setPropertyResolved(boolean resolved) {
+ this.defaultContext.setPropertyResolved(resolved);
+ }
+
+ /**
+ * @param varMapper
+ * @see com.sun.facelets.FaceletContext#setVariableMapper(javax.el.VariableMapper)
+ */
+ public void setVariableMapper(VariableMapper varMapper) {
+ this.defaultContext.setVariableMapper(varMapper);
+ }
+
+}
Deleted: branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/IncludeHandler.java
===================================================================
--- branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/IncludeHandler.java 2008-04-02 00:36:29 UTC (rev 7566)
+++ branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/IncludeHandler.java 2008-04-07 22:49:35 UTC (rev 7649)
@@ -1,91 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.taglib.html.facelets;
-
-import java.io.IOException;
-
-import javax.el.ELException;
-import javax.el.VariableMapper;
-import javax.faces.FacesException;
-import javax.faces.component.UIComponent;
-
-import org.ajax4jsf.component.UIInclude;
-
-import com.sun.facelets.FaceletContext;
-import com.sun.facelets.el.VariableMapperWrapper;
-import com.sun.facelets.tag.TagAttribute;
-import com.sun.facelets.tag.jsf.ComponentConfig;
-import com.sun.facelets.tag.jsf.ComponentHandler;
-
-/**
- * @author shura
- *
- */
-public class IncludeHandler extends ComponentHandler {
-
- private TagAttribute viewId;
-
- public IncludeHandler(ComponentConfig config) {
- super(config);
- this.viewId = getRequiredAttribute("viewId");
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.sun.facelets.tag.jsf.ComponentHandler#onComponentCreated(com.sun.facelets.FaceletContext,
- * javax.faces.component.UIComponent,
- * javax.faces.component.UIComponent)
- */
- protected void onComponentCreated(FaceletContext ctx, UIComponent c,
- UIComponent parent) {
- // TODO Auto-generated method stub
- super.onComponentCreated(ctx, c, parent);
- }
-
- protected void applyNextHandler(FaceletContext ctx, UIComponent component)
- throws IOException, FacesException, ELException {
- String path;
- if (component instanceof UIInclude) {
- UIInclude include = (UIInclude) component;
- path = include.getViewId();
- if(include.isWasNavigation()){
- component.getChildren().clear();
- }
- } else {
- path = (String) component.getAttributes().get("viewId");
- }
- VariableMapper orig = ctx.getVariableMapper();
- ctx.setVariableMapper(new VariableMapperWrapper(orig));
- try {
- this.nextHandler.apply(ctx, component);
- ctx.includeFacelet(component, path);
- } catch (Exception e) {
- throw new FacesException("UIInclude component "
- + component.getClientId(ctx.getFacesContext())
- + " could't include page with path " + path, e);
- } finally {
- ctx.setVariableMapper(orig);
- }
- }
-
-}
Copied: branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/IncludeHandler.java (from rev 7566, branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/IncludeHandler.java)
===================================================================
--- branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/IncludeHandler.java (rev 0)
+++ branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/IncludeHandler.java 2008-04-07 22:49:35 UTC (rev 7649)
@@ -0,0 +1,91 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.taglib.html.facelets;
+
+import java.io.IOException;
+
+import javax.el.ELException;
+import javax.el.VariableMapper;
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+
+import org.ajax4jsf.component.UIInclude;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.el.VariableMapperWrapper;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.jsf.ComponentConfig;
+import com.sun.facelets.tag.jsf.ComponentHandler;
+
+/**
+ * @author shura
+ *
+ */
+public class IncludeHandler extends ComponentHandler {
+
+ private TagAttribute viewId;
+
+ public IncludeHandler(ComponentConfig config) {
+ super(config);
+ this.viewId = getRequiredAttribute("viewId");
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.sun.facelets.tag.jsf.ComponentHandler#onComponentCreated(com.sun.facelets.FaceletContext,
+ * javax.faces.component.UIComponent,
+ * javax.faces.component.UIComponent)
+ */
+ protected void onComponentCreated(FaceletContext ctx, UIComponent c,
+ UIComponent parent) {
+ // TODO Auto-generated method stub
+ super.onComponentCreated(ctx, c, parent);
+ }
+
+ protected void applyNextHandler(FaceletContext ctx, UIComponent component)
+ throws IOException, FacesException, ELException {
+ String path;
+ if (component instanceof UIInclude) {
+ UIInclude include = (UIInclude) component;
+ path = include.getViewId();
+ if(include.isWasNavigation()){
+ component.getChildren().clear();
+ }
+ } else {
+ path = (String) component.getAttributes().get("viewId");
+ }
+ VariableMapper orig = ctx.getVariableMapper();
+ ctx.setVariableMapper(new VariableMapperWrapper(orig));
+ try {
+ this.nextHandler.apply(ctx, component);
+ ctx.includeFacelet(component, path);
+ } catch (Exception e) {
+ throw new FacesException("UIInclude component "
+ + component.getClientId(ctx.getFacesContext())
+ + " could't include page with path " + path, e);
+ } finally {
+ ctx.setVariableMapper(orig);
+ }
+ }
+
+}
Deleted: branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/KeepAliveHandler.java
===================================================================
--- branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/KeepAliveHandler.java 2008-04-02 00:36:29 UTC (rev 7566)
+++ branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/KeepAliveHandler.java 2008-04-07 22:49:35 UTC (rev 7649)
@@ -1,82 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.taglib.html.facelets;
-
-import java.io.IOException;
-
-import javax.el.ELException;
-import javax.faces.FacesException;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.el.ValueBinding;
-
-import org.ajax4jsf.Messages;
-import org.ajax4jsf.event.AjaxPhaseListener;
-
-import com.sun.facelets.FaceletContext;
-import com.sun.facelets.FaceletException;
-import com.sun.facelets.tag.TagAttribute;
-import com.sun.facelets.tag.TagAttributeException;
-import com.sun.facelets.tag.TagConfig;
-import com.sun.facelets.tag.TagHandler;
-
-/**
- * @author shura
- *
- */
-public class KeepAliveHandler extends TagHandler {
-
- private final TagAttribute beanName;
-
- private final TagAttribute ajaxOnly;
- /**
- * @param config
- */
- public KeepAliveHandler(TagConfig config) {
- super(config);
- this.beanName = this.getRequiredAttribute("beanName");
- if (beanName != null) {
- if (!beanName.isLiteral()) {
- throw new TagAttributeException(this.tag, this.beanName, Messages.getMessage(Messages.MUST_BE_LITERAL_ERROR));
- }
- }
- this.ajaxOnly = getAttribute("ajaxOnly");
- }
-
- /* (non-Javadoc)
- * @see com.sun.facelets.FaceletHandler#apply(com.sun.facelets.FaceletContext, javax.faces.component.UIComponent)
- */
- public void apply(FaceletContext ctx, UIComponent parent)
- throws IOException, FacesException, FaceletException, ELException {
- // Get bean instance from EL expression.
- String name = beanName.getValue();
- boolean isAjaxOnly = ajaxOnly!=null?ajaxOnly.getBoolean(ctx):false;
- FacesContext facesContext = ctx.getFacesContext();
- String beanExpression = "#{"+name+"}";
- ValueBinding valueBinding = facesContext.getApplication().createValueBinding(beanExpression);
- Object bean = valueBinding.getValue(facesContext);
- String beanAttributeName = isAjaxOnly?AjaxPhaseListener.AJAX_BEAN_PREFIX:AjaxPhaseListener.VIEW_BEAN_PREFIX+name;
- // Put bean instance to ViewRoot.
- facesContext.getViewRoot().getAttributes().put(beanAttributeName, bean);
- }
-
-}
Copied: branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/KeepAliveHandler.java (from rev 7566, branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/KeepAliveHandler.java)
===================================================================
--- branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/KeepAliveHandler.java (rev 0)
+++ branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/KeepAliveHandler.java 2008-04-07 22:49:35 UTC (rev 7649)
@@ -0,0 +1,82 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.taglib.html.facelets;
+
+import java.io.IOException;
+
+import javax.el.ELException;
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+
+import org.ajax4jsf.Messages;
+import org.ajax4jsf.event.AjaxPhaseListener;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.FaceletException;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagAttributeException;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.tag.TagHandler;
+
+/**
+ * @author shura
+ *
+ */
+public class KeepAliveHandler extends TagHandler {
+
+ private final TagAttribute beanName;
+
+ private final TagAttribute ajaxOnly;
+ /**
+ * @param config
+ */
+ public KeepAliveHandler(TagConfig config) {
+ super(config);
+ this.beanName = this.getRequiredAttribute("beanName");
+ if (beanName != null) {
+ if (!beanName.isLiteral()) {
+ throw new TagAttributeException(this.tag, this.beanName, Messages.getMessage(Messages.MUST_BE_LITERAL_ERROR));
+ }
+ }
+ this.ajaxOnly = getAttribute("ajaxOnly");
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.facelets.FaceletHandler#apply(com.sun.facelets.FaceletContext, javax.faces.component.UIComponent)
+ */
+ public void apply(FaceletContext ctx, UIComponent parent)
+ throws IOException, FacesException, FaceletException, ELException {
+ // Get bean instance from EL expression.
+ String name = beanName.getValue();
+ boolean isAjaxOnly = ajaxOnly!=null?ajaxOnly.getBoolean(ctx):false;
+ FacesContext facesContext = ctx.getFacesContext();
+ String beanExpression = "#{"+name+"}";
+ ValueBinding valueBinding = facesContext.getApplication().createValueBinding(beanExpression);
+ Object bean = valueBinding.getValue(facesContext);
+ String beanAttributeName = isAjaxOnly?AjaxPhaseListener.AJAX_BEAN_PREFIX:AjaxPhaseListener.VIEW_BEAN_PREFIX+name;
+ // Put bean instance to ViewRoot.
+ facesContext.getViewRoot().getAttributes().put(beanAttributeName, bean);
+ }
+
+}
Deleted: branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/MediaOutputHandler.java
===================================================================
--- branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/MediaOutputHandler.java 2008-04-02 00:36:29 UTC (rev 7566)
+++ branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/MediaOutputHandler.java 2008-04-07 22:49:35 UTC (rev 7649)
@@ -1,118 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.taglib.html.facelets;
-
-import java.io.OutputStream;
-
-import org.ajax4jsf.component.UIMediaOutput;
-
-import com.sun.facelets.FaceletContext;
-import com.sun.facelets.tag.MetaRule;
-import com.sun.facelets.tag.MetaRuleset;
-import com.sun.facelets.tag.Metadata;
-import com.sun.facelets.tag.MetadataTarget;
-import com.sun.facelets.tag.TagAttribute;
-import com.sun.facelets.tag.jsf.ComponentConfig;
-import com.sun.facelets.tag.jsf.ComponentHandler;
-
-/**
- * @author shura (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:22 $
- *
- */
-public class MediaOutputHandler extends ComponentHandler {
-
- private static final MetaRule mmediaMetaRule = new MMediaMetaRule();
- /**
- * @param config
- */
- public MediaOutputHandler(ComponentConfig config) {
- super(config);
-
- }
-
- /* (non-Javadoc)
- * @see org.ajax4jsf.tag.AjaxComponentHandler#createMetaRuleset(java.lang.Class)
- */
- protected MetaRuleset createMetaRuleset(Class type) {
- MetaRuleset metaRules = super.createMetaRuleset(type);
- metaRules.addRule(mmediaMetaRule);
- return metaRules;
- }
-
- /**
- * @author shura (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:22 $
- *
- */
- static class MMediaMetaRule extends MetaRule{
-
- /**
- *
- */
- public MMediaMetaRule() {
- super();
- }
-
- /* (non-Javadoc)
- * @see com.sun.facelets.tag.MetaRule#applyRule(java.lang.String, com.sun.facelets.tag.TagAttribute, com.sun.facelets.tag.MetadataTarget)
- */
- public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) {
- if (meta.isTargetInstanceOf(UIMediaOutput.class)) {
-
-
- if ("createContent".equals(name)) {
- return new MMediaActionMapper(attribute);
- }
- }
- return null;
- }
-
- }
- /**
- * @author shura (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:22 $
- *
- */
- static class MMediaActionMapper extends Metadata {
-
- private static final Class<?>[] MMEDIA_ACTION_SIG = new Class[] {OutputStream.class,Object.class};
-
- private final TagAttribute _send;
- /**
- * @param attribute
- */
- public MMediaActionMapper(TagAttribute attribute) {
- _send = attribute;
- }
-
- /* (non-Javadoc)
- * @see com.sun.facelets.tag.Metadata#applyMetadata(com.sun.facelets.FaceletContext, java.lang.Object)
- */
- public void applyMetadata(FaceletContext ctx, Object instance) {
- ((UIMediaOutput) instance).setCreateContentExpression(this._send.getMethodExpression(ctx, null,
- MMEDIA_ACTION_SIG));
- }
-
- }
-
-}
Copied: branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/MediaOutputHandler.java (from rev 7566, branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/MediaOutputHandler.java)
===================================================================
--- branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/MediaOutputHandler.java (rev 0)
+++ branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/MediaOutputHandler.java 2008-04-07 22:49:35 UTC (rev 7649)
@@ -0,0 +1,118 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.taglib.html.facelets;
+
+import java.io.OutputStream;
+
+import org.ajax4jsf.component.UIMediaOutput;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.MetaRule;
+import com.sun.facelets.tag.MetaRuleset;
+import com.sun.facelets.tag.Metadata;
+import com.sun.facelets.tag.MetadataTarget;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.jsf.ComponentConfig;
+import com.sun.facelets.tag.jsf.ComponentHandler;
+
+/**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:22 $
+ *
+ */
+public class MediaOutputHandler extends ComponentHandler {
+
+ private static final MetaRule mmediaMetaRule = new MMediaMetaRule();
+ /**
+ * @param config
+ */
+ public MediaOutputHandler(ComponentConfig config) {
+ super(config);
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.tag.AjaxComponentHandler#createMetaRuleset(java.lang.Class)
+ */
+ protected MetaRuleset createMetaRuleset(Class type) {
+ MetaRuleset metaRules = super.createMetaRuleset(type);
+ metaRules.addRule(mmediaMetaRule);
+ return metaRules;
+ }
+
+ /**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:22 $
+ *
+ */
+ static class MMediaMetaRule extends MetaRule{
+
+ /**
+ *
+ */
+ public MMediaMetaRule() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.facelets.tag.MetaRule#applyRule(java.lang.String, com.sun.facelets.tag.TagAttribute, com.sun.facelets.tag.MetadataTarget)
+ */
+ public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) {
+ if (meta.isTargetInstanceOf(UIMediaOutput.class)) {
+
+
+ if ("createContent".equals(name)) {
+ return new MMediaActionMapper(attribute);
+ }
+ }
+ return null;
+ }
+
+ }
+ /**
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/02/01 15:31:22 $
+ *
+ */
+ static class MMediaActionMapper extends Metadata {
+
+ private static final Class<?>[] MMEDIA_ACTION_SIG = new Class[] {OutputStream.class,Object.class};
+
+ private final TagAttribute _send;
+ /**
+ * @param attribute
+ */
+ public MMediaActionMapper(TagAttribute attribute) {
+ _send = attribute;
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.facelets.tag.Metadata#applyMetadata(com.sun.facelets.FaceletContext, java.lang.Object)
+ */
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((UIMediaOutput) instance).setCreateContentExpression(this._send.getMethodExpression(ctx, null,
+ MMEDIA_ACTION_SIG));
+ }
+
+ }
+
+}
Deleted: branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/RowKeyConverterRule.java
===================================================================
--- branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/RowKeyConverterRule.java 2008-04-02 00:36:29 UTC (rev 7566)
+++ branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/RowKeyConverterRule.java 2008-04-07 22:49:35 UTC (rev 7649)
@@ -1,85 +0,0 @@
-/**
- *
- */
-package org.ajax4jsf.taglib.html.facelets;
-
-import javax.faces.convert.Converter;
-
-import org.ajax4jsf.component.UIDataAdaptor;
-
-import com.sun.facelets.FaceletContext;
-import com.sun.facelets.tag.MetaRule;
-import com.sun.facelets.tag.Metadata;
-import com.sun.facelets.tag.MetadataTarget;
-import com.sun.facelets.tag.TagAttribute;
-
-/**
- * Apply rowKeyConverter to component
- * @author Maksim Kaszynski
- *
- */
-public class RowKeyConverterRule extends MetaRule {
-
- static final class DynamicConverterMetaData extends Metadata {
-
- private final TagAttribute attribute;
-
- public DynamicConverterMetaData(TagAttribute attribute) {
- super();
- this.attribute = attribute;
- }
-
- @Override
- public void applyMetadata(FaceletContext ctx, Object instance) {
- ((UIDataAdaptor) instance).setValueExpression("rowKeyConverter",
- attribute.getValueExpression(ctx, Converter.class));
-
- }
- }
-
- static final class StaticConverterMetadata extends Metadata {
-
- private final String converterId;
-
- public StaticConverterMetadata(String converterId) {
- super();
- this.converterId = converterId;
- }
-
- @Override
- public void applyMetadata(FaceletContext ctx, Object instance) {
- Converter converter = ctx.getFacesContext().getApplication()
- .createConverter(converterId);
- ((UIDataAdaptor) instance).setRowKeyConverter(converter);
-
- }
- }
-
- public static final RowKeyConverterRule INSTANCE = new RowKeyConverterRule();
-
-
- /*
- * (non-Javadoc)
- *
- * @see com.sun.facelets.tag.MetaRule#applyRule(java.lang.String,
- * com.sun.facelets.tag.TagAttribute,
- * com.sun.facelets.tag.MetadataTarget)
- */
- @Override
- public Metadata applyRule(String name, TagAttribute attribute,
- MetadataTarget meta) {
-
- if (meta.isTargetInstanceOf(UIDataAdaptor.class)) {
- if ("rowKeyConverter".equals(name)) {
- if (attribute.isLiteral()) {
- return new StaticConverterMetadata(attribute.getValue());
- } else {
- return new DynamicConverterMetaData(attribute);
- }
- }
- }
-
- return null;
- }
-
-}
Copied: branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/RowKeyConverterRule.java (from rev 7566, branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/RowKeyConverterRule.java)
===================================================================
--- branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/RowKeyConverterRule.java (rev 0)
+++ branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/RowKeyConverterRule.java 2008-04-07 22:49:35 UTC (rev 7649)
@@ -0,0 +1,85 @@
+/**
+ *
+ */
+package org.ajax4jsf.taglib.html.facelets;
+
+import javax.faces.convert.Converter;
+
+import org.ajax4jsf.component.UIDataAdaptor;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.MetaRule;
+import com.sun.facelets.tag.Metadata;
+import com.sun.facelets.tag.MetadataTarget;
+import com.sun.facelets.tag.TagAttribute;
+
+/**
+ * Apply rowKeyConverter to component
+ * @author Maksim Kaszynski
+ *
+ */
+public class RowKeyConverterRule extends MetaRule {
+
+ static final class DynamicConverterMetaData extends Metadata {
+
+ private final TagAttribute attribute;
+
+ public DynamicConverterMetaData(TagAttribute attribute) {
+ super();
+ this.attribute = attribute;
+ }
+
+ @Override
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((UIDataAdaptor) instance).setValueExpression("rowKeyConverter",
+ attribute.getValueExpression(ctx, Converter.class));
+
+ }
+ }
+
+ static final class StaticConverterMetadata extends Metadata {
+
+ private final String converterId;
+
+ public StaticConverterMetadata(String converterId) {
+ super();
+ this.converterId = converterId;
+ }
+
+ @Override
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ Converter converter = ctx.getFacesContext().getApplication()
+ .createConverter(converterId);
+ ((UIDataAdaptor) instance).setRowKeyConverter(converter);
+
+ }
+ }
+
+ public static final RowKeyConverterRule INSTANCE = new RowKeyConverterRule();
+
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.sun.facelets.tag.MetaRule#applyRule(java.lang.String,
+ * com.sun.facelets.tag.TagAttribute,
+ * com.sun.facelets.tag.MetadataTarget)
+ */
+ @Override
+ public Metadata applyRule(String name, TagAttribute attribute,
+ MetadataTarget meta) {
+
+ if (meta.isTargetInstanceOf(UIDataAdaptor.class)) {
+ if ("rowKeyConverter".equals(name)) {
+ if (attribute.isLiteral()) {
+ return new StaticConverterMetadata(attribute.getValue());
+ } else {
+ return new DynamicConverterMetaData(attribute);
+ }
+ }
+ }
+
+ return null;
+ }
+
+}
Deleted: branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/package-info.java
===================================================================
--- branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/package-info.java 2008-04-02 00:36:29 UTC (rev 7566)
+++ branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/package-info.java 2008-04-07 22:49:35 UTC (rev 7649)
@@ -1,4 +0,0 @@
-/**
- * Classes defining the rendering model for HTML
- */
-package org.ajax4jsf.taglib.html.facelets;
Copied: branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/package-info.java (from rev 7566, branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/package-info.java)
===================================================================
--- branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/package-info.java (rev 0)
+++ branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/package-info.java 2008-04-07 22:49:35 UTC (rev 7649)
@@ -0,0 +1,4 @@
+/**
+ * Classes defining the rendering model for HTML
+ */
+package org.ajax4jsf.taglib.html.facelets;
16 years, 9 months
JBoss Rich Faces SVN: r7648 - branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-04-07 18:47:56 -0400 (Mon, 07 Apr 2008)
New Revision: 7648
Removed:
branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets
Log:
reverted changes from r7644-r7646
Deleted: branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets
===================================================================
--- branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets 2008-04-07 22:41:37 UTC (rev 7647)
+++ branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets 2008-04-07 22:47:56 UTC (rev 7648)
@@ -1,118 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.ajax4jsf.taglib.html.facelets;
-
-import java.util.EventListener;
-
-import org.ajax4jsf.component.UIPush;
-
-import com.sun.facelets.FaceletContext;
-import com.sun.facelets.tag.MetaRule;
-import com.sun.facelets.tag.MetaRuleset;
-import com.sun.facelets.tag.Metadata;
-import com.sun.facelets.tag.MetadataTarget;
-import com.sun.facelets.tag.TagAttribute;
-import com.sun.facelets.tag.jsf.ComponentConfig;
-import com.sun.facelets.tag.jsf.ComponentHandler;
-
-/**
- * @author shura (latest modification by $Author$)
- * @version $Revision$ $Date$
- *
- */
-public class AjaxPushHandler extends ComponentHandler {
-
- private static final MetaRule ajaxPushMetaRule = new AjaxPushMetaRule();
- /**
- * @param config
- */
- public AjaxPushHandler(ComponentConfig config) {
- super(config);
-
- }
-
- /* (non-Javadoc)
- * @see org.ajax4jsf.tag.AjaxComponentHandler#createMetaRuleset(java.lang.Class)
- */
- protected MetaRuleset createMetaRuleset(Class type) {
- MetaRuleset metaRules = super.createMetaRuleset(type);
- metaRules.addRule(ajaxPushMetaRule);
- return metaRules;
- }
-
- /**
- * @author shura (latest modification by $Author$)
- * @version $Revision$ $Date$
- *
- */
- static class AjaxPushMetaRule extends MetaRule{
-
- /**
- *
- */
- public AjaxPushMetaRule() {
- super();
- }
-
- /* (non-Javadoc)
- * @see com.sun.facelets.tag.MetaRule#applyRule(java.lang.String, com.sun.facelets.tag.TagAttribute, com.sun.facelets.tag.MetadataTarget)
- */
- public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) {
- if (meta.isTargetInstanceOf(UIPush.class)) {
-
-
- if ("eventProducer".equals(name)) {
- return new AjaxPushActionMapper(attribute);
- }
- }
- return null;
- }
-
- }
- /**
- * @author shura (latest modification by $Author$)
- * @version $Revision$ $Date$
- *
- */
- static class AjaxPushActionMapper extends Metadata {
-
- private static final Class<?>[] AJAX_PUSH_ACTION_SIG = new Class[] {EventListener.class};
-
- private final TagAttribute _send;
- /**
- * @param attribute
- */
- public AjaxPushActionMapper(TagAttribute attribute) {
- _send = attribute;
- }
-
- /* (non-Javadoc)
- * @see com.sun.facelets.tag.Metadata#applyMetadata(com.sun.facelets.FaceletContext, java.lang.Object)
- */
- public void applyMetadata(FaceletContext ctx, Object instance) {
- ((UIPush) instance).setEventProducer(this._send.getMethodExpression(ctx, null,
- AJAX_PUSH_ACTION_SIG));
- }
-
- }
-
-}
16 years, 9 months
JBoss Rich Faces SVN: r7647 - trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2008-04-07 18:41:37 -0400 (Mon, 07 Apr 2008)
New Revision: 7647
Modified:
trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxPushHandler.java
Log:
Fix http://jira.jboss.com/jira/browse/RF-2960
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxPushHandler.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxPushHandler.java 2008-04-07 22:31:52 UTC (rev 7646)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxPushHandler.java 2008-04-07 22:41:37 UTC (rev 7647)
@@ -21,10 +21,9 @@
package org.ajax4jsf.taglib.html.facelets;
-import java.io.OutputStream;
import java.util.EventListener;
-import org.ajax4jsf.component.UIMediaOutput;
+import org.ajax4jsf.component.UIPush;
import com.sun.facelets.FaceletContext;
import com.sun.facelets.tag.MetaRule;
@@ -78,7 +77,7 @@
* @see com.sun.facelets.tag.MetaRule#applyRule(java.lang.String, com.sun.facelets.tag.TagAttribute, com.sun.facelets.tag.MetadataTarget)
*/
public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) {
- if (meta.isTargetInstanceOf(UIMediaOutput.class)) {
+ if (meta.isTargetInstanceOf(UIPush.class)) {
if ("eventProducer".equals(name)) {
@@ -110,7 +109,7 @@
* @see com.sun.facelets.tag.Metadata#applyMetadata(com.sun.facelets.FaceletContext, java.lang.Object)
*/
public void applyMetadata(FaceletContext ctx, Object instance) {
- ((UIMediaOutput) instance).setCreateContentExpression(this._send.getMethodExpression(ctx, null,
+ ((UIPush) instance).setEventProducer(this._send.getMethodExpression(ctx, null,
AJAX_PUSH_ACTION_SIG));
}
16 years, 9 months
JBoss Rich Faces SVN: r7646 - branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2008-04-07 18:31:52 -0400 (Mon, 07 Apr 2008)
New Revision: 7646
Added:
branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets
Log:
fix http://jira.jboss.com/jira/browse/RF-2960
Copied: branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets (from rev 7641, trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxPushHandler.java)
===================================================================
--- branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets (rev 0)
+++ branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets 2008-04-07 22:31:52 UTC (rev 7646)
@@ -0,0 +1,118 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.taglib.html.facelets;
+
+import java.util.EventListener;
+
+import org.ajax4jsf.component.UIPush;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.MetaRule;
+import com.sun.facelets.tag.MetaRuleset;
+import com.sun.facelets.tag.Metadata;
+import com.sun.facelets.tag.MetadataTarget;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.jsf.ComponentConfig;
+import com.sun.facelets.tag.jsf.ComponentHandler;
+
+/**
+ * @author shura (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ *
+ */
+public class AjaxPushHandler extends ComponentHandler {
+
+ private static final MetaRule ajaxPushMetaRule = new AjaxPushMetaRule();
+ /**
+ * @param config
+ */
+ public AjaxPushHandler(ComponentConfig config) {
+ super(config);
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.tag.AjaxComponentHandler#createMetaRuleset(java.lang.Class)
+ */
+ protected MetaRuleset createMetaRuleset(Class type) {
+ MetaRuleset metaRules = super.createMetaRuleset(type);
+ metaRules.addRule(ajaxPushMetaRule);
+ return metaRules;
+ }
+
+ /**
+ * @author shura (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ *
+ */
+ static class AjaxPushMetaRule extends MetaRule{
+
+ /**
+ *
+ */
+ public AjaxPushMetaRule() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.facelets.tag.MetaRule#applyRule(java.lang.String, com.sun.facelets.tag.TagAttribute, com.sun.facelets.tag.MetadataTarget)
+ */
+ public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) {
+ if (meta.isTargetInstanceOf(UIPush.class)) {
+
+
+ if ("eventProducer".equals(name)) {
+ return new AjaxPushActionMapper(attribute);
+ }
+ }
+ return null;
+ }
+
+ }
+ /**
+ * @author shura (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ *
+ */
+ static class AjaxPushActionMapper extends Metadata {
+
+ private static final Class<?>[] AJAX_PUSH_ACTION_SIG = new Class[] {EventListener.class};
+
+ private final TagAttribute _send;
+ /**
+ * @param attribute
+ */
+ public AjaxPushActionMapper(TagAttribute attribute) {
+ _send = attribute;
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.facelets.tag.Metadata#applyMetadata(com.sun.facelets.FaceletContext, java.lang.Object)
+ */
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((UIPush) instance).setEventProducer(this._send.getMethodExpression(ctx, null,
+ AJAX_PUSH_ACTION_SIG));
+ }
+
+ }
+
+}
16 years, 9 months
JBoss Rich Faces SVN: r7644 - branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2008-04-07 18:24:59 -0400 (Mon, 07 Apr 2008)
New Revision: 7644
Added:
branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxPushHandler.java
Log:
fix http://jira.jboss.com/jira/browse/RF-2960
Copied: branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxPushHandler.java (from rev 7641, trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxPushHandler.java)
===================================================================
--- branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxPushHandler.java (rev 0)
+++ branches/3.2.x/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxPushHandler.java 2008-04-07 22:24:59 UTC (rev 7644)
@@ -0,0 +1,119 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.taglib.html.facelets;
+
+import java.io.OutputStream;
+import java.util.EventListener;
+
+import org.ajax4jsf.component.UIMediaOutput;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.MetaRule;
+import com.sun.facelets.tag.MetaRuleset;
+import com.sun.facelets.tag.Metadata;
+import com.sun.facelets.tag.MetadataTarget;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.jsf.ComponentConfig;
+import com.sun.facelets.tag.jsf.ComponentHandler;
+
+/**
+ * @author shura (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ *
+ */
+public class AjaxPushHandler extends ComponentHandler {
+
+ private static final MetaRule ajaxPushMetaRule = new AjaxPushMetaRule();
+ /**
+ * @param config
+ */
+ public AjaxPushHandler(ComponentConfig config) {
+ super(config);
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.tag.AjaxComponentHandler#createMetaRuleset(java.lang.Class)
+ */
+ protected MetaRuleset createMetaRuleset(Class type) {
+ MetaRuleset metaRules = super.createMetaRuleset(type);
+ metaRules.addRule(ajaxPushMetaRule);
+ return metaRules;
+ }
+
+ /**
+ * @author shura (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ *
+ */
+ static class AjaxPushMetaRule extends MetaRule{
+
+ /**
+ *
+ */
+ public AjaxPushMetaRule() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.facelets.tag.MetaRule#applyRule(java.lang.String, com.sun.facelets.tag.TagAttribute, com.sun.facelets.tag.MetadataTarget)
+ */
+ public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) {
+ if (meta.isTargetInstanceOf(UIMediaOutput.class)) {
+
+
+ if ("eventProducer".equals(name)) {
+ return new AjaxPushActionMapper(attribute);
+ }
+ }
+ return null;
+ }
+
+ }
+ /**
+ * @author shura (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ *
+ */
+ static class AjaxPushActionMapper extends Metadata {
+
+ private static final Class<?>[] AJAX_PUSH_ACTION_SIG = new Class[] {EventListener.class};
+
+ private final TagAttribute _send;
+ /**
+ * @param attribute
+ */
+ public AjaxPushActionMapper(TagAttribute attribute) {
+ _send = attribute;
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.facelets.tag.Metadata#applyMetadata(com.sun.facelets.FaceletContext, java.lang.Object)
+ */
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((UIMediaOutput) instance).setCreateContentExpression(this._send.getMethodExpression(ctx, null,
+ AJAX_PUSH_ACTION_SIG));
+ }
+
+ }
+
+}
16 years, 9 months
JBoss Rich Faces SVN: r7643 - branches/3.2.x/ui/core/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2008-04-07 18:23:50 -0400 (Mon, 07 Apr 2008)
New Revision: 7643
Added:
branches/3.2.x/ui/core/src/main/config/component/push.xml
Log:
fix http://jira.jboss.com/jira/browse/RF-2960
Copied: branches/3.2.x/ui/core/src/main/config/component/push.xml (from rev 7641, trunk/ui/core/src/main/config/component/push.xml)
===================================================================
--- branches/3.2.x/ui/core/src/main/config/component/push.xml (rev 0)
+++ branches/3.2.x/ui/core/src/main/config/component/push.xml 2008-04-07 22:23:50 UTC (rev 7643)
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components
+ PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
+ "http://labs.jboss.com/jbossrichfaces/component-config.dtd"
+[
+ <!ENTITY universal_html_attributes SYSTEM "html_universal_attributes.xml">
+]>
+
+<components>
+ <component>
+ <name>org.ajax4jsf.Push</name>
+ <family>org.ajax4jsf.components.AjaxPush</family>
+ <classname>org.ajax4jsf.component.html.AjaxPush</classname>
+ <superclass>org.ajax4jsf.component.UIPush</superclass>
+ <test />
+ <description>
+ Periodically perform AJAX request to server, to simulate
+ 'push' data.
+ <br />
+ </description>
+ <displayname>Ajax Push</displayname>
+ <icon>icon</icon>
+ <renderer generate="false" override="false">
+ <name>org.ajax4jsf.components.AjaxPushRenderer</name>
+ <classname>
+ org.ajax4jsf.renderkit.html.AjaxPushRenderer
+ </classname>
+ <!--
+ <superclass>javax.faces.renderer.Renderer</superclass>
+ -->
+ <description>
+ Perform functions for decoding AJAX requests and
+ building client script for events.
+ </description>
+ <displayname>renderer for Ajax Push</displayname>
+ <icon>icon</icon>
+ </renderer>
+ <tag>
+ <name>push</name>
+ <classname>org.ajax4jsf.taglib.html.jsp.AjaxPushTag</classname>
+ <superclass>
+ org.ajax4jsf.webapp.taglib.UIComponentTagBase
+ </superclass>
+ <test />
+ <displayname>Ajax Push</displayname>
+ <icon>icon</icon>
+ </tag>
+ <taghandler generate="false">
+ <classname>org.ajax4jsf.taglib.html.facelets.AjaxPushHandler</classname>
+ <!-- superclass>org.ajax4jsf.webapp.taglib.AjaxComponentHandler</superclass-->
+ </taghandler>
+ &ui_component_attributes;
+ &ui_command_attributes;
+ &ajax_component_attributes;
+ <property elonly="true" attachedstate="true">
+
+ <name>eventProducer</name>
+
+ <classname>javax.el.MethodExpression</classname>
+ <description>
+ MethodBinding pointing at method accepting an PushEventListener with return type void.
+ User bean must register this listener and send EventObject to this listener on ready.
+ </description>
+ <methodargs>java.util.EventListener</methodargs>
+ </property>
+ <!--
+ <property>
+ <name>onsubmit</name>
+ <classname>java.lang.String</classname>
+ <description>
+ JavaScript code for call before submission of ajax
+ event
+ </description>
+ </property>
+ -->
+ <property>
+ <name>interval</name>
+ <classname>int</classname>
+ <description>
+ Interval (in ms) for call push requests. Default value
+ 1000 (1 sec)
+ </description>
+ </property>
+ <property>
+ <name>enabled</name>
+ <classname>boolean</classname>
+ <description>
+ <![CDATA[Enable/disable pushing]]>
+ </description>
+ <defaultvalue>true</defaultvalue>
+ </property>
+ <property hidden="true">
+ <name>value</name>
+ <classname>java.lang.Object</classname>
+ </property>
+ <property hidden="true">
+ <name>submitted</name>
+ <classname>boolean</classname>
+ </property>
+ <property hidden="true">
+ <name>requestDelay</name>
+ <classname>int</classname>
+ </property>
+ <property>
+ <name>ignoreDupResponses</name>
+ <classname>boolean</classname>
+ <description>
+Attribute allows to ignore an Ajax Response produced by a request if the newest 'similar' request is
+in a queue already. ignoreDupResponses="true" does not cancel the request while it is processed on the server,
+but just allows to avoid unnecessary updates on the client side if the response isn't actual now
+ </description>
+ </property>
+ <property>
+ <name>timeout</name>
+ <classname>int</classname>
+ <description>Timeout (in ms) for request</description>
+ </property>
+ </component>
+</components>
\ No newline at end of file
16 years, 9 months
JBoss Rich Faces SVN: r7642 - branches/3.2.x/ui/core/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2008-04-07 18:23:42 -0400 (Mon, 07 Apr 2008)
New Revision: 7642
Removed:
branches/3.2.x/ui/core/src/main/config/component/push.xml
Log:
Deleted: branches/3.2.x/ui/core/src/main/config/component/push.xml
===================================================================
--- branches/3.2.x/ui/core/src/main/config/component/push.xml 2008-04-07 22:02:11 UTC (rev 7641)
+++ branches/3.2.x/ui/core/src/main/config/component/push.xml 2008-04-07 22:23:42 UTC (rev 7642)
@@ -1,119 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components
- PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
- "http://labs.jboss.com/jbossrichfaces/component-config.dtd"
-[
- <!ENTITY universal_html_attributes SYSTEM "html_universal_attributes.xml">
-]>
-
-<components>
- <component>
- <name>org.ajax4jsf.Push</name>
- <family>org.ajax4jsf.components.AjaxPush</family>
- <classname>org.ajax4jsf.component.html.AjaxPush</classname>
- <superclass>org.ajax4jsf.component.UIPush</superclass>
- <test />
- <description>
- Periodically perform AJAX request to server, to simulate
- 'push' data.
- <br />
- </description>
- <displayname>Ajax Push</displayname>
- <icon>icon</icon>
- <renderer generate="false" override="false">
- <name>org.ajax4jsf.components.AjaxPushRenderer</name>
- <classname>
- org.ajax4jsf.renderkit.html.AjaxPushRenderer
- </classname>
- <!--
- <superclass>javax.faces.renderer.Renderer</superclass>
- -->
- <description>
- Perform functions for decoding AJAX requests and
- building client script for events.
- </description>
- <displayname>renderer for Ajax Push</displayname>
- <icon>icon</icon>
- </renderer>
- <tag>
- <name>push</name>
- <classname>org.ajax4jsf.taglib.html.jsp.AjaxPushTag</classname>
- <superclass>
- org.ajax4jsf.webapp.taglib.UIComponentTagBase
- </superclass>
- <test />
- <displayname>Ajax Push</displayname>
- <icon>icon</icon>
- </tag>
- <taghandler generate="true">
- <classname>org.ajax4jsf.taglib.html.facelets.AjaxPushHandler</classname>
- <superclass>org.ajax4jsf.webapp.taglib.AjaxComponentHandler</superclass>
- </taghandler>
- &ui_component_attributes;
- &ui_command_attributes;
- &ajax_component_attributes;
- <property elonly="true" attachedstate="true">
-
- <name>eventProducer</name>
-
- <classname>javax.el.MethodExpression</classname>
- <description>
- MethodBinding pointing at method accepting an PushEventListener with return type void.
- User bean must register this listener and send EventObject to this listener on ready.
- </description>
- <methodargs>java.util.EventListener</methodargs>
- </property>
- <!--
- <property>
- <name>onsubmit</name>
- <classname>java.lang.String</classname>
- <description>
- JavaScript code for call before submission of ajax
- event
- </description>
- </property>
- -->
- <property>
- <name>interval</name>
- <classname>int</classname>
- <description>
- Interval (in ms) for call push requests. Default value
- 1000 (1 sec)
- </description>
- </property>
- <property>
- <name>enabled</name>
- <classname>boolean</classname>
- <description>
- <![CDATA[Enable/disable pushing]]>
- </description>
- <defaultvalue>true</defaultvalue>
- </property>
- <property hidden="true">
- <name>value</name>
- <classname>java.lang.Object</classname>
- </property>
- <property hidden="true">
- <name>submitted</name>
- <classname>boolean</classname>
- </property>
- <property hidden="true">
- <name>requestDelay</name>
- <classname>int</classname>
- </property>
- <property>
- <name>ignoreDupResponses</name>
- <classname>boolean</classname>
- <description>
-Attribute allows to ignore an Ajax Response produced by a request if the newest 'similar' request is
-in a queue already. ignoreDupResponses="true" does not cancel the request while it is processed on the server,
-but just allows to avoid unnecessary updates on the client side if the response isn't actual now
- </description>
- </property>
- <property>
- <name>timeout</name>
- <classname>int</classname>
- <description>Timeout (in ms) for request</description>
- </property>
- </component>
-</components>
\ No newline at end of file
16 years, 9 months
JBoss Rich Faces SVN: r7641 - in trunk: samples/seamIntegration and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2008-04-07 18:02:11 -0400 (Mon, 07 Apr 2008)
New Revision: 7641
Added:
trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxPushHandler.java
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxViewRoot.java
trunk/samples/seamIntegration/pom.xml
trunk/ui/core/src/main/config/component/push.xml
Log:
Fix http://jira.jboss.com/jira/browse/RF-2960
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxViewRoot.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxViewRoot.java 2008-04-07 18:39:36 UTC (rev 7640)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/component/AjaxViewRoot.java 2008-04-07 22:02:11 UTC (rev 7641)
@@ -42,6 +42,7 @@
import javax.faces.event.PhaseListener;
import javax.faces.lifecycle.Lifecycle;
import javax.faces.lifecycle.LifecycleFactory;
+import javax.faces.render.Renderer;
import javax.faces.webapp.FacesServlet;
import org.ajax4jsf.Messages;
@@ -494,6 +495,37 @@
};
+ @Override
+ public void encodeBegin(FacesContext context) throws IOException {
+ processPhaseListeners(context, PhaseId.RENDER_RESPONSE, true);
+ // Copy/paste from UIComponentBase, so in no way for java to call super.super method.
+ String rendererType = getRendererType();
+ if (rendererType != null) {
+ Renderer renderer = this.getRenderer(context);
+ if (renderer != null) {
+ renderer.encodeBegin(context, this);
+ } else {
+ // TODO: log
+ }
+ }
+
+ }
+
+ @Override
+ public void encodeEnd(FacesContext context) throws IOException {
+ // Copy/paste from UIComponentBase, so in no way for java to call super.super method.
+ String rendererType = getRendererType();
+ if (rendererType != null) {
+ Renderer renderer = this.getRenderer(context);
+ if (renderer != null) {
+ renderer.encodeEnd(context, this);
+ } else {
+ // TODO: log
+ }
+ }
+ processPhaseListeners(context, PhaseId.RENDER_RESPONSE, false);
+ super.encodeEnd(context);
+ }
/*
* (non-Javadoc)
*
Modified: trunk/samples/seamIntegration/pom.xml
===================================================================
--- trunk/samples/seamIntegration/pom.xml 2008-04-07 18:39:36 UTC (rev 7640)
+++ trunk/samples/seamIntegration/pom.xml 2008-04-07 22:02:11 UTC (rev 7641)
@@ -81,29 +81,23 @@
<dependency>
<groupId>org.jboss.seam</groupId>
<artifactId>jboss-seam</artifactId>
- <version>2.0.0.GA</version>
+ <version>2.0.1.GA</version>
</dependency>
<dependency>
<groupId>org.jboss.seam</groupId>
<artifactId>jboss-seam-ui</artifactId>
- <version>2.0.0.GA</version>
+ <version>2.0.1.GA</version>
</dependency>
<dependency>
<groupId>org.jboss.seam</groupId>
<artifactId>jboss-seam-ioc</artifactId>
- <version>2.0.0.GA</version>
+ <version>2.0.1.GA</version>
</dependency>
<dependency>
<groupId>org.jboss.seam</groupId>
<artifactId>jboss-seam-debug</artifactId>
- <version>2.0.0.GA</version>
+ <version>2.0.1.GA</version>
</dependency>
</dependencies>
- <repositories>
- <repository>
- <id>repository.jboss.com</id>
- <url>http://repository.jboss.com/maven2</url>
- </repository>
- </repositories>
</project>
Modified: trunk/ui/core/src/main/config/component/push.xml
===================================================================
--- trunk/ui/core/src/main/config/component/push.xml 2008-04-07 18:39:36 UTC (rev 7640)
+++ trunk/ui/core/src/main/config/component/push.xml 2008-04-07 22:02:11 UTC (rev 7641)
@@ -45,9 +45,9 @@
<displayname>Ajax Push</displayname>
<icon>icon</icon>
</tag>
- <taghandler generate="true">
+ <taghandler generate="false">
<classname>org.ajax4jsf.taglib.html.facelets.AjaxPushHandler</classname>
- <superclass>org.ajax4jsf.webapp.taglib.AjaxComponentHandler</superclass>
+ <!-- superclass>org.ajax4jsf.webapp.taglib.AjaxComponentHandler</superclass-->
</taghandler>
&ui_component_attributes;
&ui_command_attributes;
Added: trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxPushHandler.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxPushHandler.java (rev 0)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxPushHandler.java 2008-04-07 22:02:11 UTC (rev 7641)
@@ -0,0 +1,119 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.taglib.html.facelets;
+
+import java.io.OutputStream;
+import java.util.EventListener;
+
+import org.ajax4jsf.component.UIMediaOutput;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.MetaRule;
+import com.sun.facelets.tag.MetaRuleset;
+import com.sun.facelets.tag.Metadata;
+import com.sun.facelets.tag.MetadataTarget;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.jsf.ComponentConfig;
+import com.sun.facelets.tag.jsf.ComponentHandler;
+
+/**
+ * @author shura (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ *
+ */
+public class AjaxPushHandler extends ComponentHandler {
+
+ private static final MetaRule ajaxPushMetaRule = new AjaxPushMetaRule();
+ /**
+ * @param config
+ */
+ public AjaxPushHandler(ComponentConfig config) {
+ super(config);
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.tag.AjaxComponentHandler#createMetaRuleset(java.lang.Class)
+ */
+ protected MetaRuleset createMetaRuleset(Class type) {
+ MetaRuleset metaRules = super.createMetaRuleset(type);
+ metaRules.addRule(ajaxPushMetaRule);
+ return metaRules;
+ }
+
+ /**
+ * @author shura (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ *
+ */
+ static class AjaxPushMetaRule extends MetaRule{
+
+ /**
+ *
+ */
+ public AjaxPushMetaRule() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.facelets.tag.MetaRule#applyRule(java.lang.String, com.sun.facelets.tag.TagAttribute, com.sun.facelets.tag.MetadataTarget)
+ */
+ public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) {
+ if (meta.isTargetInstanceOf(UIMediaOutput.class)) {
+
+
+ if ("eventProducer".equals(name)) {
+ return new AjaxPushActionMapper(attribute);
+ }
+ }
+ return null;
+ }
+
+ }
+ /**
+ * @author shura (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ *
+ */
+ static class AjaxPushActionMapper extends Metadata {
+
+ private static final Class<?>[] AJAX_PUSH_ACTION_SIG = new Class[] {EventListener.class};
+
+ private final TagAttribute _send;
+ /**
+ * @param attribute
+ */
+ public AjaxPushActionMapper(TagAttribute attribute) {
+ _send = attribute;
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.facelets.tag.Metadata#applyMetadata(com.sun.facelets.FaceletContext, java.lang.Object)
+ */
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((UIMediaOutput) instance).setCreateContentExpression(this._send.getMethodExpression(ctx, null,
+ AJAX_PUSH_ACTION_SIG));
+ }
+
+ }
+
+}
Property changes on: trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/AjaxPushHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author
16 years, 9 months