JBoss Rich Faces SVN: r12835 - trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-03-05 05:43:53 -0500 (Thu, 05 Mar 2009)
New Revision: 12835
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java
Log:
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java 2009-03-05 10:20:09 UTC (rev 12834)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java 2009-03-05 10:43:53 UTC (rev 12835)
@@ -323,4 +323,21 @@
this.informAboutNews = informAboutNews;
}
+ public List<Album> getAllAlbums(){
+ List<Album> albums = new ArrayList<Album>();
+ for(Shelf s:getShelfs()){
+ albums.addAll(s.getChildAlbums());
+ }
+ return albums;
+ }
+
+ public List<Image> getAllImages(){
+ List<Image> images = new ArrayList<Image>();
+ for(Shelf s:getShelfs()){
+ for(Album a:s.getChildAlbums()){
+ images.addAll(a.getImages());
+ }
+ }
+ return images;
+ }
}
\ No newline at end of file
15 years, 10 months
JBoss Rich Faces SVN: r12834 - trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-03-05 05:20:09 -0500 (Thu, 05 Mar 2009)
New Revision: 12834
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ToggleControlTest.java
Log:
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ToggleControlTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ToggleControlTest.java 2009-03-05 10:19:33 UTC (rev 12833)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ToggleControlTest.java 2009-03-05 10:20:09 UTC (rev 12834)
@@ -34,10 +34,19 @@
private static final String RESET_METHOD = "#{panelBean.cleanValues}";
+ private static Map<String, String> params = new HashMap<String, String>();
+
+ static {
+ params.put("parameter1", "value1");
+ params.put("parameter2", "value2");
+ params.put("parameter3", "value3");
+ }
+
@Test
public void testRendered(Template template) {
AutoTester autoTester = getAutoTester(this);
autoTester.renderPage(template, RESET_METHOD);
+ writeStatus("Test component render attribute");
autoTester.testRendered();
}
@@ -58,6 +67,7 @@
styleAttributes.put("background-color", "blue");
styleAttributes.put("color", "yellow");
autoTester.testStyleAndClasses(new String[]{"className"}, styleAttributes);
+ writeStatus("Test component html events");
autoTester.testHTMLEvents();
}
@@ -65,6 +75,7 @@
public void testImmediate(Template template) {
AutoTester autoTester = getAutoTester(this);
autoTester.renderPage(template, RESET_METHOD);
+ writeStatus("Test component immediate attribute");
autoTester.testImmediate(false);
}
@@ -81,6 +92,7 @@
public void testAjaxSingle(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, RESET_METHOD);
+ writeStatus("Test ajaxSingle attribute");
tester.testAjaxSingle();
}
@@ -89,6 +101,7 @@
public void testAjaxSingleWithProcessExternalValidation(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, RESET_METHOD);
+ writeStatus("Test ajaxSingle attribute with external validation failed");
tester.testAjaxSingleWithProcesExternalValidation(true);
}
@@ -116,6 +129,22 @@
tester.testLimitToList();
}
+ @Test
+ public void testNestedParams(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, RESET_METHOD);
+ writeStatus("Test component encodes nested f:param tags and their values are present as request parameters");
+ tester.testRequestParameters(params);
+ }
+
+ @Test
+ public void testNestedActionListener(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, RESET_METHOD);
+ writeStatus("Test nested listener");
+ tester.testNestedActionListener();
+ }
+
@Override
public void sendAjax() {
clickAjaxCommandAndWait(getAutoTester(this).getClientId(AutoTester.COMPONENT_ID));
15 years, 10 months
JBoss Rich Faces SVN: r12833 - trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/toggleControl.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-03-05 05:19:33 -0500 (Thu, 05 Mar 2009)
New Revision: 12833
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/toggleControl/toggleControlAutoTest.xhtml
Log:
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/toggleControl/toggleControlAutoTest.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/toggleControl/toggleControlAutoTest.xhtml 2009-03-05 01:38:23 UTC (rev 12832)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/toggleControl/toggleControlAutoTest.xhtml 2009-03-05 10:19:33 UTC (rev 12833)
@@ -50,6 +50,10 @@
onmouseover="EventQueue.fire('onmouseover')"
onmouseup="EventQueue.fire('onmouseup')"
>
+ <f:param name="parameter1" value="value1" />
+ <f:param name="parameter2" value="value2" />
+ <f:param name="parameter3" value="value3" />
+ <f:actionListener type="org.ajax4jsf.autotest.bean.AutoTestListener" />
<h:outputText value="Ajax next" />
<h:panelGroup id="content">
15 years, 10 months
JBoss Rich Faces SVN: r12832 - in trunk/sandbox: samples/layout-sample/src/main/webapp/pages and 12 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2009-03-04 20:38:23 -0500 (Wed, 04 Mar 2009)
New Revision: 12832
Added:
trunk/sandbox/ui/layout/src/main/config/faces/
trunk/sandbox/ui/layout/src/main/config/faces/faces-config.xml
trunk/sandbox/ui/layout/src/main/resources/META-INF/
trunk/sandbox/ui/layout/src/main/resources/META-INF/themes/
trunk/sandbox/ui/layout/src/main/resources/META-INF/themes/csszend.theme.properties
trunk/sandbox/ui/layout/src/main/resources/META-INF/themes/simple.theme.properties
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/fonts.css
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/page.css
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/reset.css
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/simple.css
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/simple.xcss
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/zengarden.css
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/images/
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/images/background.png
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/images/background_bottom.gif
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/images/background_content.gif
trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/images/background_top.gif
trunk/sandbox/ui/layout/src/main/templates/org/richfaces/cssZendPage.jspx
Modified:
trunk/sandbox/samples/layout-sample/src/main/java/org/richfaces/samples/Bean.java
trunk/sandbox/samples/layout-sample/src/main/webapp/pages/index.xhtml
trunk/sandbox/ui/layout/src/main/config/component/page.xml
trunk/sandbox/ui/layout/src/main/java/org/richfaces/component/UIPage.java
trunk/sandbox/ui/layout/src/main/java/org/richfaces/renderkit/AbstractPageRenderer.java
trunk/sandbox/ui/layout/src/main/templates/org/richfaces/htmlLayoutPanel.jspx
trunk/sandbox/ui/layout/src/main/templates/org/richfaces/htmlPage.jspx
Log:
Implemented page themes switcing.
Modified: trunk/sandbox/samples/layout-sample/src/main/java/org/richfaces/samples/Bean.java
===================================================================
--- trunk/sandbox/samples/layout-sample/src/main/java/org/richfaces/samples/Bean.java 2009-03-04 18:19:20 UTC (rev 12831)
+++ trunk/sandbox/samples/layout-sample/src/main/java/org/richfaces/samples/Bean.java 2009-03-05 01:38:23 UTC (rev 12832)
@@ -8,5 +8,72 @@
*
*/
public class Bean {
+
+ private String position="left";
+
+ private String theme = null;
+
+ private int width=0;
+
+ private int sidebarWidth=160;
+ /**
+ * @return the position
+ */
+ public String getPosition() {
+ return position;
+ }
+
+ /**
+ * @param position the position to set
+ */
+ public void setPosition(String position) {
+ this.position = position;
+ }
+
+ /**
+ * @return the width
+ */
+ public int getWidth() {
+ return width;
+ }
+
+ /**
+ * @param width the width to set
+ */
+ public void setWidth(int width) {
+ this.width = width;
+ }
+
+ /**
+ * @return the sidebarWidth
+ */
+ public int getSidebarWidth() {
+ return sidebarWidth;
+ }
+
+ /**
+ * @param sidebarWidth the sidebarWidth to set
+ */
+ public void setSidebarWidth(int sidebarWidth) {
+ this.sidebarWidth = sidebarWidth;
+ }
+
+ /**
+ * @return the theme
+ */
+ public String getTheme() {
+ return theme;
+ }
+
+ /**
+ * @param theme the theme to set
+ */
+ public void setTheme(String theme) {
+ if("".equals(theme)){
+ theme = null;
+ }
+ this.theme = theme;
+ }
+
}
Modified: trunk/sandbox/samples/layout-sample/src/main/webapp/pages/index.xhtml
===================================================================
(Binary files differ)
Modified: trunk/sandbox/ui/layout/src/main/config/component/page.xml
===================================================================
--- trunk/sandbox/ui/layout/src/main/config/component/page.xml 2009-03-04 18:19:20 UTC (rev 12831)
+++ trunk/sandbox/ui/layout/src/main/config/component/page.xml 2009-03-05 01:38:23 UTC (rev 12832)
@@ -103,6 +103,7 @@
<classname>int</classname>
<description>
</description>
+ <defaultvalue>160</defaultvalue>
</property>
<property>
<name>sidebarPosition</name>
@@ -145,4 +146,8 @@
</property>
-->
</component>
+ <renderer generate="true" override="true">
+ <name>org.richfaces.CssZendPageRenderer</name>
+ <template>org/richfaces/cssZendPage.jspx</template>
+ </renderer>
</components>
Added: trunk/sandbox/ui/layout/src/main/config/faces/faces-config.xml
===================================================================
--- trunk/sandbox/ui/layout/src/main/config/faces/faces-config.xml (rev 0)
+++ trunk/sandbox/ui/layout/src/main/config/faces/faces-config.xml 2009-03-05 01:38:23 UTC (rev 12832)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
+ version="1.2">
+ <render-kit>
+ <renderer>
+ <component-family>org.richfaces.Page</component-family>
+ <renderer-type>org.richfaces.CssZendPageRenderer</renderer-type>
+ <renderer-class>org.richfaces.renderkit.html.CssZendRenderer</renderer-class>
+ </renderer>
+ </render-kit>
+</faces-config>
\ No newline at end of file
Property changes on: trunk/sandbox/ui/layout/src/main/config/faces/faces-config.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/sandbox/ui/layout/src/main/java/org/richfaces/component/UIPage.java
===================================================================
--- trunk/sandbox/ui/layout/src/main/java/org/richfaces/component/UIPage.java 2009-03-04 18:19:20 UTC (rev 12831)
+++ trunk/sandbox/ui/layout/src/main/java/org/richfaces/component/UIPage.java 2009-03-05 01:38:23 UTC (rev 12832)
@@ -6,6 +6,8 @@
import javax.faces.component.UIPanel;
+import org.richfaces.skin.SkinFactory;
+
/**
* JSF component class
*
@@ -17,5 +19,32 @@
public static final String COMPONENT_FAMILY = "org.richfaces.Page";
+ /**
+ * Get Page theme name
+ * @return
+ */
+ public abstract String getTheme();
+
+ /**
+ * Set Page theme name
+ * @param newvalue
+ */
+ public abstract void setTheme(String newvalue);
+
+
+ @Override
+ public String getRendererType() {
+ String theme = getTheme();
+ String rendererType = null;
+ if(null != theme && theme.length()>0){
+ rendererType = SkinFactory.getInstance().getTheme(getFacesContext(), theme).getRendererType();
+ }
+ if(null == rendererType){
+ rendererType = super.getRendererType();
+ }
+ return rendererType;
+ }
+
+
}
Modified: trunk/sandbox/ui/layout/src/main/java/org/richfaces/renderkit/AbstractPageRenderer.java
===================================================================
--- trunk/sandbox/ui/layout/src/main/java/org/richfaces/renderkit/AbstractPageRenderer.java 2009-03-04 18:19:20 UTC (rev 12831)
+++ trunk/sandbox/ui/layout/src/main/java/org/richfaces/renderkit/AbstractPageRenderer.java 2009-03-05 01:38:23 UTC (rev 12832)
@@ -14,22 +14,25 @@
import org.ajax4jsf.renderkit.AjaxComponentRendererBase;
import org.ajax4jsf.renderkit.HeaderResourcesRendererBase;
+import org.ajax4jsf.renderkit.RendererUtils.HTML;
import org.ajax4jsf.renderkit.html.AjaxPageRenderer;
+import org.richfaces.component.UIPage;
+import org.richfaces.skin.SkinFactory;
+import org.richfaces.skin.Theme;
/**
* @author asmirnov
- *
+ *
*/
public abstract class AbstractPageRenderer extends HeaderResourcesRendererBase {
-
+
public static final String RENDERER_TYPE = "org.richfaces.PageRenderer";
-
- private static final Map<String,String[]> doctypes ;
+ private static final Map<String, String[]> doctypes;
static {
// Fill doctype, content-type and namespace map for different formats.
- doctypes = new HashMap<String,String[]>();
+ doctypes = new HashMap<String, String[]>();
doctypes
.put(
"html-transitional",
@@ -72,10 +75,11 @@
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\n",
"text/html", null });
}
-
- public String prolog(FacesContext context, UIComponent component) throws IOException {
+
+ public String prolog(FacesContext context, UIComponent component)
+ throws IOException {
ResponseWriter out = context.getResponseWriter();
- Map<String,Object> attributes = component.getAttributes();
+ Map<String, Object> attributes = component.getAttributes();
String format = (String) attributes.get("markupType");
String contentType = null;
String namespace = null;
@@ -85,9 +89,10 @@
docType = (String[]) doctypes.get(format);
} else {
contentType = out.getContentType();
- for (Iterator<String[]> iterator = doctypes.values().iterator(); iterator.hasNext();) {
+ for (Iterator<String[]> iterator = doctypes.values().iterator(); iterator
+ .hasNext();) {
String[] types = (String[]) iterator.next();
- if(types[1].equals(contentType)){
+ if (types[1].equals(contentType)) {
docType = types;
break;
}
@@ -107,17 +112,112 @@
}
return namespace;
}
+
+
+ public Theme getTheme(FacesContext context, UIPage page) {
+ Theme theme = null;
+ String themeName = page.getTheme();
+ if(null != themeName && themeName.length()>0){
+ theme = SkinFactory.getInstance().getTheme(context, themeName);
+ }
+ return theme;
+ }
- public void styles(FacesContext context, UIComponent component) {
+ public void themeStyle(FacesContext context, UIPage component) throws IOException{
+ Theme theme = getTheme(context, component);
+ if(null != theme){
+ String style = theme.getStyle();
+ if(null != style){
+ ResponseWriter writer = context.getResponseWriter();
+ writer.startElement(HTML.LINK_ELEMENT, component);
+ writer.writeAttribute(HTML.TYPE_ATTR, "text/css", null);
+ writer.writeAttribute(HTML.REL_ATTR, "stylesheet", null);
+ writer.writeAttribute(HTML.class_ATTRIBUTE, "component", null);
+ style = context.getApplication().getViewHandler().getResourceURL(context, style);
+ style= context.getExternalContext().encodeResourceURL(style);
+ writer.writeAttribute(HTML.HREF_ATTR, style, null);
+ writer.endElement(HTML.LINK_ELEMENT);
+ }
+ }
}
+
+ public void themeScript(FacesContext context, UIPage component) throws IOException{
+ Theme theme = getTheme(context, component);
+ if(null != theme){
+ String script = theme.getScript();
+ if(null != script){
+ ResponseWriter writer = context.getResponseWriter();
+ writer.startElement(HTML.SCRIPT_ELEM, component);
+ writer.writeAttribute(HTML.TYPE_ATTR, "text/javascript", null);
+ script = context.getApplication().getViewHandler().getResourceURL(context, script);
+ script= context.getExternalContext().encodeResourceURL(script);
+ writer.writeAttribute(HTML.src_ATTRIBUTE, script, null);
+ writer.endElement(HTML.SCRIPT_ELEM);
+ }
+ }
+
+ }
+
- public String documentClass(FacesContext context, UIComponent component) {
- //TODO - calculate class.
- return "yui-t3";
+
+ public void pageStyle(FacesContext context, UIComponent component)
+ throws IOException {
+ // Write body class.
+ ResponseWriter writer = context.getResponseWriter();
+ Map<String, Object> attributes = component.getAttributes();
+ writer.startElement("style", component);
+ writer.writeAttribute(HTML.TYPE_ATTR, "text/css", null);
+ // Calculate page width
+ Integer width = (Integer) attributes.get("width");
+ if (null != width && width.intValue() > 0) {
+ float nonIeWidth = (width.floatValue() / 13.0f);
+ float ieWidth = (width.floatValue() / 13.333f);
+ StringBuilder format = new StringBuilder(
+ ".rich-page{margin:auto;text-align:left;");
+ format.append("width:").append(nonIeWidth).append("em;");
+ format.append("*width:").append(ieWidth).append("em;}\n");
+ writer.write(format.toString());
+ } else {
+ writer.write(".rich-page{margin:auto 10px;width:auto;}\n");
+ }
+ // Calculate sidebar width
+ if (component.getFacet("sidebar") != null) {
+ Object sidebarPosition = attributes.get("sidebarPosition");
+ String position;
+ if ("right".equals(sidebarPosition)) {
+ writer
+ .write(".rich-page-main{float:left;margin-right:-25em;}\n");
+ position = "right";
+ } else {
+ writer
+ .write(".rich-page-main{float:right;margin-left:-25em;}\n");
+ position = "left";
+ }
+ Integer sidebarWidth = (Integer) attributes.get("sidebarWidth");
+ if (null != sidebarWidth && sidebarWidth.intValue() > 0) {
+ float nonIeWidth = (sidebarWidth.floatValue() / 13.0f);
+ float ieWidth = (sidebarWidth.floatValue() / 13.333f);
+ StringBuilder format = new StringBuilder(
+ ".rich-page-sidebar{float:");
+ format.append(position).append(";");
+ format.append("width:").append(nonIeWidth).append("em;");
+ format.append("*width:").append(ieWidth).append("em;}\n");
+ format.append(".rich-page-body{margin-");
+ format.append(position).append(":").append(nonIeWidth + 1.0f)
+ .append("em;");
+ ;
+ format.append("*margin").append(position).append(":").append(
+ ieWidth + 1.05f).append("em;}\n");
+ writer.write(format.toString());
+ }
+
+ } // Cleanup
+ writer.write(".rich-page-body{float:none;width:auto;}\n");
+ writer.endElement("style");
}
-
- public boolean hasFacet(UIComponent component, String facet){
+
+ public boolean hasFacet(UIComponent component, String facet) {
return null != component.getFacet(facet);
}
Added: trunk/sandbox/ui/layout/src/main/resources/META-INF/themes/csszend.theme.properties
===================================================================
--- trunk/sandbox/ui/layout/src/main/resources/META-INF/themes/csszend.theme.properties (rev 0)
+++ trunk/sandbox/ui/layout/src/main/resources/META-INF/themes/csszend.theme.properties 2009-03-05 01:38:23 UTC (rev 12832)
@@ -0,0 +1,2 @@
+rendererType=org.richfaces.CssZendPageRenderer
+styleSheet=resource:///org/richfaces/renderkit/html/css/zengarden.css
Property changes on: trunk/sandbox/ui/layout/src/main/resources/META-INF/themes/csszend.theme.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/sandbox/ui/layout/src/main/resources/META-INF/themes/simple.theme.properties
===================================================================
--- trunk/sandbox/ui/layout/src/main/resources/META-INF/themes/simple.theme.properties (rev 0)
+++ trunk/sandbox/ui/layout/src/main/resources/META-INF/themes/simple.theme.properties 2009-03-05 01:38:23 UTC (rev 12832)
@@ -0,0 +1 @@
+styleSheet=resource:///org/richfaces/renderkit/html/css/simple.xcss
Property changes on: trunk/sandbox/ui/layout/src/main/resources/META-INF/themes/simple.theme.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/fonts.css
===================================================================
--- trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/fonts.css (rev 0)
+++ trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/fonts.css 2009-03-05 01:38:23 UTC (rev 12832)
@@ -0,0 +1,28 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.5.2
+*/ /**
+ * Percents could work for IE, but for backCompat purposes, we are using keywords.
+ * x-small is for IE6/7 quirks mode.
+ */
+body {
+ font: 13px/ 1.231 arial, helvetica, clean, sans-serif; *
+ font-size: small; *
+ font: x-small;
+}
+
+table {
+ font-size: inherit;
+ font: 100%;
+}
+
+/**
+ * Bump up IE to get to 13px equivalent
+ */
+pre,code,kbd,samp,tt {
+ font-family: monospace; *
+ font-size: 108%;
+ line-height: 100%;
+}
\ No newline at end of file
Property changes on: trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/fonts.css
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/page.css
===================================================================
--- trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/page.css (rev 0)
+++ trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/page.css 2009-03-05 01:38:23 UTC (rev 12832)
@@ -0,0 +1,57 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.5.2
+*/
+/*
+ Note: Throughout this file, the *property filter is used to
+ give a value to IE that other browsers do not see.
+*/
+
+/*
+ Section: General Rules
+*/
+
+ body {
+ text-align:center;
+ }
+
+ .rich-page-footer {
+ clear:both;
+ }
+
+/*
+ Section: Page Width Rules (#doc, #doc2, #doc3, #doc4)
+*/
+
+ /*
+ Subsection: General
+ */
+
+ .rich-page {
+ margin:auto;
+ text-align:left;
+ min-width:750px;
+ }
+
+/*
+ Section: Preset Template Rules (.yui-t[1-6])
+*/
+
+ /*
+ Subsection: General
+ */
+
+ /* to preserve source-order independence for Gecko */
+ .rich-page-sidebar{position:relative;}
+ .rich-page-sidebar,.rich-page-body{_position:static;}
+ .rich-page-body{position:static;}
+
+ .rich-page-main {width:100%;}
+/*
+ Section: Clearing
+*/
+
+.rich-page-content:after {content:".";display:block;height:0;clear:both;visibility:hidden;}
+.rich-page-content {zoom:1;}
Property changes on: trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/page.css
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/reset.css
===================================================================
--- trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/reset.css (rev 0)
+++ trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/reset.css 2009-03-05 01:38:23 UTC (rev 12832)
@@ -0,0 +1,77 @@
+/*
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.5.2
+*/
+html {
+ color: #000;
+ background: #FFF;
+}
+
+body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td
+ {
+ margin: 0;
+ padding: 0;
+}
+
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+fieldset,img {
+ border: 0;
+}
+
+address,caption,cite,code,dfn,em,strong,th,var {
+ font-style: normal;
+ font-weight: normal;
+}
+
+li {
+ list-style: none;
+}
+
+caption,th {
+ text-align: left;
+}
+
+h1,h2,h3,h4,h5,h6 {
+ font-size: 100%;
+ font-weight: normal;
+}
+
+q:before,q:after {
+ content: '';
+}
+
+abbr,acronym {
+ border: 0;
+ font-variant: normal;
+}
+
+/* to preserve line-height and selector appearance */
+sup {
+ vertical-align: text-top;
+}
+
+sub {
+ vertical-align: text-bottom;
+}
+
+input,textarea,select {
+ font-family: inherit;
+ font-size: inherit;
+ font-weight: inherit;
+}
+
+/*to enable resizing for IE*/
+input,textarea,select { *
+ font-size: 100%;
+}
+
+/*because legend doesn't inherit in IE */
+legend {
+ color: #000;
+}
\ No newline at end of file
Property changes on: trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/reset.css
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/simple.css
===================================================================
--- trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/simple.css (rev 0)
+++ trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/simple.css 2009-03-05 01:38:23 UTC (rev 12832)
@@ -0,0 +1,117 @@
+body {
+ background: #CACACA url(../images/background.png) repeat-x;
+ font-family: "Trebuchet MS", Verdana, serif
+}
+#container {
+ margin: 0 auto;
+ width: 750px
+}
+#header {
+ width: 100%
+}
+#sub_header {
+ text-align: right;
+ font-weight: bold;
+ font-size: 20px;
+ color: #FFFFFF;
+ padding-right: 20px;
+ padding-bottom: 20px;
+}
+#main_content {
+ margin: 0 auto;
+ width: 100%;
+ background: #FFFFFF url('../images/background_content.gif');
+ background-repeat: repeat-y
+}
+#main_content_top {
+ height: 30px;
+ background: #FFFFFF url('../images/background_top.gif');
+}
+#main_content_bottom {
+ height: 30px;
+ background: #FFFFFF url('../images/background_bottom.gif');
+}
+#footer {
+ text-align: center;
+ font-size: 12px;
+ margin: 10px auto
+}
+.content {
+ float: left;
+ width: 510px;
+ text-align: justify;
+ padding: 0 30px 0 30px;
+ font-size: 12px
+}
+.menu {
+ width: 139px;
+ float: right;
+ padding: 0 20px 0 20px;
+ border-left: #8C8484 1px solid;
+ font-size: 12px
+}
+.menu ul {
+ margin: 0;
+ padding: 10px 0 10px 15px
+}
+.menu il {
+ list-style-type: disc
+}
+#header h1 {
+ margin-bottom: 0px;
+ font-size: 28px;
+ font-weight: bold;
+ color: #A40008
+}
+.content h2 {
+ margin-top: 0px;
+ font-size: 18px;
+ font-weight: bold;
+ color: #A40008
+}
+#clear {
+ display: block;
+ clear: both;
+ width: 100%;
+ height:1px;
+ overflow:hidden;
+}
+.menu_title {
+ font-size: 18px;
+ font-weight: bold;
+ color: #A40008
+}
+.menu ul {
+ margin: 0;
+ padding: 10px 0 20px 15px
+}
+.menu li {
+ padding-top: 2px;
+ list-style-type: circle
+}
+a {
+ color: #A40008;
+ font-weight: bold;
+ text-decoration: none
+}
+a:hover {
+ color: #A40008;
+ font-weight: bold;
+ text-decoration: underline
+}
+a.menu_link {
+ color: #000000;
+ font-weight: bold;
+ text-decoration: underline
+}
+a.menu_link:hover {
+ color: #A40008;
+ font-weight: bold;
+ text-decoration: none
+}
+.quote {
+ margin: 20px;
+ text-align: center;
+ font-weight: bold;
+ font-style: italic
+}
\ No newline at end of file
Property changes on: trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/simple.css
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/simple.xcss
===================================================================
--- trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/simple.xcss (rev 0)
+++ trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/simple.xcss 2009-03-05 01:38:23 UTC (rev 12832)
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<f:template xmlns:f='http:/jsf.exadel.com/template'
+ xmlns:u='http:/jsf.exadel.com/template/util'
+ xmlns="http://www.w3.org/1999/xhtml">
+
+ <u:selector name="body">
+ <u:style name="background-image">
+ <f:resource f:key="/org/richfaces/renderkit/html/images/background.png"/>
+ </u:style>
+ <u:style name="background-color" value="#CACACA"/>
+ <u:style name="background-repeat" value="repeat-x"/>
+ <u:style name="font-family" skin="generalFamilyFont" />
+ </u:selector>
+
+ <u:selector name=".rich-page">
+ <u:style name="font-size" skin="generalSizeFont" />
+ </u:selector>
+
+ <f:verbatim>
+ <![CDATA[
+ ]]>
+ </f:verbatim>
+
+ <u:selector name=".rich-page-header">
+ <u:style name="color" value="#FFFFFF" />
+ <u:style name="font-weight" value="bold" />
+ <u:style name="font-size" value="153.9%" />
+ </u:selector>
+
+ <u:selector name=".rich-page-content">
+ <u:style name="background-image">
+ <f:resource f:key="/org/richfaces/renderkit/html/images/background_content.gif"/>
+ </u:style>
+ <u:style name="background-color" value="#CACACA"/>
+ <u:style name="background-repeat" value="repeat-x"/>
+ </u:selector>
+
+ <u:selector name=".rich-page-main">
+ </u:selector>
+
+ <u:selector name=".rich-page-body">
+ <u:style name="padding" value="0 30px 0 30px" />
+ </u:selector>
+
+ <u:selector name=".rich-page-footer">
+ <u:style name="text-align" value="center" />
+ </u:selector>
+
+ <u:selector name=".rich-page-sidebar">
+ <u:style name="padding" value="0 20px 0 20px" />
+ <u:style name="border-left" value="#8C8484 1px solid" />
+ </u:selector>
+
+ <u:selector name="a:hover">
+ <u:style name="color" skin="hoverLinkColor" />
+ </u:selector>
+
+ <u:selector name="a:visited">
+ <u:style name="color" skin="visitedLinkColor" />
+ </u:selector>
+</f:template>
\ No newline at end of file
Added: trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/zengarden.css
===================================================================
--- trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/zengarden.css (rev 0)
+++ trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/zengarden.css 2009-03-05 01:38:23 UTC (rev 12832)
@@ -0,0 +1,199 @@
+/* css Zen Garden default style v1.02 */
+/* css released under Creative Commons License - http://creativecommons.org/licenses/by-nc-sa/1.0/ */
+
+/* This file based on 'Tranquille' by Dave Shea */
+/* You may use this file as a foundation for any new work, but you may find it easier to start from scratch. */
+/* Not all elements are defined in this file, so you'll most likely want to refer to the xhtml as well. */
+
+/* Your images should be linked as if the CSS file sits in the same folder as the images. ie. no paths. */
+
+
+/* basic elements */
+html {
+ margin: 0;
+ padding: 0;
+ }
+body {
+ font: 75% georgia, sans-serif;
+ line-height: 1.88889;
+ color: #555753;
+ background: #fff url(blossoms.jpg) no-repeat bottom right;
+ margin: 0;
+ padding: 0;
+ }
+p {
+ margin-top: 0;
+ text-align: justify;
+ }
+h3 {
+ font: italic normal 1.4em georgia, sans-serif;
+ letter-spacing: 1px;
+ margin-bottom: 0;
+ color: #7D775C;
+ }
+a:link {
+ font-weight: bold;
+ text-decoration: none;
+ color: #B7A5DF;
+ }
+a:visited {
+ font-weight: bold;
+ text-decoration: none;
+ color: #D4CDDC;
+ }
+a:hover, a:active {
+ text-decoration: underline;
+ color: #9685BA;
+ }
+acronym {
+ border-bottom: none;
+ }
+
+
+/* specific divs */
+#container {
+ background: url(zen-bg.jpg) no-repeat top left;
+ padding: 0 175px 0 110px;
+ margin: 0;
+ position: relative;
+ }
+
+#intro {
+ min-width: 470px;
+ }
+
+/* using an image to replace text in an h1. This trick courtesy Douglas Bowman, http://www.stopdesign.com/articles/css/replace-text/ */
+#pageHeader h1 {
+ background: transparent url(h1.gif) no-repeat top left;
+ margin-top: 10px;
+ width: 219px;
+ height: 87px;
+ float: left;
+ }
+#pageHeader h1 span {
+ display:none
+ }
+#pageHeader h2 {
+ background: transparent url(h2.gif) no-repeat top left;
+ margin-top: 58px;
+ margin-bottom: 40px;
+ width: 200px;
+ height: 18px;
+ float: right;
+ }
+#pageHeader h2 span {
+ display:none
+ }
+#pageHeader {
+ padding-top: 20px;
+}
+
+#quickSummary {
+ clear:both;
+ margin: 20px 20px 20px 10px;
+ width: 160px;
+ float: left;
+ }
+#quickSummary p {
+ font: italic 10pt/22pt georgia;
+ text-align:center;
+ }
+
+#preamble {
+ clear: right;
+ padding: 0px 10px 0 10px;
+ }
+#supportingText {
+ padding-left: 10px;
+ margin-bottom: 40px;
+ }
+
+#footer {
+ text-align: center;
+ }
+#footer a:link, #footer a:visited {
+ margin-right: 20px;
+ }
+
+#linkList {
+ margin-left: 600px;
+ position: absolute;
+ top: 0;
+ right: 0;
+ }
+#linkList2 {
+ font: 10px verdana, sans-serif;
+ background: transparent url(paper-bg.jpg) top left repeat-y;
+ padding: 10px;
+ margin-top: 150px;
+ width: 130px;
+ }
+#linkList h3.select {
+ background: transparent url(h3.gif) no-repeat top left;
+ margin: 10px 0 5px 0;
+ width: 97px;
+ height: 16px;
+ }
+#linkList h3.select span {
+ display:none
+ }
+#linkList h3.favorites {
+ background: transparent url(h4.gif) no-repeat top left;
+ margin: 25px 0 5px 0;
+ width: 60px;
+ height: 18px;
+ }
+#linkList h3.favorites span {
+ display:none
+ }
+#linkList h3.archives {
+ background: transparent url(h5.gif) no-repeat top left;
+ margin: 25px 0 5px 0;
+ width:57px;
+ height: 14px;
+ }
+#linkList h3.archives span {
+ display:none
+ }
+#linkList h3.resources {
+ background: transparent url(h6.gif) no-repeat top left;
+ margin: 25px 0 5px 0;
+ width:63px;
+ height: 10px;
+ }
+#linkList h3.resources span {
+ display:none
+ }
+
+
+#linkList ul {
+ margin: 0;
+ padding: 0;
+ }
+#linkList li {
+ line-height: 2.5ex;
+ background: transparent url(cr1.gif) no-repeat top center;
+ display: block;
+ padding-top: 5px;
+ margin-bottom: 5px;
+ list-style-type: none;
+ }
+#linkList li a:link {
+ color: #988F5E;
+ }
+#linkList li a:visited {
+ color: #B3AE94;
+ }
+
+
+#extraDiv1 {
+ background: transparent url(cr2.gif) top left no-repeat;
+ position: absolute;
+ top: 40px;
+ right: 0;
+ width: 148px;
+ height: 110px;
+ }
+.accesskey {
+ text-decoration: underline;
+ }
\ No newline at end of file
Property changes on: trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/zengarden.css
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/images/background.png
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/images/background.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/images/background_bottom.gif
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/images/background_bottom.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/images/background_content.gif
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/images/background_content.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/images/background_top.gif
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox/ui/layout/src/main/resources/org/richfaces/renderkit/html/images/background_top.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox/ui/layout/src/main/templates/org/richfaces/cssZendPage.jspx
===================================================================
--- trunk/sandbox/ui/layout/src/main/templates/org/richfaces/cssZendPage.jspx (rev 0)
+++ trunk/sandbox/ui/layout/src/main/templates/org/richfaces/cssZendPage.jspx 2009-03-05 01:38:23 UTC (rev 12832)
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:root
+ xmlns:f="http://ajax4jsf.org/cdk/template"
+ xmlns:c=" http://java.sun.com/jsf/core"
+ xmlns:ui=" http://ajax4jsf.org/cdk/ui"
+ xmlns:u=" http://ajax4jsf.org/cdk/u"
+ xmlns:x=" http://ajax4jsf.org/cdk/x"
+ xmlns:h="http://jsf.exadel.com/header"
+ xmlns:vcp="http://ajax4jsf.org/cdk/vcp"
+ class="org.richfaces.renderkit.html.CssZendRenderer"
+ baseclass="org.richfaces.renderkit.AbstractPageRenderer"
+ component="org.richfaces.component.UIPage"
+ >
+ <c:set var="namespace" value="#{this:prolog(context,component)}"/>
+ <html x:xmlns="#{namespace}" x:lang="#{context.viewRoot.locale}"
+ >
+ <head>
+ <title>#{component.attributes['pageTitle']}</title>
+ <f:call name="themeStyle"/>
+ <f:call name="themeScript"/>
+ <u:insertFacet name="pageHeader"/>
+ </head>
+ <body id="css-zen-garden" x:passThruWithExclusions="value,name,type,id">
+ <div id="container" class="rich-page #{component.attributes['pageClass']}"
+ x:style="#{component.attributes['pageStyle']}">
+ <div id="intro">
+ <c:if test="#{this:hasFacet(component,'header')}">
+ <div id="pageHeader" class="rich-page-header #{component.attributes['headerClass']}">
+ <u:insertFacet name="header"/>
+ </div>
+ </c:if>
+ <c:if test="#{this:hasFacet(component,'summary')}">
+ <div id="quickSummary" class="rich-page-summary #{component.attributes['summaryClass']}">
+ <u:insertFacet name="summary"/>
+ </div>
+ </c:if>
+ <c:if test="#{this:hasFacet(component,'preamble')}">
+ <div id="preamble" class="rich-page-preamble #{component.attributes['preambleClass']}">
+ <u:insertFacet name="preamble"/>
+ </div>
+ </c:if>
+ </div>
+ <div id="supportingText" class="rich-page-content #{component.attributes['contentClass']}">
+ <vcp:body>
+ <div class="rich-page-body #{component.attributes['bodyClass']}">
+ <f:call name="renderChildren" />
+ </div>
+ </vcp:body>
+ <c:if test="#{this:hasFacet(component,'footer')}">
+ <div id="footer" class="rich-page-footer #{component.attributes['footerClass']}">
+ <u:insertFacet name="footer"/>
+ </div>
+ </c:if>
+ </div>
+ <c:if test="#{this:hasFacet(component,'sidebar')}">
+ <div id="linkList" class="rich-page-sidebar #{component.attributes['styleClass']}">
+ <div id="linkList2">
+ <u:insertFacet name="sidebar"/>
+ </div>
+ </div>
+ </c:if>
+ </div>
+ <!-- These extra divs/spans may be used as catch-alls to add extra imagery. -->
+<div id="extraDiv1">
+<span/>
+</div>
+<div id="extraDiv2">
+</div>
+<div id="extraDiv3">
+</div>
+<div id="extraDiv4">
+</div>
+<div id="extraDiv5">
+</div>
+<div id="extraDiv6">
+</div>
+ </body>
+ </html>
+</f:root>
\ No newline at end of file
Property changes on: trunk/sandbox/ui/layout/src/main/templates/org/richfaces/cssZendPage.jspx
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/sandbox/ui/layout/src/main/templates/org/richfaces/htmlLayoutPanel.jspx
===================================================================
--- trunk/sandbox/ui/layout/src/main/templates/org/richfaces/htmlLayoutPanel.jspx 2009-03-04 18:19:20 UTC (rev 12831)
+++ trunk/sandbox/ui/layout/src/main/templates/org/richfaces/htmlLayoutPanel.jspx 2009-03-05 01:38:23 UTC (rev 12832)
@@ -12,7 +12,7 @@
component="org.richfaces.component.UILayoutPanel"
>
<f:clientid var="clientId"/>
- <h:styles>/org/richfaces/ui/renderkit/html/css/grids.css</h:styles>
+ <h:styles>css/grids.css</h:styles>
<c:set var="styleClass" value="#{component.attributes['styleClass']}"/>
<c:set var="yuiClass" value="#{component.attributes['type']}"/>
<div id="#{clientId}" class="#{styleClass} yui-#{yuiClass}"
Modified: trunk/sandbox/ui/layout/src/main/templates/org/richfaces/htmlPage.jspx
===================================================================
--- trunk/sandbox/ui/layout/src/main/templates/org/richfaces/htmlPage.jspx 2009-03-04 18:19:20 UTC (rev 12831)
+++ trunk/sandbox/ui/layout/src/main/templates/org/richfaces/htmlPage.jspx 2009-03-05 01:38:23 UTC (rev 12832)
@@ -11,39 +11,48 @@
baseclass="org.richfaces.renderkit.AbstractPageRenderer"
component="org.richfaces.component.UIPage"
>
- <h:styles>css/grids.css</h:styles>
+ <h:styles>css/fonts.css,css/page.css</h:styles>
<f:clientid var="clientId"/>
<c:set var="namespace" value="#{this:prolog(context,component)}"/>
<html x:xmlns="#{namespace}" x:lang="#{context.viewRoot.locale}"
>
<head>
<title>#{component.attributes['pageTitle']}</title>
- <f:call name="styles"/>
+ <f:call name="themeStyle"/>
+ <f:call name="themeScript"/>
+ <f:call name="pageStyle"/>
<u:insertFacet name="pageHeader"/>
</head>
<body x:passThruWithExclusions="value,name,type,id">
- <div id="doc3" class="#{this:documentClass(context,component)}">
+ <div id="#{clientId}" class="rich-page #{component.attributes['pageClass']}"
+ x:style="#{component.attributes['pageStyle']}">
<c:if test="#{this:hasFacet(component,'header')}">
- <div id="hd" x:class="#{component.attributes['headerClass']}">
- <u:insertFacet name="header"/>
+ <div id="#{clientId}:hd" class="rich-page-header #{component.attributes['headerClass']}">
+ <u:insertFacet name="header"/>
</div>
</c:if>
- <div id="bd">
+ <c:if test="#{this:hasFacet(component,'subheader')}">
+ <div id="#{clientId}:shd" class="rich-page-subheader #{component.attributes['subheaderClass']}">
+ <u:insertFacet name="subheader"/>
+ </div>
+ </c:if>
+ <div id="#{clientId}:cnt" class="rich-page-content #{component.attributes['contentClass']}">
<c:if test="#{this:hasFacet(component,'sidebar')}">
- <div class="yui-b">
+ <div class="rich-page-sidebar #{component.attributes['styleClass']}">
<u:insertFacet name="sidebar"/>
</div>
</c:if>
<vcp:body>
- <div class="yui-main">
- <div class="yui-b #{component.attributes['bodyClass']}">
+ <div class="rich-page-main">
+ <div class="rich-page-body #{component.attributes['bodyClass']}">
<f:call name="renderChildren" />
</div>
</div>
</vcp:body>
</div>
<c:if test="#{this:hasFacet(component,'footer')}">
- <div id="ft" x:class="#{component.attributes['footerClass']}">
+ <f:clientid var="clientId"/>
+ <div id="#{clientId}:ft" class="rich-page-footer #{component.attributes['footerClass']}">
<u:insertFacet name="footer"/>
</div>
</c:if>
15 years, 10 months
JBoss Rich Faces SVN: r12831 - trunk/ui/togglePanel/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: cluts
Date: 2009-03-04 13:19:20 -0500 (Wed, 04 Mar 2009)
New Revision: 12831
Modified:
trunk/ui/togglePanel/src/main/config/component/togglePanel.xml
Log:
RF-696 - corrected description (the "reRender" attribute) for toggleControl.
Modified: trunk/ui/togglePanel/src/main/config/component/togglePanel.xml
===================================================================
--- trunk/ui/togglePanel/src/main/config/component/togglePanel.xml 2009-03-04 18:16:37 UTC (rev 12830)
+++ trunk/ui/togglePanel/src/main/config/component/togglePanel.xml 2009-03-04 18:19:20 UTC (rev 12831)
@@ -390,6 +390,10 @@
<property>
<name>reRender</name>
<classname>java.lang.Object</classname>
+ <description>
+ Id['s] (in format of call UIComponent.findComponent()) of components, rendered in case of AjaxRequest caused by this component.
+ Can be single id, comma-separated list of Id's, or EL Expression with array or Collection
+ </description>
</property>
<property>
<name>status</name>
15 years, 10 months
JBoss Rich Faces SVN: r12830 - trunk/ui/beanValidator/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: cluts
Date: 2009-03-04 13:16:37 -0500 (Wed, 04 Mar 2009)
New Revision: 12830
Modified:
trunk/ui/beanValidator/src/main/config/component/beanValidator.xml
Log:
RF-696 - Added description of the "disableDefault" attribute for ajaxValidator.
Modified: trunk/ui/beanValidator/src/main/config/component/beanValidator.xml
===================================================================
--- trunk/ui/beanValidator/src/main/config/component/beanValidator.xml 2009-03-04 17:11:33 UTC (rev 12829)
+++ trunk/ui/beanValidator/src/main/config/component/beanValidator.xml 2009-03-04 18:16:37 UTC (rev 12830)
@@ -55,6 +55,9 @@
<property>
<name>disableDefault</name>
+ <description>
+ Disables default action for target event ( append "return false;" to JavaScript ). Default value is "false"
+ </description>
</property>
<property disabled="true">
15 years, 10 months
JBoss Rich Faces SVN: r12829 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/pages/pickList and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2009-03-04 12:11:33 -0500 (Wed, 04 Mar 2009)
New Revision: 12829
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/PickListTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/pickList/pickListAutoTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/pickList/pickListTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PickListTest.java
Log:
RF-6161, RF-6163
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/PickListTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/PickListTestBean.java 2009-03-04 16:59:50 UTC (rev 12828)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/PickListTestBean.java 2009-03-04 17:11:33 UTC (rev 12829)
@@ -36,7 +36,7 @@
private String removeAllLabel = "TAKE ALL AWAY";
- private List<String> items = Arrays.asList("ZHURIK", "MELESHKO", "LEONTIEV", "KOVAL", "KALYUZHNY", "DUDIK",
+ public static final List<String> ITEMS = Arrays.asList("ZHURIK", "MELESHKO", "LEONTIEV", "KOVAL", "KALYUZHNY", "DUDIK",
"KOSTITSYN", "GRABOVSKI");
private List<SelectItem> options;
@@ -123,13 +123,14 @@
public void reset() {
options = new ArrayList<SelectItem>();
- for (String player : items) {
+ for (String player : ITEMS) {
options.add(new SelectItem(player, player));
}
// preselected items
result = new ArrayList<String>();
- result.add(items.get(0));
- result.add(items.get(1));
+ result.add(ITEMS.get(0));
+ result.add(ITEMS.get(1));
}
+
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/pickList/pickListAutoTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/pickList/pickListTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PickListTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PickListTest.java 2009-03-04 16:59:50 UTC (rev 12828)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PickListTest.java 2009-03-04 17:11:33 UTC (rev 12829)
@@ -20,7 +20,9 @@
*/
package org.richfaces.testng;
+import java.util.Arrays;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import org.ajax4jsf.template.Template;
@@ -28,6 +30,7 @@
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
import org.testng.annotations.Test;
+import static org.ajax4jsf.bean.PickListTestBean.ITEMS;
public class PickListTest extends SeleniumTestBase {
@@ -125,6 +128,37 @@
}
@Test
+ public void testValueChangeEventFiredAndModelUpdatedOnSubmit(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, RESET_METHOD);
+ String resultId = tester.getClientId("result");
+
+ writeStatus("Check ValueChangeListeners invoked on submit and model binding is updated on value changed");
+
+ List<String> expected = Arrays.asList("ZHURIK", "MELESHKO");
+ AssertTextEquals(resultId, expected.toString());
+
+ tester.testSubmit();
+
+ AssertTextEquals(resultId, ITEMS.toString(), "Model binding is not updated");
+ }
+
+ @Test
+ public void testSubmitWithExternalValidationFailed(Template template ) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, RESET_METHOD);
+ writeStatus("Test component's form submission with an invalid element in it");
+ String resultId = tester.getClientId("result");
+
+ List<String> expected = Arrays.asList("ZHURIK", "MELESHKO");
+ AssertTextEquals(resultId, expected.toString());
+
+ tester.testSubmitWithExternalValidationFailed();
+
+ AssertTextEquals(resultId, expected.toString(), "Model has to be untouched");
+ }
+
+ @Test
public void testRenderedAttribute(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, RESET_METHOD);
15 years, 10 months
JBoss Rich Faces SVN: r12828 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/pages/ajaxOutputPanel and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2009-03-04 11:59:50 -0500 (Wed, 04 Mar 2009)
New Revision: 12828
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxOutputPanel/ajaxOutputPanelAutoTest.xhtml
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JOutputPanelTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxOutputPanel/ajaxOutputPanelTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxOutputPanelTest.java
Log:
RF-6195
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JOutputPanelTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JOutputPanelTestBean.java 2009-03-04 16:37:38 UTC (rev 12827)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JOutputPanelTestBean.java 2009-03-04 16:59:50 UTC (rev 12828)
@@ -20,6 +20,8 @@
*/
package org.ajax4jsf.bean;
+import javax.faces.component.UIComponent;
+
/**
* A4JOutputPanel Test Bean
* @author Alexandr Levkovsky
@@ -31,18 +33,28 @@
private Boolean ajaxRendered;
+ private Boolean keepTransient;
+
private String outputText;
+ private UIComponent binding;
+
public void init() {
layout = "inline";
ajaxRendered = false;
outputText = "text";
+ keepTransient = true;
+ binding = null;
}
public void submit() {
outputText = "changed";
}
+ public void setTransient() {
+ binding.setTransient(true);
+ }
+
public void setOutputText(String outputText) {
this.outputText = outputText;
}
@@ -66,4 +78,24 @@
public Boolean getAjaxRendered() {
return ajaxRendered;
}
+
+ public void setKeepTransient(Boolean keepTransient) {
+ this.keepTransient = keepTransient;
+ }
+
+ public Boolean getKeepTransient() {
+ return keepTransient;
+ }
+
+ public String getTransientState() {
+ return binding != null ? Boolean.toString(binding.isTransient()) : "";
+ }
+
+ public void setBinding(UIComponent binding) {
+ this.binding = binding;
+ }
+
+ public UIComponent getBinding() {
+ return binding;
+ }
}
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxOutputPanel/ajaxOutputPanelAutoTest.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxOutputPanel/ajaxOutputPanelAutoTest.xhtml (rev 0)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxOutputPanel/ajaxOutputPanelAutoTest.xhtml 2009-03-04 16:59:50 UTC (rev 12828)
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<ui:composition template="#{templateBean.autoTestTemplate}">
+ <ui:define name="component">
+ <a4j:outputPanel id="componentId" rendered="#{autoTestBean.rendered}"
+ style="width: 100%; color: yellow"
+ styleClass="noname"
+ onclick="EventQueue.fire('onclick')"
+ onmousedown="EventQueue.fire('onmousedown')"
+ onmousemove="EventQueue.fire('onmousemove')"
+ onmouseup="EventQueue.fire('onmouseup')"
+ onmouseout="EventQueue.fire('onmouseout')"
+ onmouseover="EventQueue.fire('onmouseover')"
+ onkeydown="EventQueue.fire('onkeydown')"
+ onkeypress="EventQueue.fire('onkeypress')"
+ onkeyup="EventQueue.fire('onkeyup')"
+ >
+ <h:outputText value="text"></h:outputText>
+ </a4j:outputPanel>
+ </ui:define>
+</ui:composition>
+</html>
\ No newline at end of file
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxOutputPanel/ajaxOutputPanelTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxOutputPanelTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxOutputPanelTest.java 2009-03-04 16:37:38 UTC (rev 12827)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxOutputPanelTest.java 2009-03-04 16:59:50 UTC (rev 12828)
@@ -20,7 +20,11 @@
*/
package org.richfaces.testng;
+import java.util.HashMap;
+import java.util.Map;
+
import org.ajax4jsf.template.Template;
+import org.richfaces.AutoTester;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
import org.testng.annotations.Test;
@@ -37,6 +41,8 @@
private String ajaxRendered;
+ private String keepTransient;
+
private String reset;
private String mainForm;
@@ -45,18 +51,25 @@
private String outputText;
+ private String transientState;
+
private String submit;
+ private String setTransient;
+
private void init(Template template) {
renderPage(null, template, "#{a4jOutputPanelBean.init}");
String attrForm = getParentId() + "attrForm";
layout = attrForm + ":layout";
ajaxRendered = attrForm + ":ajaxRendered";
+ keepTransient = attrForm + ":keepTransient";
reset = attrForm + ":reset";
mainForm = getParentId() + "mainForm";
outputPanel = mainForm + ":outputPanel";
outputText = mainForm + ":outputText";
+ transientState = mainForm + ":transientState";
submit = mainForm + ":submit";
+ setTransient = mainForm + ":setTransient";
}
/**
@@ -85,7 +98,41 @@
Assert.assertEquals(selenium.getText(outputText), "changed");
}
+ /**
+ * transient components are kept when keepTransient = true
+ */
@Test
+ public void testKeepTransient(Template template) {
+ init(template);
+ clickAjaxCommandAndWait(ajaxRendered);
+ Assert.assertEquals(selenium.getText(transientState), "false");
+ clickAjaxCommandAndWait(setTransient);
+ clickAjaxCommandAndWait(submit);
+ Assert.assertEquals(selenium.getText(transientState), "false");
+ clickAjaxCommandAndWait(keepTransient);
+ Assert.assertEquals(selenium.getText(transientState), "false");
+ clickAjaxCommandAndWait(setTransient);
+ clickAjaxCommandAndWait(submit);
+ Assert.assertEquals(selenium.getText(transientState), "true");
+ }
+
+ /**
+ * component with rendered = false is not present on the page,
+ * style and classes, standard HTML attributes are output to client
+ */
+ @Test
+ public void testStandardAttributes(Template template) {
+ AutoTester autoTester = getAutoTester(this);
+ autoTester.renderPage(template, null);
+ autoTester.testRendered();
+ Map<String, String> styleAttributes = new HashMap<String, String>();
+ styleAttributes.put("width", "100%");
+ styleAttributes.put("color", "yellow");
+ autoTester.testStyleAndClasses(new String[]{"noname"}, styleAttributes);
+ autoTester.testHTMLEvents();
+ }
+
+ @Test
public void testLayoutAttribute(Template template) {
init(template);
Assert.assertEquals(selenium.getAttribute("xpath=id('" + mainForm + "')/span/span/span@id"), outputText);
@@ -97,7 +144,12 @@
Assert.assertEquals(selenium.getAttribute("xpath=id('" + mainForm + "')/span/span@id"), outputText);
}
- @Override
+ @Override
+ public String getAutoTestUrl() {
+ return "pages/ajaxOutputPanel/ajaxOutputPanelAutoTest.xhtml";
+ }
+
+ @Override
public String getTestUrl() {
return "pages/ajaxOutputPanel/ajaxOutputPanelTest.xhtml";
}
15 years, 10 months
JBoss Rich Faces SVN: r12827 - in trunk/test-applications/realworld2/web/src/main/webapp: layout and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-03-04 11:37:38 -0500 (Wed, 04 Mar 2009)
New Revision: 12827
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/web.xml
trunk/test-applications/realworld2/web/src/main/webapp/layout/template3.xhtml
Log:
Modified: trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/web.xml 2009-03-04 16:27:33 UTC (rev 12826)
+++ trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/web.xml 2009-03-04 16:37:38 UTC (rev 12827)
@@ -81,7 +81,7 @@
<context-param>
<param-name>uploadRoot</param-name>
- <param-value>d:/Upload/</param-value>
+ <param-value>/srv/www/jboss-portal/server/default/data/Upload/</param-value>
</context-param>
Modified: trunk/test-applications/realworld2/web/src/main/webapp/layout/template3.xhtml
===================================================================
(Binary files differ)
15 years, 10 months
JBoss Rich Faces SVN: r12826 - in trunk/test-applications/realworld2/web/src/main: webapp/WEB-INF and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-03-04 11:27:33 -0500 (Wed, 04 Mar 2009)
New Revision: 12826
Added:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/DirectLink.java
trunk/test-applications/realworld2/web/src/main/webapp/includes/directImage.xhtml
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/pages.xml
trunk/test-applications/realworld2/web/src/main/webapp/includes/userImage.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/layout/menu.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/layout/panelBar-backup.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/layout/template3.xhtml
Log:
Added: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/DirectLink.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/DirectLink.java (rev 0)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/DirectLink.java 2009-03-04 16:27:33 UTC (rev 12826)
@@ -0,0 +1,67 @@
+package org.richfaces.realworld.util;
+
+import java.awt.image.BufferedImage;
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import javax.imageio.ImageIO;
+import javax.persistence.EntityManager;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.web.RequestParameter;
+import org.jboss.seam.core.Events;
+import org.richfaces.realworld.domain.Image;
+import org.richfaces.realworld.fileupload.FileManager;
+import org.richfaces.realworld.service.Constants;
+
+@Name("directLink")
+(a)Scope(ScopeType.SESSION)
+public class DirectLink {
+ @In(value="entityManager")
+ protected EntityManager em;
+ @In(create = true)
+ FileManager fileManager;
+ @RequestParameter
+ protected Long imageId;
+
+ private Long id;
+
+ public synchronized void paintImage(OutputStream out, Object data)
+ throws IOException {
+ Image im = em.find(Image.class, id);
+ File imageResource = fileManager.getImage(im.getPath());
+ if (imageResource != null) {
+ FileInputStream fileInputStream = new FileInputStream(imageResource);
+ BufferedInputStream bufferedInputStream = new BufferedInputStream(
+ fileInputStream);
+ InputStream paintData = bufferedInputStream;
+ if (null == paintData) {
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT,
+ new Exception(""));
+ return;
+ }
+ try {
+ BufferedImage images = ImageIO.read(paintData);
+ ImageIO.write(images, Constants.JPEG, out);
+ } catch (Exception e) {
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT,
+ new Exception(""));
+ return;
+ } finally {
+ fileInputStream.close();
+ bufferedInputStream.close();
+ paintData.close();
+ }
+ }
+ }
+ public void start(){
+ id=imageId;
+ }
+}
\ No newline at end of file
Property changes on: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/DirectLink.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/pages.xml
===================================================================
--- trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/pages.xml 2009-03-04 14:59:18 UTC (rev 12825)
+++ trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/pages.xml 2009-03-04 16:27:33 UTC (rev 12826)
@@ -30,7 +30,9 @@
<redirect view-id="/index.xhtml"/>
</navigation>
</page>
-
+<page view-id="/includes/directImage.xhtml">
+<action execute="#{directLink.start}"/>
+</page>
<exception class="org.jboss.seam.framework.EntityNotFoundException">
<redirect view-id="/error.xhtml">
<message>Not found</message>
Added: trunk/test-applications/realworld2/web/src/main/webapp/includes/directImage.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld2/web/src/main/webapp/includes/directImage.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/userImage.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/layout/menu.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/layout/panelBar-backup.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/layout/template3.xhtml
===================================================================
(Binary files differ)
15 years, 10 months