Author: SergeySmirnov
Date: 2007-11-20 18:40:43 -0500 (Tue, 20 Nov 2007)
New Revision: 4122
Added:
trunk/sandbox/samples/contextMenuDemo/
trunk/sandbox/samples/listShuttleDemo/
trunk/sandbox/samples/orderingListDemo/
trunk/sandbox/samples/rex-demo/src/main/webapp/WEB-INF/faces-config.xml.l4t
trunk/sandbox/samples/rex-demo/src/main/webapp/images/bfly.jpg
trunk/sandbox/samples/rex-demo/src/main/webapp/richfaces/resizable/examples/pictures.xhtml
trunk/sandbox/samples/rex-demo/src/main/webapp/richfaces/resizable/examples/richpanel.xhtml
trunk/sandbox/samples/rex-demo/src/main/webapp/templates/main_old.xhtml
Removed:
trunk/sandbox/samples/rex-demo/src/main/webapp/templates/main.xhtml
Modified:
trunk/sandbox/samples/rex-demo/src/main/webapp/WEB-INF/faces-config.xml
trunk/sandbox/samples/rex-demo/src/main/webapp/css/common.css
trunk/sandbox/samples/rex-demo/src/main/webapp/images/tabpanel_custom/tabpanel_bg.jpg
trunk/sandbox/samples/rex-demo/src/main/webapp/richfaces/resizable/examples/simple.xhtml
trunk/sandbox/samples/rex-demo/src/main/webapp/richfaces/resizable/usage.xhtml
trunk/sandbox/samples/rex-demo/src/main/webapp/templates/include/dynamic-css.xhtml
trunk/sandbox/samples/rex-demo/src/main/webapp/welcome.xhtml
trunk/sandbox/ui/rex-resizable/src/main/config/component/resizable.xml
trunk/sandbox/ui/rex-resizable/src/main/templates/resizable.jspx
Log:
rex demo + ext js
Property changes on: trunk/sandbox/samples/contextMenuDemo
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: trunk/sandbox/samples/listShuttleDemo
___________________________________________________________________
Name: svn:ignore
+ .classpath
.project
.settings
target
Property changes on: trunk/sandbox/samples/orderingListDemo
___________________________________________________________________
Name: svn:ignore
+ .classpath
.project
.settings
target
Modified: trunk/sandbox/samples/rex-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/sandbox/samples/rex-demo/src/main/webapp/WEB-INF/faces-config.xml 2007-11-20
23:08:20 UTC (rev 4121)
+++ trunk/sandbox/samples/rex-demo/src/main/webapp/WEB-INF/faces-config.xml 2007-11-20
23:40:43 UTC (rev 4122)
@@ -285,6 +285,5 @@
</navigation-case>
</navigation-rule>
<lifecycle>
- <phase-listener>org.richfaces.treemodeladaptor.PostbackPhaseListener</phase-listener>
</lifecycle>
</faces-config>
Added: trunk/sandbox/samples/rex-demo/src/main/webapp/WEB-INF/faces-config.xml.l4t
===================================================================
--- trunk/sandbox/samples/rex-demo/src/main/webapp/WEB-INF/faces-config.xml.l4t
(rev 0)
+++ trunk/sandbox/samples/rex-demo/src/main/webapp/WEB-INF/faces-config.xml.l4t 2007-11-20
23:40:43 UTC (rev 4122)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PROCESS ENTITY="JSFProcess">
+ <PROCESS-ITEM ENTITY="JSFProcessGroup"
+ NAME="rules:#richfaces#include#examples#wstep1.xhtml"
+ PATH="/richfaces/include/examples/wstep1.xhtml"
SHAPE="32,17,0,0">
+ <PROCESS-ITEM ENTITY="JSFProcessItem"
+ ID="rules:#richfaces#include#examples#wstep1.xhtml:0" NAME="item"
PATH="/richfaces/include/examples/wstep1.xhtml">
+ <PROCESS-ITEM-OUTPUT ENTITY="JSFProcessItemOutput"
+ ID="next::#richfaces#include#examples#wstep2.xhtml"
NAME="output"
+ PATH="/richfaces/include/examples/wstep2.xhtml"
+ TARGET="rules:#richfaces#include#examples#wstep2.xhtml"
TITLE="next"/>
+ </PROCESS-ITEM>
+ </PROCESS-ITEM>
+ <PROCESS-ITEM ENTITY="JSFProcessGroup"
+ NAME="rules:#richfaces#include#examples#wstep2.xhtml"
+ PATH="/richfaces/include/examples/wstep2.xhtml"
SHAPE="256,33,0,0">
+ <PROCESS-ITEM ENTITY="JSFProcessItem"
+ ID="rules:#richfaces#include#examples#wstep2.xhtml:0" NAME="item"
PATH="/richfaces/include/examples/wstep2.xhtml">
+ <PROCESS-ITEM-OUTPUT ENTITY="JSFProcessItemOutput"
+ ID="previous::#richfaces#include#examples#wstep1.xhtml"
+ NAME="output" PATH="/richfaces/include/examples/wstep1.xhtml"
+ TARGET="rules:#richfaces#include#examples#wstep1.xhtml"
TITLE="previous"/>
+ <PROCESS-ITEM-OUTPUT ENTITY="JSFProcessItemOutput"
+ ID="next::#richfaces#include#examples#finalStep.xhtml"
+ NAME="output1"
PATH="/richfaces/include/examples/finalStep.xhtml"
+ TARGET="rules:#richfaces#include#examples#finalStep.xhtml"
TITLE="next"/>
+ </PROCESS-ITEM>
+ </PROCESS-ITEM>
+ <PROCESS-ITEM ENTITY="JSFProcessGroup"
+ NAME="rules:#richfaces#include#examples#finalStep.xhtml"
+ PATH="/richfaces/include/examples/finalStep.xhtml"
SHAPE="480,17,0,0">
+ <PROCESS-ITEM ENTITY="JSFProcessItem"
+ ID="rules:#richfaces#include#examples#finalStep.xhtml:0"
NAME="item" PATH="/richfaces/include/examples/finalStep.xhtml">
+ <PROCESS-ITEM-OUTPUT ENTITY="JSFProcessItemOutput"
+ ID="previous::#richfaces#include#examples#wstep2.xhtml"
+ NAME="output" PATH="/richfaces/include/examples/wstep2.xhtml"
+ TARGET="rules:#richfaces#include#examples#wstep2.xhtml"
TITLE="previous"/>
+ </PROCESS-ITEM>
+ </PROCESS-ITEM>
+</PROCESS>
Modified: trunk/sandbox/samples/rex-demo/src/main/webapp/css/common.css
===================================================================
--- trunk/sandbox/samples/rex-demo/src/main/webapp/css/common.css 2007-11-20 23:08:20 UTC
(rev 4121)
+++ trunk/sandbox/samples/rex-demo/src/main/webapp/css/common.css 2007-11-20 23:40:43 UTC
(rev 4122)
@@ -42,7 +42,7 @@
li{
margin-top : 5px;
margin-bottom : 5px;
- margin-left : -12px;
+ margin-left : 12px;
}
ul{
margin-top : 10px;
Added: trunk/sandbox/samples/rex-demo/src/main/webapp/images/bfly.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox/samples/rex-demo/src/main/webapp/images/bfly.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified:
trunk/sandbox/samples/rex-demo/src/main/webapp/images/tabpanel_custom/tabpanel_bg.jpg
===================================================================
(Binary files differ)
Added:
trunk/sandbox/samples/rex-demo/src/main/webapp/richfaces/resizable/examples/pictures.xhtml
===================================================================
---
trunk/sandbox/samples/rex-demo/src/main/webapp/richfaces/resizable/examples/pictures.xhtml
(rev 0)
+++
trunk/sandbox/samples/rex-demo/src/main/webapp/richfaces/resizable/examples/pictures.xhtml 2007-11-20
23:40:43 UTC (rev 4122)
@@ -0,0 +1,65 @@
+<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rex="http://labs.jboss.com/jbossrichfaces/ui/ui/rex-resizable&...
+
xmlns:rich="http://richfaces.org/rich">
+
+<f:view contentType="text/html">
+
+ <button onclick="resizePic(500,427)">100% of Size</button>
+ <button onclick="resizePic(250,212)">50% of Size</button>
+ <script>
+ function resizePic(w,h) {
+ window.pic.resizeTo(w,h);
+ }
+ </script>
+
+ <rex:resizable wrap="true" name="window.pic"
easing="easingInStrong"
+ pinned="false" handles="s se e" preserveRatio = "true"
transparent="true"
+ minWidth="50" width="204" height="176"
styleClass="res">
+ <h:graphicImage id="gm" width="204" height="176"
value="/images/bfly.jpg" />
+ </rex:resizable>
+
+<rex:resizable easing="easingInStrong"
+ pinned="true" wrap="true" handles="e"
+ minWidth="400" width="500" height="260"
styleClass="res">
+ <rich:dataTable width="483" id="carList"
rows="10" columnClasses="col"
+ value="#{dataTableScrollerBean.allCars}"
var="category">
+ <f:facet name="header">
+ <rich:columnGroup>
+ <h:column>
+ <h:outputText styleClass="headerText"
value="Make" />
+ </h:column>
+ <h:column>
+ <h:outputText styleClass="headerText"
value="Model" />
+ </h:column>
+ <h:column>
+ <h:outputText styleClass="headerText"
value="Price" />
+ </h:column>
+ <h:column>
+ <h:outputText styleClass="headerText"
value="Mileage" />
+ </h:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ <h:column>
+ <h:outputText value="#{category.make}" />
+ </h:column>
+ <h:column>
+ <h:outputText value="#{category.model}" />
+ </h:column>
+ <h:column>
+ <h:outputText value="#{category.price}" />
+ </h:column>
+ <h:column>
+ <h:outputText value="#{category.mileage}" />
+ </h:column>
+
+ </rich:dataTable>
+ </rex:resizable>
+
+
+</f:view>
+</ui:composition>
\ No newline at end of file
Added:
trunk/sandbox/samples/rex-demo/src/main/webapp/richfaces/resizable/examples/richpanel.xhtml
===================================================================
---
trunk/sandbox/samples/rex-demo/src/main/webapp/richfaces/resizable/examples/richpanel.xhtml
(rev 0)
+++
trunk/sandbox/samples/rex-demo/src/main/webapp/richfaces/resizable/examples/richpanel.xhtml 2007-11-20
23:40:43 UTC (rev 4122)
@@ -0,0 +1,33 @@
+<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rex="http://labs.jboss.com/jbossrichfaces/ui/ui/rex-resizable&...
+
xmlns:rich="http://richfaces.org/rich">
+
+<f:view contentType="text/html">
+
+
+
+ <rex:resizable draggable="true" name="mypanel"
preserveRatio="false" easing="easingInStrong" animate="true"
+ minWidth="480" minHeight="130" width="429"
height="200"
+ style="padding-bottom:4px;padding-right:4px;z-index:2000">
+ <rich:panel style="height:100%">
+ <f:facet name="header">
+ Dialog Title
+ </f:facet>
+ Drag the botton right hand corner to resize<br /><br />
+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed metus nibh,
+ sodales a, porta at, vulputate eget, dui. Pellentesque ut nisl. Maecenas
+ tortor turpis, interdum non, sodales non, iaculis ac, lacus. Vestibulum auctor,
+ tortor quis iaculis malesuada, libero lectus bibendum purus, sit amet tincidunt
+ quam turpis vel lacus.
+ </rich:panel>
+ </rex:resizable>
+
+
+
+
+</f:view>
+</ui:composition>
\ No newline at end of file
Modified:
trunk/sandbox/samples/rex-demo/src/main/webapp/richfaces/resizable/examples/simple.xhtml
===================================================================
---
trunk/sandbox/samples/rex-demo/src/main/webapp/richfaces/resizable/examples/simple.xhtml 2007-11-20
23:08:20 UTC (rev 4121)
+++
trunk/sandbox/samples/rex-demo/src/main/webapp/richfaces/resizable/examples/simple.xhtml 2007-11-20
23:40:43 UTC (rev 4122)
@@ -8,28 +8,30 @@
<f:view contentType="text/html">
+ <style>
+ .res {
+ padding-bottom:12px
+ }
- <rex:resizable draggable="true" name="mypanel"
preserveRatio="false" easing="easingInStrong" animate="true"
- minWidth="480" minHeight="130" width="429"
height="200"
- style="padding-bottom:4px;padding-right:4px;z-index:2000">
- <rich:panel style="height:100%">
- <f:facet name="header">
- Dialog Title
- </f:facet>
+ .rdiv {
+ height:100%;
+ border:1px solid #CCC;
+ padding: 5px;
+ }
+ </style>
+
+ <rex:resizable name="mypanel" easing="easingInStrong"
pinned="true" handles="e se s"
+ minWidth="480" minHeight="130" width="480"
height="200" styleClass="res">
+ <div class="rdiv">
Drag the botton right hand corner to resize<br /><br />
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed metus nibh,
sodales a, porta at, vulputate eget, dui. Pellentesque ut nisl. Maecenas
tortor turpis, interdum non, sodales non, iaculis ac, lacus. Vestibulum auctor,
tortor quis iaculis malesuada, libero lectus bibendum purus, sit amet tincidunt
quam turpis vel lacus.
- </rich:panel>
-
+ </div>
</rex:resizable>
-
-
-
-
</f:view>
</ui:composition>
\ No newline at end of file
Modified: trunk/sandbox/samples/rex-demo/src/main/webapp/richfaces/resizable/usage.xhtml
===================================================================
---
trunk/sandbox/samples/rex-demo/src/main/webapp/richfaces/resizable/usage.xhtml 2007-11-20
23:08:20 UTC (rev 4121)
+++
trunk/sandbox/samples/rex-demo/src/main/webapp/richfaces/resizable/usage.xhtml 2007-11-20
23:40:43 UTC (rev 4122)
@@ -8,10 +8,11 @@
<ui:composition template="/templates/component-sample.xhtml">
<ui:define name="sample">
- <p>Description
+ <p>The "resizable" component represents the Ext JS wizard with the
same name. It allows
+ to resize the JSF component or any pure DOM element. The following simplte example
+ shows how "resizable" might use to resize DIV element.
</p>
-
<div class="sample-container" >
<ui:include src="/richfaces/resizable/examples/simple.xhtml"/>
@@ -19,6 +20,33 @@
<ui:param name="sourcepath"
value="/richfaces/resizable/examples/simple.xhtml"/>
</ui:include>
</div>
+
+ <p>The following example shows how to resize the image manually and resize it
programmatically
+ using the javascript object API.
+ </p>
+
+
+
+ <div class="sample-container" >
+
+ <ui:include src="/richfaces/resizable/examples/pictures.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/resizable/examples/pictures.xhtml"/>
+ </ui:include>
+ </div>
+
+
+
+ <p><ul>Known drawbacks:
+ <li>Requires the width and height defined explicitly.
+ I.e. no "auto fit" mode. No 100% mode.</li>
+ <li>Does not fit the size of the wrapped element precisely. Requires different
+ style for IE and FF browsers for correction</li>
+ <li>Incompatible with xhtml mode (it is EXT JS disease in general). Might
cause
+ losing the flexibility in Ajax mode.</li>
+ </ul>
+ </p>
+
</ui:define>
Modified:
trunk/sandbox/samples/rex-demo/src/main/webapp/templates/include/dynamic-css.xhtml
===================================================================
---
trunk/sandbox/samples/rex-demo/src/main/webapp/templates/include/dynamic-css.xhtml 2007-11-20
23:08:20 UTC (rev 4121)
+++
trunk/sandbox/samples/rex-demo/src/main/webapp/templates/include/dynamic-css.xhtml 2007-11-20
23:40:43 UTC (rev 4122)
@@ -6,7 +6,7 @@
<ui:composition>
<style type="text/css">
body{
- background-image :
url(${facesContext.externalContext.requestContextPath}/images/page_bg.gif);
+ _background-image :
url(${facesContext.externalContext.requestContextPath}/images/page_bg.gif);
}
li{
list-style : outside
url(${facesContext.externalContext.requestContextPath}/images/bullet_arrow.gif);
Deleted: trunk/sandbox/samples/rex-demo/src/main/webapp/templates/main.xhtml
===================================================================
--- trunk/sandbox/samples/rex-demo/src/main/webapp/templates/main.xhtml 2007-11-20
23:08:20 UTC (rev 4121)
+++ trunk/sandbox/samples/rex-demo/src/main/webapp/templates/main.xhtml 2007-11-20
23:40:43 UTC (rev 4122)
@@ -1,65 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html
xmlns="http://www.w3.org/1999/xhtml"
-
xmlns:ui="http://java.sun.com/jsf/facelets"
-
xmlns:h="http://java.sun.com/jsf/html"
-
xmlns:f="http://java.sun.com/jsf/core"
-
xmlns:a4j="http://richfaces.org/a4j"
-
xmlns:rich="http://richfaces.org/rich">
-
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;
charset=UTF-8"/>
-<title>
- <ui:insert name="title"/>
-</title>
-<link rel="STYLESHEET" type="text/css"
href="${facesContext.externalContext.requestContextPath}/css/common.css"/>
-
-<ui:include src="/templates/include/dynamic-css.xhtml" />
-</head>
-
-<body>
-
-<ui:include src="/templates/include/header.xhtml" />
-<table class="left_menu" cellpadding="0" cellspacing="0"
border="0">
-<tbody>
- <tr>
- <td>
- <ui:include src="/templates/include/references.xhtml" />
- <div class="menu_separator">
-
- </div>
- <ui:include src="/templates/include/components-navigation.xhtml" />
- </td>
- </tr>
-</tbody>
-</table>
-<h:outputText styleClass="component_name sheader"
value="#{componentNavigator.currentComponent.name}"
- rendered="#{componentNavigator.hasCurrentComponent}" height="40"
alt="" border="0"/>
-
-<ui:remove>
-<h:graphicImage value="#{componentNavigator.currentComponent.captionImage}"
- rendered="#{componentNavigator.hasCurrentComponent}" height="40"
alt="" border="0" styleClass="component_name"/>
-</ui:remove>
-<table cellpadding="0" cellspacing="0" border="0"
class="content_container" width="100%">
-<tbody>
- <tr>
- <td>
- <div class="content_container_left_brick"></div>
- </td>
- <td width="100%" class="content_container_pdddings">
-<!-- tabpanel begin -->
- <ui:insert name="body">Body</ui:insert>
-<!-- tabpanel end -->
- <rich:spacer style="height:10px;" />
- <rich:separator style="height:1px" />
- <div style="float:right"
class="footer-text">${a4j.version}</div>
- <div style="float:none">
- <a
href="http://jboss.com/index.html?module=bb&op=viewtopic&...
- style="color:#000; display:block"
class="footer-text">RichFaces. Most Important Links</a>
- </div>
- </td>
- </tr>
-</tbody>
-</table>
-
-</body>
-</html>
Copied: trunk/sandbox/samples/rex-demo/src/main/webapp/templates/main_old.xhtml (from rev
3971, trunk/sandbox/samples/rex-demo/src/main/webapp/templates/main.xhtml)
===================================================================
--- trunk/sandbox/samples/rex-demo/src/main/webapp/templates/main_old.xhtml
(rev 0)
+++ trunk/sandbox/samples/rex-demo/src/main/webapp/templates/main_old.xhtml 2007-11-20
23:40:43 UTC (rev 4122)
@@ -0,0 +1,65 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;
charset=UTF-8"/>
+<title>
+ <ui:insert name="title"/>
+</title>
+<link rel="STYLESHEET" type="text/css"
href="${facesContext.externalContext.requestContextPath}/css/common.css"/>
+
+<ui:include src="/templates/include/dynamic-css.xhtml" />
+</head>
+
+<body>
+
+<ui:include src="/templates/include/header.xhtml" />
+<table class="left_menu" cellpadding="0" cellspacing="0"
border="0">
+<tbody>
+ <tr>
+ <td>
+ <ui:include src="/templates/include/references.xhtml" />
+ <div class="menu_separator">
+
+ </div>
+ <ui:include src="/templates/include/components-navigation.xhtml" />
+ </td>
+ </tr>
+</tbody>
+</table>
+<h:outputText styleClass="component_name sheader"
value="#{componentNavigator.currentComponent.name}"
+ rendered="#{componentNavigator.hasCurrentComponent}" height="40"
alt="" border="0"/>
+
+<ui:remove>
+<h:graphicImage value="#{componentNavigator.currentComponent.captionImage}"
+ rendered="#{componentNavigator.hasCurrentComponent}" height="40"
alt="" border="0" styleClass="component_name"/>
+</ui:remove>
+<table cellpadding="0" cellspacing="0" border="0"
class="content_container" width="100%">
+<tbody>
+ <tr>
+ <td>
+ <div class="content_container_left_brick"></div>
+ </td>
+ <td width="100%" class="content_container_pdddings">
+<!-- tabpanel begin -->
+ <ui:insert name="body">Body</ui:insert>
+<!-- tabpanel end -->
+ <rich:spacer style="height:10px;" />
+ <rich:separator style="height:1px" />
+ <div style="float:right"
class="footer-text">${a4j.version}</div>
+ <div style="float:none">
+ <a
href="http://jboss.com/index.html?module=bb&op=viewtopic&...
+ style="color:#000; display:block"
class="footer-text">RichFaces. Most Important Links</a>
+ </div>
+ </td>
+ </tr>
+</tbody>
+</table>
+
+</body>
+</html>
Modified: trunk/sandbox/samples/rex-demo/src/main/webapp/welcome.xhtml
===================================================================
--- trunk/sandbox/samples/rex-demo/src/main/webapp/welcome.xhtml 2007-11-20 23:08:20 UTC
(rev 4121)
+++ trunk/sandbox/samples/rex-demo/src/main/webapp/welcome.xhtml 2007-11-20 23:40:43 UTC
(rev 4122)
@@ -2,6 +2,7 @@
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:rexr="http://labs.jboss.com/jbossrichfaces/ui/ui/rex-resizable...
xmlns:f="http://java.sun.com/jsf/core">
<ui:composition template="/templates/main.xhtml">
<ui:define name="title">RichFaces - Open Source Rich JSF
Components</ui:define>
@@ -37,6 +38,21 @@
production unless the legal issues with <a
href="http://extjs.com/license">Ext JS license</a>
is resolved.
</p>
+ <button onclick="resizePic(500,427)">100% of Size</button>
+ <button onclick="resizePic(250,212)">50% of Size</button>
+ <script>
+ function resizePic(w,h) {
+ window.pic.resizeTo(w,h);
+ }
+ </script>
+
+ <rexr:resizable wrap="true" name="window.pic"
easing="easingInStrong"
+ pinned="false" handles="s se e" preserveRatio = "true"
transparent="true"
+ minWidth="50" width="204" height="176"
styleClass="res">
+ <h:graphicImage id="gm2" width="204" height="176"
value="/images/bfly.jpg" />
+ </rexr:resizable>
+
+
</ui:define>
</ui:composition>
</html>
Modified: trunk/sandbox/ui/rex-resizable/src/main/config/component/resizable.xml
===================================================================
--- trunk/sandbox/ui/rex-resizable/src/main/config/component/resizable.xml 2007-11-20
23:08:20 UTC (rev 4121)
+++ trunk/sandbox/ui/rex-resizable/src/main/config/component/resizable.xml 2007-11-20
23:40:43 UTC (rev 4122)
@@ -86,7 +86,7 @@
<name>dynamic</name>
<classname>java.lang.String</classname>
<description>
- Animation duration if animate = true (defaults to .35)
+ True to resize the element while dragging instead of using a proxy (defaults to
false)
</description>
<defaultvalue>""</defaultvalue>
</property>
@@ -246,5 +246,14 @@
</description>
<defaultvalue>""</defaultvalue>
</property>
+ <property>
+ <name>wrap</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Apply to the child element directly. Important for some element, such
+ as image of textarea
+ </description>
+ <defaultvalue>""</defaultvalue>
+ </property>
</component>
</components>
Modified: trunk/sandbox/ui/rex-resizable/src/main/templates/resizable.jspx
===================================================================
--- trunk/sandbox/ui/rex-resizable/src/main/templates/resizable.jspx 2007-11-20 23:08:20
UTC (rev 4121)
+++ trunk/sandbox/ui/rex-resizable/src/main/templates/resizable.jspx 2007-11-20 23:40:43
UTC (rev 4122)
@@ -12,6 +12,7 @@
<f:clientid var="clientId"/>
<c:set var="name"
value="#{component.attributes['name']}"/>
+ <c:set var="styleClass"
value="#{component.attributes['styleClass']}"/>
<h:styles>extjs/ext-all.css,extjs/ext-css-patch.xcss</h:styles>
<h:scripts>extjs/ext-base.js,extjs/ext-all.js,script/rexInitWidget.js</h:scripts>
@@ -23,7 +24,7 @@
"heightIncrement", "maxHeight", "maxWidth",
"minHeight",
"minWidth", "minX", "minY",
"multiDirectional", "pinned",
"preserveRatio","resizeChild", "transparent",
"width",
- "widthIncrement"};
+ "widthIncrement", "wrap"};
String[] qattr = { "adjustments", "easing",
"handles"};
StringBuffer json = new StringBuffer();
@@ -35,8 +36,10 @@
String name = (String)component.getAttributes().get("name");
if (! "".equals(name)) {
- variables.setVariable("name", "window." + name +
"=");
+ variables.setVariable("name", name + "=");
}
+ String wrap = (String)component.getAttributes().get("wrap");
+ if ("true".equals(wrap)) {variables.setVariable("wrapChild",
".dom.firstChild");}
]]>
@@ -44,14 +47,14 @@
-<div id="#{clientId}"
x:passThruWithExclusions="id,styleClass,class">
+<div id="#{clientId}" class="#{styleClass}"
x:passThruWithExclusions="id,styleClass">
<vcp:body>
<f:call name="renderChildren" />
</vcp:body>
<f:clientid var="clientId"/>
<script type="text/javascript">
window.Richfaces.rexInitWidget(function(){
-#{name} new Ext.Resizable("#{clientId}", { #{params} });
+#{name} new Ext.Resizable(Ext.get("#{clientId}")#{wrapChild}, { #{params} });
});
</script>