JBoss Rich Faces SVN: r1867 - trunk/samples.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-07-26 08:59:36 -0400 (Thu, 26 Jul 2007)
New Revision: 1867
Modified:
trunk/samples/pom.xml
Log:
Default JSF version switched to 1.1
Modified: trunk/samples/pom.xml
===================================================================
--- trunk/samples/pom.xml 2007-07-26 12:47:58 UTC (rev 1866)
+++ trunk/samples/pom.xml 2007-07-26 12:59:36 UTC (rev 1867)
@@ -141,7 +141,7 @@
<profile>
<id>jsf1_1</id>
<activation>
- <activeByDefault>false</activeByDefault>
+ <activeByDefault>true</activeByDefault>
<property>
<name>jsfVersion</name>
<value>1.1</value>
@@ -192,7 +192,7 @@
<profile>
<id>jsf1_2</id>
<activation>
- <activeByDefault>true</activeByDefault>
+ <activeByDefault>false</activeByDefault>
<property>
<name>jsfVersion</name>
<value>1.2</value>
17 years, 5 months
JBoss Rich Faces SVN: r1865 - trunk/samples/panelmenu-sample/src/main/webapp/WEB-INF.
by richfaces-svn-commits@lists.jboss.org
Author: dbiatenia
Date: 2007-07-26 08:46:43 -0400 (Thu, 26 Jul 2007)
New Revision: 1865
Modified:
trunk/samples/panelmenu-sample/src/main/webapp/WEB-INF/web.xml
Log:
Modified: trunk/samples/panelmenu-sample/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/samples/panelmenu-sample/src/main/webapp/WEB-INF/web.xml 2007-07-26 10:17:08 UTC (rev 1864)
+++ trunk/samples/panelmenu-sample/src/main/webapp/WEB-INF/web.xml 2007-07-26 12:46:43 UTC (rev 1865)
@@ -8,7 +8,7 @@
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
- <param-value>.xhtml</param-value>
+ <param-value>.jsp</param-value>
</context-param>
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
17 years, 5 months
JBoss Rich Faces SVN: r1864 - trunk/sandbox/ui/calendar/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: akushunin
Date: 2007-07-26 06:17:08 -0400 (Thu, 26 Jul 2007)
New Revision: 1864
Modified:
trunk/sandbox/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx
Log:
span moved out side div
Modified: trunk/sandbox/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx
===================================================================
--- trunk/sandbox/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx 2007-07-26 09:23:23 UTC (rev 1863)
+++ trunk/sandbox/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx 2007-07-26 10:17:08 UTC (rev 1864)
@@ -52,7 +52,9 @@
writePreloadBody(context, component);
/*]]>*/</jsp:scriptlet>
);
- </script> <jsp:scriptlet>
+ </script>
+ </div>
+ <jsp:scriptlet>
<![CDATA[
boolean popup = getUtils().isBooleanAttribute(component, "popup");
if (popup) {]]>
@@ -92,5 +94,4 @@
}
]]>
</jsp:scriptlet>
- </div>
</f:root>
17 years, 5 months
JBoss Rich Faces SVN: r1863 - in trunk/sandbox/samples/rich-message-demo/src/main/webapp: pages and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-07-26 05:23:23 -0400 (Thu, 26 Jul 2007)
New Revision: 1863
Modified:
trunk/sandbox/samples/rich-message-demo/src/main/webapp/css/app.css
trunk/sandbox/samples/rich-message-demo/src/main/webapp/pages/message-demo.xhtml
Log:
extended demo app
Modified: trunk/sandbox/samples/rich-message-demo/src/main/webapp/css/app.css
===================================================================
--- trunk/sandbox/samples/rich-message-demo/src/main/webapp/css/app.css 2007-07-26 08:44:05 UTC (rev 1862)
+++ trunk/sandbox/samples/rich-message-demo/src/main/webapp/css/app.css 2007-07-26 09:23:23 UTC (rev 1863)
@@ -2,6 +2,10 @@
padding: 0px 10px;
}
+.rich-messages-label{
+ padding: 0px 10px
+}
+
.rich-message-marker{
}
Modified: trunk/sandbox/samples/rich-message-demo/src/main/webapp/pages/message-demo.xhtml
===================================================================
--- trunk/sandbox/samples/rich-message-demo/src/main/webapp/pages/message-demo.xhtml 2007-07-26 08:44:05 UTC (rev 1862)
+++ trunk/sandbox/samples/rich-message-demo/src/main/webapp/pages/message-demo.xhtml 2007-07-26 09:23:23 UTC (rev 1863)
@@ -10,81 +10,160 @@
</head>
- <h:form>
-
- <h:selectOneMenu id="select" value="">
- <f:selectItem itemValue="error" itemLabel="error"/>
- <f:selectItem itemValue="fatal" itemLabel="fatal"/>
- <f:selectItem itemValue="warn" itemLabel="warning"/>
- <f:selectItem itemValue="info" itemLabel="info"/>
- <f:selectItem itemValue="passed" itemLabel="passed"/>
- <f:validator validatorId="SelectValidator"/>
- </h:selectOneMenu>
- <h:commandButton value="submit" />
- <a4j:commandButton value="submit ajax" />
-
+ <h:form>
+
+ <table>
+ <tbody>
+ <tr>
+ <td> <h:outputText value="Rich Message Demo"/> </td>
+ </tr>
+ <tr>
+ <td>
+ <h:selectOneMenu id="select1" value="">
+ <f:selectItem itemValue="error" itemLabel="error"/>
+ <f:selectItem itemValue="fatal" itemLabel="fatal"/>
+ <f:selectItem itemValue="warn" itemLabel="warning"/>
+ <f:selectItem itemValue="info" itemLabel="info"/>
+ <f:selectItem itemValue="passed" itemLabel="passed"/>
+ <f:validator validatorId="SelectValidator"/>
+ </h:selectOneMenu>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <h:selectOneMenu id="select2" value="">
+ <f:selectItem itemValue="error" itemLabel="error"/>
+ <f:selectItem itemValue="fatal" itemLabel="fatal"/>
+ <f:selectItem itemValue="warn" itemLabel="warning"/>
+ <f:selectItem itemValue="info" itemLabel="info"/>
+ <f:selectItem itemValue="passed" itemLabel="passed"/>
+ <f:validator validatorId="SelectValidator"/>
+ </h:selectOneMenu>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <h:selectOneMenu id="select3" value="">
+ <f:selectItem itemValue="error" itemLabel="error"/>
+ <f:selectItem itemValue="fatal" itemLabel="fatal"/>
+ <f:selectItem itemValue="warn" itemLabel="warning"/>
+ <f:selectItem itemValue="info" itemLabel="info"/>
+ <f:selectItem itemValue="passed" itemLabel="passed"/>
+ <f:validator validatorId="SelectValidator"/>
+ </h:selectOneMenu>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <h:selectOneMenu id="select4" value="">
+ <f:selectItem itemValue="error" itemLabel="error"/>
+ <f:selectItem itemValue="fatal" itemLabel="fatal"/>
+ <f:selectItem itemValue="warn" itemLabel="warning"/>
+ <f:selectItem itemValue="info" itemLabel="info"/>
+ <f:selectItem itemValue="passed" itemLabel="passed"/>
+ <f:validator validatorId="SelectValidator"/>
+ </h:selectOneMenu>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <r:message for="select1"
+ tooltip="true"
+ showDetail="false"
+ showSummary="true"
+ passedLabel="No Error"
+ errorLabelClass="errorLabel"
+ fatalLabelClass="warnLabel"
+ infoLabelClass="infoLabel"
+ warnLabelClass="fatalLabel"
+ title="this is tooltip"
+ >
+
+
+ <f:facet name="errorMarker">
+ <h:graphicImage url="/image/error.gif"/>
+ </f:facet>
+
+ <f:facet name="fatalMarker">
+ <h:graphicImage url="/image/fatal.gif"/>
+ </f:facet>
+
+ <f:facet name="infoMarker">
+ <h:graphicImage url="/image/info.gif"/>
+ </f:facet>
+
+ <f:facet name="warnMarker">
+ <h:graphicImage url="/image/warn.gif"/>
+ </f:facet>
+
+ <f:facet name="passedMarker">
+ <h:graphicImage url="/image/passed.gif"/>
+ </f:facet>
+ </r:message>
+ </td>
+ </tr>
+
+ </tbody>
+ </table>
+
- <r:message for="select"
- tooltip="true"
- showDetail="false"
- showSummary="true"
- passedLabel="No Error"
- errorLabelClass="errorLabel"
- fatalLabelClass="warnLabel"
- infoLabelClass="infoLabel"
- warnLabelClass="fatalLabel"
- title="this is tooltip"
- >
-
-
- <f:facet name="errorMarker">
- <h:graphicImage url="/image/error.gif"/>
- </f:facet>
- <f:facet name="fatalMarker">
- <h:graphicImage url="/image/fatal.gif"/>
- </f:facet>
- <f:facet name="infoMarker">
- <h:graphicImage url="/image/info.gif"/>
- </f:facet>
- <f:facet name="warnMarker">
- <h:graphicImage url="/image/warn.gif"/>
- </f:facet>
- <f:facet name="passedMarker">
- <h:graphicImage url="/image/passed.gif"/>
- </f:facet>
- </r:message>
- <a4j:outputPanel ajaxRendered="true">
+ <table>
+ <tr>
+ <td>
+ <h:outputText value="Rich Messages Demo"/>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <r:messages layout="table"
+ tooltip="true"
+ showDetail="false"
+ showSummary="true"
+ passedLabel="No Error"
+ errorLabelClass="errorLabel"
+ fatalLabelClass="warnLabel"
+ infoLabelClass="infoLabel"
+ warnLabelClass="fatalLabel"
+ warnMarkerClass="markerWarn"
+ infoMarkerClass="markerInfo"
+ errorMarkerClass="markerError"
+ fatalMarkerClass="markerFatal"
+ errorClass="errorClass"
+ fatalClass="fatalClass"
+ warnClass="warnClass"
+ infoClass="infoClass"
+ var="messages"
+ >
- <r:message for="select"
- tooltip="true"
- showDetail="false"
- showSummary="true"
- passedLabel="No Error"
- errorLabelClass="errorLabel"
- fatalLabelClass="warnLabel"
- infoLabelClass="infoLabel"
- warnLabelClass="fatalLabel"
- >
-
-
- <f:facet name="errorMarker">
- <h:graphicImage url="/image/error.gif"/>
- </f:facet>
- <f:facet name="fatalMarker">
- <h:graphicImage url="/image/fatal.gif"/>
- </f:facet>
- <f:facet name="infoMarker">
- <h:graphicImage url="/image/info.gif"/>
- </f:facet>
- <f:facet name="warnMarker">
- <h:graphicImage url="/image/warn.gif"/>
- </f:facet>
- <f:facet name="passedMarker">
- <h:graphicImage url="/image/passed.gif"/>
- </f:facet>
- </r:message>
- </a4j:outputPanel>
-
+ <f:facet name="errorMarker">
+ <h:graphicImage url="/image/error.gif"/>
+ </f:facet>
+ <f:facet name="fatalMarker">
+ <h:graphicImage url="/image/fatal.gif"/>
+ </f:facet>
+ <f:facet name="infoMarker">
+ <h:graphicImage url="/image/info.gif"/>
+ </f:facet>
+ <f:facet name="warnMarker">
+ <h:graphicImage url="/image/warn.gif"/>
+ </f:facet>
+ <f:facet name="passedMarker">
+ <h:graphicImage url="/image/passed.gif"/>
+ </f:facet>
+ <h:outputText value="#{messages.summary}"> </h:outputText>
+ </r:messages>
+ </td>
+ </tr>
+ </table>
+
+ <div>
+ <h:commandButton value="submit" />
+ <a4j:commandButton value="submit ajax" />
+ </div>
</h:form>
</html>
\ No newline at end of file
17 years, 5 months
JBoss Rich Faces SVN: r1862 - in trunk/sandbox/ui/message/src/main: java/org/richfaces/component and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-07-26 04:44:05 -0400 (Thu, 26 Jul 2007)
New Revision: 1862
Modified:
trunk/sandbox/ui/message/src/main/config/component/message.xml
trunk/sandbox/ui/message/src/main/java/org/richfaces/component/UIRichMessages.java
trunk/sandbox/ui/message/src/main/java/org/richfaces/renderkit/html/RichMessagesHtmlBaseRenderer.java
Log:
add headerLocation support
Modified: trunk/sandbox/ui/message/src/main/config/component/message.xml
===================================================================
--- trunk/sandbox/ui/message/src/main/config/component/message.xml 2007-07-26 01:09:38 UTC (rev 1861)
+++ trunk/sandbox/ui/message/src/main/config/component/message.xml 2007-07-26 08:44:05 UTC (rev 1862)
@@ -236,7 +236,7 @@
<defaultvalue>"list"</defaultvalue>
</property>
- <property>
+ <property attachedstate="true">
<name>headerLocation</name>
<classname>java.lang.String</classname>
<defaultvalue>"top"</defaultvalue>
Modified: trunk/sandbox/ui/message/src/main/java/org/richfaces/component/UIRichMessages.java
===================================================================
--- trunk/sandbox/ui/message/src/main/java/org/richfaces/component/UIRichMessages.java 2007-07-26 01:09:38 UTC (rev 1861)
+++ trunk/sandbox/ui/message/src/main/java/org/richfaces/component/UIRichMessages.java 2007-07-26 08:44:05 UTC (rev 1862)
@@ -13,11 +13,26 @@
*/
public abstract class UIRichMessages extends UIMessages implements AjaxOutput {
+ public static String HEADER_LOCATION_LEFT = "left";
+
+ public static String HEADER_LOCATION_TOP = "top";
+
+ public static String HEADER_LOCATION_BOTTOM = "bottom";
+
+ public static String HEADER_LOCATION_RIGHT = "right";
+
private boolean wroteTable = false;
private boolean isIteratorLayout = false;
+// private String headerLocation = "left";
+
+
+ public abstract void setHeaderLocation(String headerLocation);
+
+ public abstract String getHeaderLocation();
+
public boolean isWroteTable() {
return wroteTable;
}
Modified: trunk/sandbox/ui/message/src/main/java/org/richfaces/renderkit/html/RichMessagesHtmlBaseRenderer.java
===================================================================
--- trunk/sandbox/ui/message/src/main/java/org/richfaces/renderkit/html/RichMessagesHtmlBaseRenderer.java 2007-07-26 01:09:38 UTC (rev 1861)
+++ trunk/sandbox/ui/message/src/main/java/org/richfaces/renderkit/html/RichMessagesHtmlBaseRenderer.java 2007-07-26 08:44:05 UTC (rev 1862)
@@ -76,15 +76,11 @@
protected void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
- Iterator messagesIter = null;
-
String forIds = null;
- String layout = null;
+ Iterator messagesIter = null;
- String var = null;
-
UIRichMessages uiMessages = (UIRichMessages)component;
if(uiMessages.isGlobalOnly()){
@@ -93,6 +89,20 @@
messagesIter = getMessageIterator(context, forIds, component);
+ renderBody(component, writer, context, messagesIter);
+ }
+
+ public void renderComponentUI(ResponseWriter writer, FacesContext context, UIComponent component, Iterator messagesIter) throws IOException{
+
+
+
+ String layout = null;
+
+ String var = null;
+
+
+ UIRichMessages uiMessages = (UIRichMessages)component;
+
layout = (String)uiMessages.getAttributes().get("layout");
if((layout != null) && (layout.equals("table"))){
@@ -101,7 +111,8 @@
getUtils().writeAttribute(writer, HTML.cellpadding_ATTRIBUTE, "0");
getUtils().writeAttribute(writer, HTML.cellspacing_ATTRIBUTE, "0");
- renderHeaderFacet(writer, context, uiMessages);
+// renderHeaderFacet(writer, context, uiMessages);
+
renderComponentOuterStyles(uiMessages, context, writer);
writer.startElement("tbody", uiMessages);
uiMessages.setWroteTable(true);
@@ -159,18 +170,20 @@
}
if(!uiMessages.isIteratorLayout()){
+
if(uiMessages.isWroteTable()){
writer.endElement("tbody");
writer.endElement("table");
}else{
writer.endElement("dl");
}
+
}else{
writer.endElement(HTML.SPAN_ELEM);
}
+
+ }
- }
-
public void renderLabelHtml(UIComponent component, FacesContext context, ResponseWriter writer,
FacesMessage facesMsg, String labelClass, String labelStyle, String passLabel) throws IOException {
@@ -319,7 +332,7 @@
- public void renderHeaderFacet(ResponseWriter writer, FacesContext context, UIRichMessages uiMessages) throws IOException{
+ public void renderHeaderFacet(ResponseWriter writer, FacesContext context, UIRichMessages uiMessages, UIComponent headerFacet) throws IOException{
UIComponent facet = null;
@@ -332,27 +345,134 @@
headerStyle = (String)uiMessages.getAttributes().get("headerStyle");
- if(uiMessages.getFacet("header") != null){
-
- facet = uiMessages.getFacet("header");
+// if(uiMessages.getFacet("header") != null){
+//
+// facet = uiMessages.getFacet("header");
+//
+// if(!facet.isRendered()){
+// return;
+// }
- if(!facet.isRendered()){
- return;
- }
+ getUtils().writeAttribute(writer, HTML.class_ATTRIBUTE, headerClass);
+ getUtils().writeAttribute(writer,HTML.style_ATTRIBUTE, headerStyle);
+
+ renderChild(context, facet);
+// }
+
+ }
+
+ public void renderBody(UIComponent component, ResponseWriter writer, FacesContext context, Iterator messagesIter) throws IOException{
+
+ UIRichMessages uiMessages = (UIRichMessages)component;
+
+ String headerLocation = uiMessages.getHeaderLocation();
+
+ if(headerLocation == null){
+ return;
+ }
+
+ UIComponent headerFacet = null;
+
+ UIComponent passedHeaderFacet = uiMessages.getFacet("passedHeader");
+ UIComponent commonHeaderFacet = uiMessages.getFacet("header");
+
+ if(passedHeaderFacet != null && !messagesIter.hasNext()){
+ headerFacet = passedHeaderFacet;
+ }else if(commonHeaderFacet != null){
+ headerFacet = commonHeaderFacet;
+ }
+
+ writer.startElement("table", uiMessages);
+ writer.startElement("tbody", uiMessages);
+
+ if(headerLocation.equals(UIRichMessages.HEADER_LOCATION_BOTTOM)){
- writer.startElement(HTML.THEAD_ELEMENT, uiMessages);
writer.startElement(HTML.TR_ELEMENT, uiMessages);
writer.startElement(HTML.td_ELEM, uiMessages);
- getUtils().writeAttribute(writer, HTML.class_ATTRIBUTE, headerClass);
- getUtils().writeAttribute(writer,HTML.style_ATTRIBUTE, headerStyle);
+ renderComponentUI(writer, context, uiMessages, messagesIter);
+
+ writer.endElement(HTML.td_ELEM);
+ writer.endElement(HTML.TR_ELEMENT);
+
+ if(headerFacet != null && !headerFacet.isRendered()){
- renderChild(context, facet);
+
+ writer.startElement(HTML.TR_ELEMENT, uiMessages);
+ writer.startElement(HTML.td_ELEM, uiMessages);
+
+ renderHeaderFacet(writer, context, uiMessages, headerFacet);
+ writer.endElement(HTML.td_ELEM);
+ writer.endElement(HTML.TR_ELEMENT);
+
+ }
+
+ }else if(headerLocation.equals(UIRichMessages.HEADER_LOCATION_TOP)){
+
+ if(headerFacet != null && !headerFacet.isRendered()){
+
+ writer.startElement(HTML.TR_ELEMENT, uiMessages);
+ writer.startElement(HTML.td_ELEM, uiMessages);
+
+ renderHeaderFacet(writer, context, uiMessages, headerFacet);
+
+ writer.endElement(HTML.td_ELEM);
+ writer.endElement(HTML.TR_ELEMENT);
+
+ }
+
+ writer.startElement(HTML.TR_ELEMENT, uiMessages);
+ writer.startElement(HTML.td_ELEM, uiMessages);
+
+ renderComponentUI(writer, context, uiMessages, messagesIter);
+
writer.endElement(HTML.td_ELEM);
writer.endElement(HTML.TR_ELEMENT);
- writer.endElement(HTML.THEAD_ELEMENT);
+
+ }else if(headerLocation.equals(UIRichMessages.HEADER_LOCATION_LEFT)){
+
+ writer.startElement(HTML.TR_ELEMENT, uiMessages);
+
+ if(headerFacet != null && !headerFacet.isRendered()){
+
+ writer.startElement(HTML.td_ELEM, uiMessages);
+ renderHeaderFacet(writer, context, uiMessages, headerFacet);
+ writer.endElement(HTML.td_ELEM);
+
+ }
+
+ writer.startElement(HTML.td_ELEM, uiMessages);
+
+ renderComponentUI(writer, context, uiMessages, messagesIter);
+
+ writer.endElement(HTML.td_ELEM);
+ writer.endElement(HTML.TR_ELEMENT);
+
+
+ }else if(headerLocation.equals(UIRichMessages.HEADER_LOCATION_RIGHT)){
+
+ writer.startElement(HTML.TR_ELEMENT, uiMessages);
+ writer.startElement(HTML.td_ELEM, uiMessages);
+
+ renderComponentUI(writer, context, uiMessages, messagesIter);
+
+ writer.endElement(HTML.td_ELEM);
+
+ if(headerFacet != null && !headerFacet.isRendered()){
+
+ writer.startElement(HTML.td_ELEM, uiMessages);
+ renderHeaderFacet(writer, context, uiMessages,headerFacet);
+ writer.endElement(HTML.td_ELEM);
+
+ }
+
+ writer.endElement(HTML.TR_ELEMENT);
+
}
+
+ writer.endElement("tbody");
+ writer.endElement("table");
}
17 years, 5 months
JBoss Rich Faces SVN: r1861 - in trunk/samples/richfaces-demo/src/main/webapp: templates/include and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: SergeySmirnov
Date: 2007-07-25 21:09:38 -0400 (Wed, 25 Jul 2007)
New Revision: 1861
Modified:
trunk/samples/richfaces-demo/src/main/webapp/css/common.css
trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-group.xhtml
trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml
Log:
styles enh
Modified: trunk/samples/richfaces-demo/src/main/webapp/css/common.css
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/css/common.css 2007-07-26 00:33:26 UTC (rev 1860)
+++ trunk/samples/richfaces-demo/src/main/webapp/css/common.css 2007-07-26 01:09:38 UTC (rev 1861)
@@ -143,7 +143,7 @@
background-position : left;
background-repeat : repeat-y;
background-color : transparent;
- padding : 0px 0px 0px 0px;
+ padding : 0px 1px 0px 0px;
}
.panel_menu div {
background-color:transparent;
@@ -192,9 +192,14 @@
font-size : 11px;
padding-left : 10px
}
-.text, .ico{
+.text {
cursor : pointer;
+ padding:0px 0px 0px 10px;
}
+ .ico{
+ cursor : pointer;
+ padding:1px 3px 1px 3px;
+}
.component_name{
position : absolute;
Modified: trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-group.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-group.xhtml 2007-07-26 00:33:26 UTC (rev 1860)
+++ trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-group.xhtml 2007-07-26 01:09:38 UTC (rev 1861)
@@ -5,12 +5,12 @@
xmlns:a4j="http://richfaces.org/ajax"
xmlns:rich="http://richfaces.ajax4jsf.org/rich">
<ui:composition>
-<table border="0" cellpadding="3" cellspacing="1">
+<table border="0" cellpadding="0" cellspacing="1">
<tbody>
<a4j:repeat var="component" value="#{components}">
<tr class="#{component.current?'active':'unactive'}" onmouseover="this.className='active'" onmouseout="this.className='#{component.current?'active':'unactive'}'">
<td class="ico"><h:graphicImage value="#{component.iconImage}" width="16" height="16" alt="" border="0" /></td>
- <td class="text" style="padding:0px 0px 0px 10px" width="100%">
+ <td class="text" width="100%">
<h:outputLink style="display:block;height:20px" value="#{component.contextRelativeDemoLocation}">
<span style="display:block;">
#{component.name}
Modified: trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml 2007-07-26 00:33:26 UTC (rev 1860)
+++ trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml 2007-07-26 01:09:38 UTC (rev 1861)
@@ -7,7 +7,7 @@
<ui:composition>
<rich:panel styleClass="panel_menu">
-<rich:panelBar selectedPanel="#{componentNavigator.currentComponent.group}" height="550" width="100%">
+<rich:panelBar selectedPanel="#{componentNavigator.currentComponent.group}" height="530" width="100%">
<rich:panelBarItem id="ajaxSupport" label="Ajax Support">
<ui:include src="/templates/include/components-group.xhtml" >
<ui:param name="components" value="#{componentNavigator.ajaxSupport}" />
17 years, 5 months
JBoss Rich Faces SVN: r1860 - trunk/samples/richfaces-demo/src/main/webapp/css.
by richfaces-svn-commits@lists.jboss.org
Author: SergeySmirnov
Date: 2007-07-25 20:33:26 -0400 (Wed, 25 Jul 2007)
New Revision: 1860
Modified:
trunk/samples/richfaces-demo/src/main/webapp/css/common.css
Log:
fixed problem with background image in xhtml mode
Modified: trunk/samples/richfaces-demo/src/main/webapp/css/common.css
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/css/common.css 2007-07-26 00:08:42 UTC (rev 1859)
+++ trunk/samples/richfaces-demo/src/main/webapp/css/common.css 2007-07-26 00:33:26 UTC (rev 1860)
@@ -15,6 +15,7 @@
background-position : top left;
background-repeat : no-repeat;
background-color : White;
+ padding-top:428px;
}
.page_brick{
17 years, 5 months
JBoss Rich Faces SVN: r1859 - trunk/samples.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-07-25 20:08:42 -0400 (Wed, 25 Jul 2007)
New Revision: 1859
Modified:
trunk/samples/pom.xml
Log:
temporary disable ajax portlet
Modified: trunk/samples/pom.xml
===================================================================
--- trunk/samples/pom.xml 2007-07-25 23:39:43 UTC (rev 1858)
+++ trunk/samples/pom.xml 2007-07-26 00:08:42 UTC (rev 1859)
@@ -451,7 +451,9 @@
<module>richfaces-demo</module>
<module>dropdownmenu-sample</module>
<module>tooltip-sample</module>
- <module>ajaxPortlet</module>
- <module>panelmenu-sample</module>
+ <!--
+ <module>ajaxPortlet</module>
+ -->
+ <module>panelmenu-sample</module>
</modules>
</project>
\ No newline at end of file
17 years, 5 months
JBoss Rich Faces SVN: r1858 - in trunk: cdk/generator and 24 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-07-25 19:39:43 -0400 (Wed, 25 Jul 2007)
New Revision: 1858
Added:
trunk/framework/impl/src/main/java/org/ajax4jsf/application/ComponentsLoader.java
trunk/framework/impl/src/main/java/org/ajax4jsf/application/ComponentsLoaderImpl.java
trunk/framework/impl/src/main/java/org/ajax4jsf/event/AjaxPhaseListener.java
trunk/framework/impl/src/main/java/org/richfaces/VersionBean.java
trunk/sandbox/samples/panelmenu-sample/
trunk/sandbox/ui/panelmenu/
Removed:
trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxPhaseListener.java
trunk/framework/impl/src/main/java/org/richfaces/skin/VersionBean.java
Modified:
trunk/cdk/generator/pom.xml
trunk/cdk/maven-archetype-jsf-component/pom.xml
trunk/cdk/maven-archetype-jsfwebapp/pom.xml
trunk/cdk/maven-cdk-plugin/pom.xml
trunk/cdk/pom.xml
trunk/extensions/pom.xml
trunk/extensions/portlet/pom.xml
trunk/framework/api-parent/pom.xml
trunk/framework/api/pom.xml
trunk/framework/impl/pom.xml
trunk/framework/impl/src/main/java/org/ajax4jsf/application/AjaxStateManager.java
trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxContainerRenderer.java
trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java
trunk/framework/impl/src/main/java/org/richfaces/skin/SkinVariableResolver.java
trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
trunk/framework/impl/src/main/resources/META-INF/faces-config.xml
trunk/framework/pom.xml
trunk/framework/test/src/main/java/org/ajax4jsf/tests/AbstractAjax4JsfTestCase.java
trunk/framework/test/src/test/java/org/ajax4jsf/framework/renderer/BeforeRendererListenerTestCase.java
trunk/samples/ajaxPortlet/pom.xml
trunk/samples/useCases/pom.xml
trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/KeepAliveHandler.java
trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/jsp/KeepAliveTag.java
Log:
Implement ajax-related StateManager, base for a portal state manager
Insert exact versions number into pom's
Modified: trunk/cdk/generator/pom.xml
===================================================================
--- trunk/cdk/generator/pom.xml 2007-07-25 23:28:32 UTC (rev 1857)
+++ trunk/cdk/generator/pom.xml 2007-07-25 23:39:43 UTC (rev 1858)
@@ -7,6 +7,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.cdk</groupId>
<artifactId>generator</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
<name>Java Server Faces component generator</name>
<build>
<plugins>
Modified: trunk/cdk/maven-archetype-jsf-component/pom.xml
===================================================================
--- trunk/cdk/maven-archetype-jsf-component/pom.xml 2007-07-25 23:28:32 UTC (rev 1857)
+++ trunk/cdk/maven-archetype-jsf-component/pom.xml 2007-07-25 23:39:43 UTC (rev 1858)
@@ -7,5 +7,6 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-archetype-jsf-component</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
<name>Archetype - maven-archetype-jsf-component</name>
</project>
\ No newline at end of file
Modified: trunk/cdk/maven-archetype-jsfwebapp/pom.xml
===================================================================
--- trunk/cdk/maven-archetype-jsfwebapp/pom.xml 2007-07-25 23:28:32 UTC (rev 1857)
+++ trunk/cdk/maven-archetype-jsfwebapp/pom.xml 2007-07-25 23:39:43 UTC (rev 1858)
@@ -7,5 +7,6 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-archetype-jsfwebapp</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
<name>Archetype for jsf webapp project</name>
</project>
\ No newline at end of file
Modified: trunk/cdk/maven-cdk-plugin/pom.xml
===================================================================
--- trunk/cdk/maven-cdk-plugin/pom.xml 2007-07-25 23:28:32 UTC (rev 1857)
+++ trunk/cdk/maven-cdk-plugin/pom.xml 2007-07-25 23:39:43 UTC (rev 1858)
@@ -7,6 +7,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>Maven plugin for JSF components code generation</name>
<dependencies>
Modified: trunk/cdk/pom.xml
===================================================================
--- trunk/cdk/pom.xml 2007-07-25 23:28:32 UTC (rev 1857)
+++ trunk/cdk/pom.xml 2007-07-25 23:39:43 UTC (rev 1858)
@@ -8,6 +8,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces</groupId>
<artifactId>cdk</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>JSF Components Development kit</name>
<dependencies />
Modified: trunk/extensions/pom.xml
===================================================================
--- trunk/extensions/pom.xml 2007-07-25 23:28:32 UTC (rev 1857)
+++ trunk/extensions/pom.xml 2007-07-25 23:39:43 UTC (rev 1858)
@@ -8,6 +8,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces</groupId>
<artifactId>extensions</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
<name>Richfaces extensions for a different environments</name>
<packaging>pom</packaging>
<modules>
Modified: trunk/extensions/portlet/pom.xml
===================================================================
--- trunk/extensions/portlet/pom.xml 2007-07-25 23:28:32 UTC (rev 1857)
+++ trunk/extensions/portlet/pom.xml 2007-07-25 23:39:43 UTC (rev 1858)
@@ -7,6 +7,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.extensions</groupId>
<artifactId>portlet</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
<name>ajax4jsf portlet brige</name>
<url>http://labs.jboss.com/wiki/Ajax4jsf/a4j-portlet</url>
<dependencies>
Modified: trunk/framework/api/pom.xml
===================================================================
--- trunk/framework/api/pom.xml 2007-07-25 23:28:32 UTC (rev 1857)
+++ trunk/framework/api/pom.xml 2007-07-25 23:39:43 UTC (rev 1858)
@@ -10,5 +10,6 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-api</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
<name>Java Server Faces AJAX framework API</name>
</project>
\ No newline at end of file
Modified: trunk/framework/api-parent/pom.xml
===================================================================
--- trunk/framework/api-parent/pom.xml 2007-07-25 23:28:32 UTC (rev 1857)
+++ trunk/framework/api-parent/pom.xml 2007-07-25 23:39:43 UTC (rev 1858)
@@ -10,6 +10,7 @@
<groupId>org.richfaces.framework</groupId>
<packaging>pom</packaging>
<artifactId>api-parent</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
<name>Java Server Faces AJAX framework API Dependencies</name>
<properties>
<jsfVersion>1.1</jsfVersion>
Modified: trunk/framework/impl/pom.xml
===================================================================
--- trunk/framework/impl/pom.xml 2007-07-25 23:28:32 UTC (rev 1857)
+++ trunk/framework/impl/pom.xml 2007-07-25 23:39:43 UTC (rev 1858)
@@ -11,6 +11,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
<name>Java Server Faces AJAX framework implementation</name>
<build>
<resources>
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/application/AjaxStateManager.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/application/AjaxStateManager.java 2007-07-25 23:28:32 UTC (rev 1857)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/application/AjaxStateManager.java 2007-07-25 23:39:43 UTC (rev 1858)
@@ -21,21 +21,55 @@
package org.ajax4jsf.application;
+import java.io.Externalizable;
import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.Map.Entry;
+import javax.faces.FactoryFinder;
import javax.faces.application.StateManager;
+import javax.faces.component.UIComponent;
import javax.faces.component.UIViewRoot;
+import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
+import javax.faces.render.RenderKit;
+import javax.faces.render.RenderKitFactory;
+import javax.faces.render.ResponseStateManager;
-import org.ajax4jsf.renderkit.AjaxPhaseListener;
+import org.ajax4jsf.context.AjaxContext;
+import org.ajax4jsf.event.AjaxPhaseListener;
+import org.apache.commons.collections.map.LRUMap;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
/**
* @author shura
- *
+ *
*/
public class AjaxStateManager extends StateManager {
+
+ protected static final int DEFAULT_NUMBER_OF_VIEWS = 16;
+
+ private static final String VIEW_STATES_MAP = AjaxStateManager.class
+ .getName()+".VIEW_STATES_MAP";
+
+ private static final Object VIEW_SEQUENCE = AjaxStateManager.class.getName()+".VIEW_SEQUENCE";
+
+ private final StateManager parent;
+
+ private final ComponentsLoader componentLoader;
- private StateManager parent;
+ private int viewSequence=0;
+
+ private static final Log _log = LogFactory.getLog(AjaxStateManager.class);
/**
* @param parent
@@ -43,60 +77,324 @@
public AjaxStateManager(StateManager parent) {
super();
this.parent = parent;
+ componentLoader = new ComponentsLoaderImpl();
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see javax.faces.application.StateManager#getComponentStateToSave(javax.faces.context.FacesContext)
*/
protected Object getComponentStateToSave(FacesContext context) {
throw new UnsupportedOperationException();
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see javax.faces.application.StateManager#getTreeStructureToSave(javax.faces.context.FacesContext)
*/
protected Object getTreeStructureToSave(FacesContext context) {
throw new UnsupportedOperationException();
}
- /* (non-Javadoc)
- * @see javax.faces.application.StateManager#restoreComponentState(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot, java.lang.String)
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.faces.application.StateManager#restoreComponentState(javax.faces.context.FacesContext,
+ * javax.faces.component.UIViewRoot, java.lang.String)
*/
protected void restoreComponentState(FacesContext context,
UIViewRoot viewRoot, String renderKitId) {
throw new UnsupportedOperationException();
}
- /* (non-Javadoc)
- * @see javax.faces.application.StateManager#restoreTreeStructure(javax.faces.context.FacesContext, java.lang.String, java.lang.String)
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.faces.application.StateManager#restoreTreeStructure(javax.faces.context.FacesContext,
+ * java.lang.String, java.lang.String)
*/
protected UIViewRoot restoreTreeStructure(FacesContext context,
String viewId, String renderKitId) {
throw new UnsupportedOperationException();
}
- /* (non-Javadoc)
- * @see javax.faces.application.StateManager#restoreView(javax.faces.context.FacesContext, java.lang.String, java.lang.String)
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.faces.application.StateManager#writeState(javax.faces.context.FacesContext,
+ * javax.faces.application.StateManager.SerializedView)
*/
+ public void writeState(FacesContext context, SerializedView state)
+ throws IOException {
+ parent.writeState(context, state);
+ if(_log.isDebugEnabled()){
+ _log.debug("Write view state to the response");
+ }
+ context.getExternalContext().getRequestMap().put(
+ AjaxPhaseListener.VIEW_STATE_SAVED_PARAM, Boolean.TRUE);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.faces.application.StateManager#restoreView(javax.faces.context.FacesContext,
+ * java.lang.String, java.lang.String)
+ */
public UIViewRoot restoreView(FacesContext context, String viewId,
String renderKitId) {
- return parent.restoreView(context, viewId, renderKitId);
+ UIViewRoot viewRoot = null;
+ ResponseStateManager responseStateManager = getRenderKit(context,
+ renderKitId).getResponseStateManager();
+ TreeStrutureNode treeStructure = null;
+ Object state = null;
+ if (isSavingStateInClient(context)) {
+ treeStructure = (TreeStrutureNode) responseStateManager
+ .getTreeStructureToRestore(context, viewId);
+ // viewRoot = parent.restoreView(context, viewId, renderKitId);
+ state = responseStateManager.getComponentStateToRestore(context);
+ } else {
+ Object[] serializedView = restoreStateFromSession(context,
+ viewId, renderKitId);
+ if (null != serializedView) {
+ treeStructure = (TreeStrutureNode) serializedView[0];
+ state = serializedView[1];
+ }
+ }
+ if (null != treeStructure) {
+ viewRoot = (UIViewRoot) treeStructure.restore(componentLoader);
+ if (null != viewRoot && null != state) {
+ viewRoot.processRestoreState(context, state);
+ }
+ }
+ return viewRoot;
+
}
- /* (non-Javadoc)
- * @see javax.faces.application.StateManager#saveSerializedView(javax.faces.context.FacesContext)
- */
- public SerializedView saveSerializedView(FacesContext context) {
- return parent.saveSerializedView(context);
+ protected Object[] restoreStateFromSession(FacesContext context,
+ String viewId, String renderKitId) {
+ Object[] restoredState = null;
+ Object id = getRenderKit(context, renderKitId)
+ .getResponseStateManager().getTreeStructureToRestore(context,
+ viewId);
+ ExternalContext externalContext = context.getExternalContext();
+ Object session = externalContext.getSession(false);
+ if (null == session) {
+ } else {
+ synchronized (session) {
+ LRUMap viewStates = (LRUMap) externalContext.getSessionMap()
+ .get(VIEW_STATES_MAP);
+ if (null != viewStates) {
+ LRUMap logicalStates = (LRUMap) viewStates.get(viewId);
+ if (null != logicalStates) {
+ if (null != id) {
+ restoredState = (Object[]) logicalStates
+ .get(id);
+ externalContext.getRequestMap().put(VIEW_SEQUENCE, id);
+ if (null == restoredState) {
+ restoredState = (Object[]) logicalStates
+ .get(logicalStates.firstKey());
+ }
+ } else {
+ restoredState = (Object[]) logicalStates
+ .get(logicalStates.firstKey());
+ }
+ }
+ }
+ }
+ }
+
+ return restoredState;
}
- /* (non-Javadoc)
- * @see javax.faces.application.StateManager#writeState(javax.faces.context.FacesContext, javax.faces.application.StateManager.SerializedView)
- */
- public void writeState(FacesContext context, SerializedView state)
- throws IOException {
- parent.writeState(context, state);
- context.getExternalContext().getRequestMap().put(AjaxPhaseListener.VIEW_STATE_SAVED_PARAM, Boolean.TRUE);
+ public SerializedView saveSerializedView(FacesContext context) {
+ SerializedView serializedView = null;
+ UIViewRoot viewRoot = context.getViewRoot();
+ if (!viewRoot.isTransient()) {
+ TreeStrutureNode treeState = new TreeStrutureNode();
+ treeState.apply(context, viewRoot, new HashSet());
+ Object state = viewRoot.processSaveState(context);
+ if (isSavingStateInClient(context)) {
+ serializedView = new SerializedView(treeState, state);
+ } else {
+ ExternalContext externalContext = context.getExternalContext();
+ Object session = externalContext.getSession(true);
+ synchronized (session) {
+ LRUMap viewStates = (LRUMap) externalContext
+ .getSessionMap().get(VIEW_STATES_MAP);
+ if (null == viewStates) {
+ viewStates = new LRUMap(
+ getNumberOfViews(externalContext));
+ externalContext.getSessionMap().put(VIEW_STATES_MAP,
+ viewStates);
+ }
+ Object id = getNextViewId(context);
+ LRUMap logicalViewsMap = (LRUMap) viewStates.get(viewRoot.getViewId());
+ if(null == logicalViewsMap){
+ logicalViewsMap = new LRUMap(getNumberOfViews(externalContext));
+ }
+ // Renew last seen view.
+ viewStates.put(viewRoot.getViewId(), logicalViewsMap);
+ logicalViewsMap.put(id, new Object[]{treeState,state});
+ serializedView = new SerializedView(id,null);
+ }
+ }
+
+ }
+ return serializedView;
}
+ protected Object getNextViewId(FacesContext context) {
+ AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
+ if(ajaxContext.isAjaxRequest(context)){
+ Object id = context.getExternalContext().getRequestMap().get(VIEW_SEQUENCE);
+ if(null != id){
+ return id;
+ }
+ }
+ if (viewSequence++ == Character.MAX_VALUE) {
+ viewSequence = 0;
+ }
+ return UIViewRoot.UNIQUE_ID_PREFIX + ((int) viewSequence);
+ }
+
+ protected int getNumberOfViews(ExternalContext externalContext) {
+ return DEFAULT_NUMBER_OF_VIEWS;
+ }
+
+ protected RenderKit getRenderKit(FacesContext context, String renderKitId) {
+ RenderKit renderKit = context.getRenderKit();
+ if (null == renderKit) {
+ RenderKitFactory factory = (RenderKitFactory) FactoryFinder
+ .getFactory(FactoryFinder.RENDER_KIT_FACTORY);
+ renderKit = factory.getRenderKit(context, renderKitId);
+ }
+ return renderKit;
+ }
+
+ protected static final class TreeStrutureNode implements Externalizable {
+ /**
+ * TODO - implement Externalizable to reduce serialized state.
+ */
+ private static final long serialVersionUID = -9038742487716977254L;
+
+ private static final String NULL_ID = "";
+
+ private Map facets = null;
+
+ private List children = null;
+
+ private String type;
+
+ private String id;
+
+ public void apply(FacesContext context, UIComponent component,
+ Set uniqueIds) {
+ type = component.getClass().getName();
+ id = component.getId();
+ String clientId = component.getClientId(context);
+ if (!uniqueIds.add(clientId)) {
+ throw new IllegalStateException("duplicate Id for a component "
+ + clientId);
+ }
+ Map componentFacets = component.getFacets();
+ for (Iterator i = componentFacets.entrySet().iterator(); i
+ .hasNext();) {
+ Entry element = (Entry) i.next();
+ UIComponent f = (UIComponent) element.getValue();
+ if (!f.isTransient()) {
+ TreeStrutureNode facet = new TreeStrutureNode();
+ facet.apply(context, f, uniqueIds);
+ if (null == facets) {
+ facets = new HashMap();
+ }
+ facets.put(element.getKey(), facet);
+
+ }
+ }
+ for (Iterator i = component.getChildren().iterator(); i.hasNext();) {
+ UIComponent child = (UIComponent) i.next();
+ if (!child.isTransient()) {
+ TreeStrutureNode t = new TreeStrutureNode();
+ t.apply(context, child, uniqueIds);
+ if (null == children) {
+ children = new ArrayList();
+ }
+ children.add(t);
+
+ }
+ }
+ }
+
+ public UIComponent restore(ComponentsLoader loader) {
+ UIComponent component;
+ component = loader.createComponent(type);
+ component.setId(id);
+ if (null != facets) {
+ for (Iterator i = facets.entrySet().iterator(); i.hasNext();) {
+ Entry element = (Entry) i.next();
+ UIComponent facet = ((TreeStrutureNode) element.getValue())
+ .restore(loader);
+ component.getFacets().put(element.getKey(), facet);
+ }
+
+ }
+ if (null != children) {
+ for (Iterator i = children.iterator(); i.hasNext();) {
+ TreeStrutureNode node = (TreeStrutureNode) i.next();
+ UIComponent child = node.restore(loader);
+ component.getChildren().add(child);
+ }
+
+ }
+ return component;
+ }
+
+ public void readExternal(ObjectInput in) throws IOException,
+ ClassNotFoundException {
+ type = in.readUTF();
+ id = in.readUTF();
+ if(NULL_ID.equals(id)){
+ id = null;
+ }
+ int facetsSize = in.readInt();
+ if (facetsSize >0) {
+ facets = new HashMap(facetsSize);
+ for(int i=0;i<facetsSize;i++){
+ String facetName = in.readUTF();
+ TreeStrutureNode facet = new TreeStrutureNode();
+ facet.readExternal(in);
+ facets.put(facetName, facet);
+ }
+ }
+ int childrenSize = in.readInt();
+ if (childrenSize>0) {
+ children = new ArrayList(childrenSize);
+ for(int i=0;i<childrenSize;i++){
+ TreeStrutureNode child = new TreeStrutureNode();
+ child.readExternal(in);
+ children.add(child);
+ }
+ }
+ }
+
+ public void writeExternal(ObjectOutput out) throws IOException {
+ out.writeUTF(type);
+ out.writeUTF(null == id?NULL_ID:id);
+ out.writeInt(facets.size());
+ for (Iterator i = facets.entrySet().iterator(); i.hasNext();) {
+ Map.Entry entry = (Map.Entry) i.next();
+ out.writeUTF((String) entry.getKey());
+ TreeStrutureNode node = (TreeStrutureNode) entry.getValue();
+ node.writeExternal(out);
+ }
+ out.writeInt(children.size());
+ for (Iterator i = children.iterator(); i.hasNext();) {
+ TreeStrutureNode child = (TreeStrutureNode) i.next();
+ child.writeExternal(out);
+ }
+ }
+ }
+
}
Added: trunk/framework/impl/src/main/java/org/ajax4jsf/application/ComponentsLoader.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/application/ComponentsLoader.java (rev 0)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/application/ComponentsLoader.java 2007-07-25 23:39:43 UTC (rev 1858)
@@ -0,0 +1,9 @@
+package org.ajax4jsf.application;
+
+import javax.faces.component.UIComponent;
+
+public interface ComponentsLoader {
+
+ public abstract UIComponent createComponent(String type);
+
+}
\ No newline at end of file
Property changes on: trunk/framework/impl/src/main/java/org/ajax4jsf/application/ComponentsLoader.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/framework/impl/src/main/java/org/ajax4jsf/application/ComponentsLoaderImpl.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/application/ComponentsLoaderImpl.java (rev 0)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/application/ComponentsLoaderImpl.java 2007-07-25 23:39:43 UTC (rev 1858)
@@ -0,0 +1,81 @@
+/**
+ *
+ */
+package org.ajax4jsf.application;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+
+import org.apache.commons.collections.Transformer;
+import org.apache.commons.collections.map.LazyMap;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class ComponentsLoaderImpl implements Transformer, ComponentsLoader {
+
+ private Map classes;
+
+ private ClassLoader loader;
+
+ public ComponentsLoaderImpl() {
+ classes = Collections.synchronizedMap(LazyMap.decorate(new HashMap(),
+ this));
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.ajax4jsf.portlet.application.ComponentsLoader#createComponent(java.lang.String)
+ */
+ public UIComponent createComponent(String type) {
+ // Classes is a lazy Map, new object will be create on the fly.
+ Class componentClass = (Class) classes.get(type);
+ try {
+ return (UIComponent) componentClass.newInstance();
+ } catch (InstantiationException e) {
+ throw new FacesException(
+ "Error on create new instance of the component with class "
+ + type, e);
+ } catch (IllegalAccessException e) {
+ throw new FacesException(
+ "IllegalAccess on attempt to create new instance of the component with class "
+ + type, e);
+ }
+ }
+
+ public Object transform(Object input) {
+ if (null == input) {
+ throw new NullPointerException(
+ "Name for a UIComponent class to restore is null");
+ }
+ ClassLoader loader = getClassLoader();
+ Class componentClass = null;
+ try {
+ componentClass = loader.loadClass(input.toString());
+ } catch (ClassNotFoundException e) {
+ throw new FacesException("Can't load class " + input.toString(), e);
+ }
+ return componentClass;
+ }
+
+ /**
+ * lazy create ClassLoader instance.
+ * @return
+ */
+ private ClassLoader getClassLoader() {
+ if (loader == null) {
+ loader = Thread.currentThread().getContextClassLoader();
+ if (loader == null) {
+ loader = this.getClass().getClassLoader();
+ }
+
+ }
+ return loader;
+ }
+}
Property changes on: trunk/framework/impl/src/main/java/org/ajax4jsf/application/ComponentsLoaderImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/framework/impl/src/main/java/org/ajax4jsf/event/AjaxPhaseListener.java (from rev 1848, trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxPhaseListener.java)
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/event/AjaxPhaseListener.java (rev 0)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/event/AjaxPhaseListener.java 2007-07-25 23:39:43 UTC (rev 1858)
@@ -0,0 +1,169 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - 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.event;
+
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.faces.FacesException;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+import javax.faces.event.PhaseEvent;
+import javax.faces.event.PhaseId;
+import javax.faces.event.PhaseListener;
+
+import org.ajax4jsf.Messages;
+import org.ajax4jsf.context.AjaxContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.richfaces.skin.SkinFactory;
+
+/**
+ * Listener for act before Render phase to set RenderKit Id for current skin.
+ *
+ * @author shura (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.3 $ $Date: 2007/02/06 16:23:19 $
+ *
+ */
+public class AjaxPhaseListener implements PhaseListener {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -4087936963051339868L;
+
+ public static final String VIEW_BEAN_PREFIX = "org.ajax4jsf.viewbean:";
+
+ public static final String VIEW_STATE_SAVED_PARAM = "org.ajax4jsf.VIEW_STATE_SAVED";
+
+ private static final Log log = LogFactory
+ .getLog(AjaxPhaseListener.class);
+
+ public static final String AJAX_BEAN_PREFIX = "org.ajax4jsf.ajaxviewbean:";
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.faces.event.PhaseListener#afterPhase(javax.faces.event.PhaseEvent)
+ */
+ public void afterPhase(PhaseEvent event) {
+ PhaseId phaseId = event.getPhaseId();
+ if(log.isDebugEnabled()){
+ log.debug("Process after phase "+phaseId.toString());
+ }
+ FacesContext context = event.getFacesContext();
+ Map requestMap = context.getExternalContext().getRequestMap();
+ AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
+ if (phaseId == PhaseId.RENDER_RESPONSE) {
+ if (ajaxContext.isAjaxRequest()) {
+ // JSF RI 1.1 hack - view state not saved in <f:view> tag.
+ if(null == requestMap.get(VIEW_STATE_SAVED_PARAM)){
+ try {
+ ajaxContext.saveViewState(context);
+ } catch (IOException e) {
+ throw new FacesException(e);
+ }
+ }
+ }
+// ajaxContext.processHeadResources(context);
+ } else if (phaseId == PhaseId.RESTORE_VIEW) {
+
+ UIViewRoot viewRoot = context.getViewRoot();
+ if(null != viewRoot){
+ boolean isAjax = ajaxContext.isAjaxRequest();
+ Map attributes = viewRoot.getAttributes();
+ for (Iterator it = attributes.keySet().iterator(); it.hasNext();) {
+ Object key = it.next();
+ if (key instanceof String) {
+ String stringKey = (String) key;
+ if(stringKey.startsWith(VIEW_BEAN_PREFIX)){
+ requestMap.put(stringKey.substring(VIEW_BEAN_PREFIX.length()), attributes.get(key));
+ } else if(isAjax && stringKey.startsWith(AJAX_BEAN_PREFIX)){
+ requestMap.put(stringKey.substring(AJAX_BEAN_PREFIX.length()), attributes.get(key));
+ }
+
+ }
+ }
+ }
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.faces.event.PhaseListener#beforePhase(javax.faces.event.PhaseEvent)
+ */
+ public void beforePhase(PhaseEvent event) {
+ PhaseId phaseId = event.getPhaseId();
+ if(log.isDebugEnabled()){
+ log.debug("Process before phase "+phaseId.toString());
+ }
+ FacesContext context = event.getFacesContext();
+ if (phaseId == PhaseId.RENDER_RESPONSE) {
+ // Clear ViewId replacement, to avoid incorrect rendering of forms URI.
+ AjaxContext.getCurrentInstance(context).setViewIdHolder(null);
+
+ UIViewRoot root = context.getViewRoot();
+ log.debug(Messages.getMessage(
+ Messages.ENTER_BEFORE_RENDER_VIEW_PHASE, root.getViewId(),
+ root.getRenderKitId()));
+
+ // TODO - create special skin-config.xml configuration.
+ String renderKitId = null;
+ try {
+ renderKitId = SkinFactory.getInstance().getSkin(context)
+ .getRenderKitId(context);
+ } catch (Exception e) {
+ log.error("Exception on get current Skin ", e);
+ }
+ if (null != renderKitId) {
+ log.debug(Messages.getMessage(Messages.SET_RENDER_KIT_ID_INFO,
+ renderKitId));
+ root.setRenderKitId(renderKitId);
+ }
+ } else if (phaseId == PhaseId.RESTORE_VIEW) {
+
+ }
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see javax.faces.event.PhaseListener#getPhaseId()
+ */
+ public PhaseId getPhaseId() {
+ return PhaseId.ANY_PHASE;
+ }
+
+ protected boolean isValueReference(String value) {
+ if (value == null)
+ throw new NullPointerException("value");
+
+ int start = value.indexOf("#{");
+ if (start < 0)
+ return false;
+
+ int end = value.lastIndexOf('}');
+ return (end >= 0 && start < end);
+ }
+
+}
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxContainerRenderer.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxContainerRenderer.java 2007-07-25 23:28:32 UTC (rev 1857)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxContainerRenderer.java 2007-07-25 23:39:43 UTC (rev 1858)
@@ -55,7 +55,7 @@
public static final String AJAX_VIEW_STATE_TAG = "span";
- public static final String AJAX_VIEW_STATE_ID = "ajax-update-ids";
+ public static final String AJAX_VIEW_STATE_ID = "ajax-view-state";
public static final String AJAX_RESULT_GROUP_TAG = "meta";
Deleted: trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxPhaseListener.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxPhaseListener.java 2007-07-25 23:28:32 UTC (rev 1857)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxPhaseListener.java 2007-07-25 23:39:43 UTC (rev 1858)
@@ -1,169 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - 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.renderkit;
-
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.faces.FacesException;
-import javax.faces.component.UIViewRoot;
-import javax.faces.context.FacesContext;
-import javax.faces.event.PhaseEvent;
-import javax.faces.event.PhaseId;
-import javax.faces.event.PhaseListener;
-
-import org.ajax4jsf.Messages;
-import org.ajax4jsf.context.AjaxContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.richfaces.skin.SkinFactory;
-
-/**
- * Listener for act before Render phase to set RenderKit Id for current skin.
- *
- * @author shura (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.3 $ $Date: 2007/02/06 16:23:19 $
- *
- */
-public class AjaxPhaseListener implements PhaseListener {
-
- /**
- *
- */
- private static final long serialVersionUID = -4087936963051339868L;
-
- public static final String VIEW_BEAN_PREFIX = "org.ajax4jsf.viewbean:";
-
- public static final String VIEW_STATE_SAVED_PARAM = "org.ajax4jsf.VIEW_STATE_SAVED";
-
- private static final Log log = LogFactory
- .getLog(AjaxPhaseListener.class);
-
- public static final String AJAX_BEAN_PREFIX = "org.ajax4jsf.ajaxviewbean:";
-
- /*
- * (non-Javadoc)
- *
- * @see javax.faces.event.PhaseListener#afterPhase(javax.faces.event.PhaseEvent)
- */
- public void afterPhase(PhaseEvent event) {
- PhaseId phaseId = event.getPhaseId();
- if(log.isDebugEnabled()){
- log.debug("Process after phase "+phaseId.toString());
- }
- FacesContext context = event.getFacesContext();
- Map requestMap = context.getExternalContext().getRequestMap();
- AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
- if (phaseId == PhaseId.RENDER_RESPONSE) {
- if (ajaxContext.isAjaxRequest()) {
- // JSF RI 1.1 hack - view state not saved in <f:view> tag.
- if(null == requestMap.get(VIEW_STATE_SAVED_PARAM)){
- try {
- ajaxContext.saveViewState(context);
- } catch (IOException e) {
- throw new FacesException(e);
- }
- }
- }
-// ajaxContext.processHeadResources(context);
- } else if (phaseId == PhaseId.RESTORE_VIEW) {
-
- UIViewRoot viewRoot = context.getViewRoot();
- if(null != viewRoot){
- boolean isAjax = ajaxContext.isAjaxRequest();
- Map attributes = viewRoot.getAttributes();
- for (Iterator it = attributes.keySet().iterator(); it.hasNext();) {
- Object key = it.next();
- if (key instanceof String) {
- String stringKey = (String) key;
- if(stringKey.startsWith(VIEW_BEAN_PREFIX)){
- requestMap.put(stringKey.substring(VIEW_BEAN_PREFIX.length()), attributes.get(key));
- } else if(isAjax && stringKey.startsWith(AJAX_BEAN_PREFIX)){
- requestMap.put(stringKey.substring(AJAX_BEAN_PREFIX.length()), attributes.get(key));
- }
-
- }
- }
- }
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see javax.faces.event.PhaseListener#beforePhase(javax.faces.event.PhaseEvent)
- */
- public void beforePhase(PhaseEvent event) {
- PhaseId phaseId = event.getPhaseId();
- if(log.isDebugEnabled()){
- log.debug("Process before phase "+phaseId.toString());
- }
- FacesContext context = event.getFacesContext();
- if (phaseId == PhaseId.RENDER_RESPONSE) {
- // Clear ViewId replacement, to avoid incorrect rendering of forms URI.
- AjaxContext.getCurrentInstance(context).setViewIdHolder(null);
-
- UIViewRoot root = context.getViewRoot();
- log.debug(Messages.getMessage(
- Messages.ENTER_BEFORE_RENDER_VIEW_PHASE, root.getViewId(),
- root.getRenderKitId()));
-
- // TODO - create special skin-config.xml configuration.
- String renderKitId = null;
- try {
- renderKitId = SkinFactory.getInstance().getSkin(context)
- .getRenderKitId(context);
- } catch (Exception e) {
- log.error("Exception on get current Skin ", e);
- }
- if (null != renderKitId) {
- log.debug(Messages.getMessage(Messages.SET_RENDER_KIT_ID_INFO,
- renderKitId));
- root.setRenderKitId(renderKitId);
- }
- } else if (phaseId == PhaseId.RESTORE_VIEW) {
-
- }
- }
- /*
- * (non-Javadoc)
- *
- * @see javax.faces.event.PhaseListener#getPhaseId()
- */
- public PhaseId getPhaseId() {
- return PhaseId.ANY_PHASE;
- }
-
- protected boolean isValueReference(String value) {
- if (value == null)
- throw new NullPointerException("value");
-
- int start = value.indexOf("#{");
- if (start < 0)
- return false;
-
- int end = value.lastIndexOf('}');
- return (end >= 0 && start < end);
- }
-
-}
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java 2007-07-25 23:28:32 UTC (rev 1857)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java 2007-07-25 23:39:43 UTC (rev 1858)
@@ -93,8 +93,6 @@
private static final Class OBJECT_ARRAY_CLASS = (new Object[0]).getClass();
- public static final String SEQUENCE_PARAM = "jsf_sequence";
-
private static final String VALUE_ATTR = "value";
public static final String AJAX_AREAS_RENDERED = "org.ajax4jsf.areas.rendered";
@@ -664,22 +662,6 @@
}
/**
- * For Myfaces, get current viev sequence.
- *
- * @param facescontext
- * @return
- */
- private static Integer getViewSequence(FacesContext facescontext) {
- Map map = facescontext.getExternalContext().getRequestMap();
- Integer sequence = (Integer) map.get(SEQUENCE_PARAM);
- if (sequence == null) {
- sequence = new Integer(1);
- map.put(SEQUENCE_PARAM, sequence);
- }
- return sequence;
- }
-
- /**
* Encode rendered areas as special HTML tag ( span in current release )
*
* @param context
@@ -800,18 +782,6 @@
* @throws IOException
*/
public static void writeState(FacesContext context) throws IOException {
- if (!context.getApplication().getStateManager().isSavingStateInClient(
- context)) {
- ResponseWriter writer = context.getResponseWriter();
- // MyFaces-specific view sequence attribute
- writer.startElement(HTML.INPUT_ELEM, null);
- writer.writeAttribute(HTML.TYPE_ATTR, HTML.INPUT_TYPE_HIDDEN, null);
- writer.writeAttribute(HTML.NAME_ATTRIBUTE,
- AjaxRendererUtils.SEQUENCE_PARAM, null);
- writer.writeAttribute(HTML.value_ATTRIBUTE, AjaxRendererUtils
- .getViewSequence(context), null);
- writer.endElement(HTML.INPUT_ELEM);
- }
context.getApplication().getViewHandler().writeState(context);
}
Copied: trunk/framework/impl/src/main/java/org/richfaces/VersionBean.java (from rev 1848, trunk/framework/impl/src/main/java/org/richfaces/skin/VersionBean.java)
===================================================================
--- trunk/framework/impl/src/main/java/org/richfaces/VersionBean.java (rev 0)
+++ trunk/framework/impl/src/main/java/org/richfaces/VersionBean.java 2007-07-25 23:39:43 UTC (rev 1858)
@@ -0,0 +1,93 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - 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.richfaces;
+
+/**
+ * Vendor and version information for A4J project
+ * @author asmirnov(a)exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:59:40 $
+ *
+ */
+public class VersionBean {
+ public static final String VENDOR = "ajax4jsf.dev.java.net";
+ public static final int MAJOR_VERSION = 1;
+ public static final int MINOR_VERSION = 0;
+ public static final String PROJECT_NAME = "Ajax4Jsf";
+
+ /**
+ * Revision version, must be auto modified by CVS
+ */
+
+ public static final String REVISION = ".5 , CVS $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:59:40 $";//$Revision: 1.1.2.1 $ $Date: 2007/01/09 18:59:40 $";
+ public static final Version _version = new Version();
+
+ public String getVendor() {
+ return VENDOR;
+ }
+
+ public Object getVersion() {
+ return _version;
+ }
+
+ public String getProjectName() {
+ return PROJECT_NAME;
+ }
+
+ /**
+ * Class for incapsulate version info.
+ * @author asmirnov(a)exadel.com (latest modification by $Author: alexsmirnov $)
+ * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:59:40 $
+ *
+ */
+ private static class Version {
+
+ public static final String _versionInfo = "v."+MAJOR_VERSION+"."+MINOR_VERSION+"."+REVISION;
+
+ public int getMajor() {
+ return MAJOR_VERSION;
+ }
+
+ public int getMinor() {
+ return MINOR_VERSION;
+ }
+
+ public String getRevision() {
+ return REVISION;
+ }
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ return _versionInfo;
+ }
+
+ }
+
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ // TODO Auto-generated method stub
+ return getProjectName() + " by "+getVendor()+", version "+getVersion().toString();
+ }
+}
Modified: trunk/framework/impl/src/main/java/org/richfaces/skin/SkinVariableResolver.java
===================================================================
--- trunk/framework/impl/src/main/java/org/richfaces/skin/SkinVariableResolver.java 2007-07-25 23:28:32 UTC (rev 1857)
+++ trunk/framework/impl/src/main/java/org/richfaces/skin/SkinVariableResolver.java 2007-07-25 23:39:43 UTC (rev 1858)
@@ -25,6 +25,7 @@
import javax.faces.el.EvaluationException;
import javax.faces.el.VariableResolver;
+import org.richfaces.VersionBean;
import org.richfaces.skin.SkinFactory;
/**
Deleted: trunk/framework/impl/src/main/java/org/richfaces/skin/VersionBean.java
===================================================================
--- trunk/framework/impl/src/main/java/org/richfaces/skin/VersionBean.java 2007-07-25 23:28:32 UTC (rev 1857)
+++ trunk/framework/impl/src/main/java/org/richfaces/skin/VersionBean.java 2007-07-25 23:39:43 UTC (rev 1858)
@@ -1,93 +0,0 @@
-/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - 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.richfaces.skin;
-
-/**
- * Vendor and version information for A4J project
- * @author asmirnov(a)exadel.com (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:59:40 $
- *
- */
-public class VersionBean {
- public static final String VENDOR = "ajax4jsf.dev.java.net";
- public static final int MAJOR_VERSION = 1;
- public static final int MINOR_VERSION = 0;
- public static final String PROJECT_NAME = "Ajax4Jsf";
-
- /**
- * Revision version, must be auto modified by CVS
- */
-
- public static final String REVISION = ".5 , CVS $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:59:40 $";//$Revision: 1.1.2.1 $ $Date: 2007/01/09 18:59:40 $";
- public static final Version _version = new Version();
-
- public String getVendor() {
- return VENDOR;
- }
-
- public Object getVersion() {
- return _version;
- }
-
- public String getProjectName() {
- return PROJECT_NAME;
- }
-
- /**
- * Class for incapsulate version info.
- * @author asmirnov(a)exadel.com (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:59:40 $
- *
- */
- private static class Version {
-
- public static final String _versionInfo = "v."+MAJOR_VERSION+"."+MINOR_VERSION+"."+REVISION;
-
- public int getMajor() {
- return MAJOR_VERSION;
- }
-
- public int getMinor() {
- return MINOR_VERSION;
- }
-
- public String getRevision() {
- return REVISION;
- }
-/* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- public String toString() {
- return _versionInfo;
- }
-
- }
-
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- public String toString() {
- // TODO Auto-generated method stub
- return getProjectName() + " by "+getVendor()+", version "+getVersion().toString();
- }
-}
Modified: trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
===================================================================
--- trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2007-07-25 23:28:32 UTC (rev 1857)
+++ trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2007-07-25 23:39:43 UTC (rev 1858)
@@ -724,7 +724,7 @@
LOG.warn("No information in response about elements to replace");
}
// Replace client-side hidden inputs for JSF View state.
- var idsSpan = req.getElementById("ajax-update-ids");
+ var idsSpan = req.getElementById("ajax-view-state");
LOG.debug("Hidden JSF state fields: "+idsSpan);
if(idsSpan != null){
// For a portal case, replace content in the current window only.
Modified: trunk/framework/impl/src/main/resources/META-INF/faces-config.xml
===================================================================
--- trunk/framework/impl/src/main/resources/META-INF/faces-config.xml 2007-07-25 23:28:32 UTC (rev 1857)
+++ trunk/framework/impl/src/main/resources/META-INF/faces-config.xml 2007-07-25 23:39:43 UTC (rev 1858)
@@ -18,12 +18,12 @@
<state-manager>org.ajax4jsf.application.AjaxStateManager</state-manager>
</application>
<lifecycle>
- <phase-listener>org.ajax4jsf.renderkit.AjaxPhaseListener</phase-listener>
+ <phase-listener>org.ajax4jsf.event.AjaxPhaseListener</phase-listener>
<phase-listener>org.ajax4jsf.event.InitPhaseListener</phase-listener>
</lifecycle>
<managed-bean>
<managed-bean-name>a4j</managed-bean-name>
- <managed-bean-class>org.richfaces.skin.VersionBean</managed-bean-class>
+ <managed-bean-class>org.richfaces.VersionBean</managed-bean-class>
<managed-bean-scope>application</managed-bean-scope>
</managed-bean>
<managed-bean>
Modified: trunk/framework/pom.xml
===================================================================
--- trunk/framework/pom.xml 2007-07-25 23:28:32 UTC (rev 1857)
+++ trunk/framework/pom.xml 2007-07-25 23:39:43 UTC (rev 1858)
@@ -8,6 +8,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces</groupId>
<artifactId>framework</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Java Server Faces AJAX framework</name>
<dependencies />
Modified: trunk/framework/test/src/main/java/org/ajax4jsf/tests/AbstractAjax4JsfTestCase.java
===================================================================
--- trunk/framework/test/src/main/java/org/ajax4jsf/tests/AbstractAjax4JsfTestCase.java 2007-07-25 23:28:32 UTC (rev 1857)
+++ trunk/framework/test/src/main/java/org/ajax4jsf/tests/AbstractAjax4JsfTestCase.java 2007-07-25 23:39:43 UTC (rev 1858)
@@ -56,9 +56,9 @@
import org.apache.shale.test.mock.MockPrintWriter;
import org.apache.shale.test.mock.MockResponseWriter;
import org.apache.shale.test.mock.MockServletOutputStream;
+import org.richfaces.VersionBean;
import org.richfaces.skin.SkinBean;
import org.richfaces.skin.SkinFactory;
-import org.richfaces.skin.VersionBean;
import com.gargoylesoftware.htmlunit.MockWebConnection;
import com.gargoylesoftware.htmlunit.Page;
Modified: trunk/framework/test/src/test/java/org/ajax4jsf/framework/renderer/BeforeRendererListenerTestCase.java
===================================================================
--- trunk/framework/test/src/test/java/org/ajax4jsf/framework/renderer/BeforeRendererListenerTestCase.java 2007-07-25 23:28:32 UTC (rev 1857)
+++ trunk/framework/test/src/test/java/org/ajax4jsf/framework/renderer/BeforeRendererListenerTestCase.java 2007-07-25 23:39:43 UTC (rev 1858)
@@ -26,7 +26,7 @@
import javax.faces.event.PhaseListener;
import org.ajax4jsf.context.AjaxContext;
-import org.ajax4jsf.renderkit.AjaxPhaseListener;
+import org.ajax4jsf.event.AjaxPhaseListener;
import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
import org.ajax4jsf.webapp.BaseFilter;
import org.ajax4jsf.webapp.FilterServletResponseWrapper;
Modified: trunk/samples/ajaxPortlet/pom.xml
===================================================================
--- trunk/samples/ajaxPortlet/pom.xml 2007-07-25 23:28:32 UTC (rev 1857)
+++ trunk/samples/ajaxPortlet/pom.xml 2007-07-25 23:39:43 UTC (rev 1858)
@@ -2,11 +2,16 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>samples</artifactId>
+ <groupId>org.richfaces</groupId>
+ <version>3.1.0-SNAPSHOT</version>
+ </parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces</groupId>
<artifactId>portalAjaxSample</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
<packaging>war</packaging>
- <version>0.0.1</version>
<description>Ajax JSF sample portlet</description>
<build>
<defaultGoal>package</defaultGoal>
Modified: trunk/samples/useCases/pom.xml
===================================================================
--- trunk/samples/useCases/pom.xml 2007-07-25 23:28:32 UTC (rev 1857)
+++ trunk/samples/useCases/pom.xml 2007-07-25 23:39:43 UTC (rev 1858)
@@ -10,6 +10,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>useCases</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>useCases Maven Webapp</name>
<build>
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/KeepAliveHandler.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/KeepAliveHandler.java 2007-07-25 23:28:32 UTC (rev 1857)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/facelets/KeepAliveHandler.java 2007-07-25 23:39:43 UTC (rev 1858)
@@ -30,7 +30,7 @@
import javax.faces.el.ValueBinding;
import org.ajax4jsf.Messages;
-import org.ajax4jsf.renderkit.AjaxPhaseListener;
+import org.ajax4jsf.event.AjaxPhaseListener;
import com.sun.facelets.FaceletContext;
import com.sun.facelets.FaceletException;
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/jsp/KeepAliveTag.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/jsp/KeepAliveTag.java 2007-07-25 23:28:32 UTC (rev 1857)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/taglib/html/jsp/KeepAliveTag.java 2007-07-25 23:39:43 UTC (rev 1858)
@@ -29,7 +29,7 @@
import javax.servlet.jsp.tagext.TagSupport;
import org.ajax4jsf.Messages;
-import org.ajax4jsf.renderkit.AjaxPhaseListener;
+import org.ajax4jsf.event.AjaxPhaseListener;
/**
* @author shura
17 years, 5 months