[richfaces-svn-commits] JBoss Rich Faces SVN: r2309 - in trunk/test-applications/jsp/src/main: java/effect and 2 other directories.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Fri Aug 17 07:17:06 EDT 2007
Author: ayanul
Date: 2007-08-17 07:17:06 -0400 (Fri, 17 Aug 2007)
New Revision: 2309
Added:
trunk/test-applications/jsp/src/main/java/effect/
trunk/test-applications/jsp/src/main/java/effect/Effect.java
trunk/test-applications/jsp/src/main/webapp/Effect/
trunk/test-applications/jsp/src/main/webapp/Effect/Effect.jsp
Log:
added new component Effect
Added: trunk/test-applications/jsp/src/main/java/effect/Effect.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/effect/Effect.java (rev 0)
+++ trunk/test-applications/jsp/src/main/java/effect/Effect.java 2007-08-17 11:17:06 UTC (rev 2309)
@@ -0,0 +1,38 @@
+package effect;
+
+public class Effect {
+ private double time;
+ private String stateName;
+ private boolean state;
+
+ public Effect() {
+ time = 1.4;
+ state = true;
+ stateName = "buttonID";
+ }
+
+ public double getTime() {
+ return time;
+ }
+
+ public void setTime(double time) {
+ this.time = time;
+ }
+
+ public String getStateName() {
+ return stateName;
+ }
+
+ public void setStateName(String stateName) {
+ this.stateName = stateName;
+ }
+
+ public boolean isState() {
+ return state;
+ }
+
+ public void setState(boolean state) {
+ this.state = state;
+ }
+}
+
Added: trunk/test-applications/jsp/src/main/webapp/Effect/Effect.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Effect/Effect.jsp (rev 0)
+++ trunk/test-applications/jsp/src/main/webapp/Effect/Effect.jsp 2007-08-17 11:17:06 UTC (rev 2309)
@@ -0,0 +1,211 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
+<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
+<f:view>
+ <html>
+ <head>
+ <title></title>
+ </head>
+ <body onload="hideFrm1(),hideFrm2(),hideFrm3(),hideFrm4()">
+ <h:messages />
+ <h:form id="indexID">
+ <h:outputText value="Menu:" />
+ <h:panelGrid columns="2">
+ <h:outputText value="1." />
+ <f:verbatim>
+ <span onclick="showFrm1(),hideIndexID()"><font color="blue">JSF Components</font></span>
+ </f:verbatim>
+
+ <h:outputText value="2." />
+ <f:verbatim>
+ <span onclick="showFrm2(),hideIndexID()"><font color="blue">JSF Component with Event and non-jsf target</font></span>
+ </f:verbatim>
+
+ <h:outputText value="3." />
+ <f:verbatim>
+ <span onclick="showFrm3(),hideIndexID()"><font color="blue">JSF Component with Event and jsf target</font></span>
+ </f:verbatim>
+
+ <h:outputText value="4." />
+ <f:verbatim>
+ <span onclick="showFrm4(),hideIndexID()"><font color="blue">JSF Component with Event.</font></span>
+ </f:verbatim>
+ </h:panelGrid>
+ </h:form>
+
+ <h:form id="frm1">
+ <h:outputText value="JSF Components:" />
+
+ <h:panelGrid id="panGrID" columns="2">
+ <h:outputText value="Time:" />
+ <h:inputText value="#{effect.time}" />
+
+ <f:verbatim>
+ <span onclick="hidePanel1(), hedeImage1()"><font
+ color="blue">Hide</font> </span>
+ </f:verbatim>
+ <h:graphicImage value="/pics/fatal.gif"
+ onclick="hidePanel1(), hedeImage1()" />
+
+ <f:verbatim>
+ <span onclick="showPanel1(), showImage1()"><font
+ color="blue">Show</font> </span>
+ </f:verbatim>
+ <h:graphicImage value="/pics/warn.gif"
+ onclick="showPanel1(), showImage1()" />
+
+
+ <h:outputText value="Event (onclick):" />
+
+ <f:verbatim></f:verbatim>
+
+ <h:outputText value="No" />
+ <h:outputText value="Yes" />
+
+ <h:panelGroup id="form_1a_ID">
+ <h:panelGrid id="panel_1_ID" border="1"
+ style="background-color:#CCC">
+ <f:facet name="header">
+ <h:outputText value="Panel Header" />
+ </f:facet>
+
+ <h:outputText value="Panel Content" />
+ </h:panelGrid>
+ </h:panelGroup>
+
+ <h:graphicImage id="asusID" value="/pics/asus.jpg" height="100px"
+ width="125px" onclick="hideImage1()" />
+
+ <h:panelGroup id="form_1b_ID">
+ <h:inputText value="onmouse and onclick">
+ <rich:effect event="onclick" type="Opacity"
+ params="duration:0.5,from:0.4,to:1.0" />
+ <rich:effect event="onmouseout" type="Opacity"
+ params="duration:0.5,from:1.0,to:0.4" />
+ </h:inputText>
+ </h:panelGroup>
+ </h:panelGrid>
+
+ <rich:effect for="panel_1_ID" name="hidePanel1" type="Fade"
+ params="duration:#{effect.time}" />
+ <rich:effect for="panel_1_ID" name="showPanel1" type="Appear" />
+
+ <rich:effect for="asusID" name="hideImage1" type="Fade"
+ params="duration:#{effect.time}" />
+ <rich:effect for="asusID" name="showImage1" type="Appear" />
+
+ <f:verbatim>
+ <br />
+ <span onclick="hideFrm1(),showIndexID()"><font color="blue">Close</font></span>
+ </f:verbatim>
+ </h:form>
+
+ <h:form id="frm2">
+ <h:outputText
+ value="JSF Component with Event and non-jsf target (onclick, onmouseout)" />
+
+ <h:panelGrid columns="2">
+ <h:graphicImage id="imageID" value="/pics/podb109_61.jpg"
+ width="100" height="50">
+ <rich:effect event="onclick" targetId="divID" type="Opacity"
+ params="duration:0.5,from:0.4,to:1.0" />
+ <rich:effect event="onmouseout" type="Opacity"
+ params="targetId:'divID',duration:0.5,from:1.0,to:0.4" />
+ </h:graphicImage>
+
+ <f:verbatim>
+ <div id="divID"
+ style="width: 100px; height: 50px; background-color: red"><rich:effect
+ event="onclick" targetId="imageID" type="Opacity"
+ params="duration:0.5,from:0.4,to:1.0" /> <rich:effect
+ event="onmouseout" type="Opacity"
+ params="targetId:'imageID',duration:0.5,from:1.0,to:0.4" /></div>
+ </f:verbatim>
+ </h:panelGrid>
+
+ <f:verbatim>
+ <br />
+ <span onclick="hideFrm2(),showIndexID()"><font color="blue">Close</font></span>
+ </f:verbatim>
+ </h:form>
+
+ <h:form id="frm3">
+ <h:outputText
+ value="JSF Component with Event and jsf target (onclick, onmouseout)" />
+
+ <h:panelGrid id="gridID" border="1" style="background-color:green">
+ <h:outputText value="Panel Content" />
+ <rich:effect event="onclick" targetId="imgID" type="Opacity"
+ params="duration:0.5,from:0.4,to:1.0" />
+ <rich:effect event="onmouseout" targetId="imgID" type="Opacity"
+ params="duration:0.5,from:1.0,to:0.4" />
+ </h:panelGrid>
+
+ <h:graphicImage id="imgID" value="/pics/podb109_61.jpg" width="93"
+ height="30px">
+ <rich:effect event="onmouseout" targetId="gridID" type="Opacity"
+ params="duration:0.5,from:0.4,to:1.0" />
+ <rich:effect event="onclick" targetId="gridID" type="Opacity"
+ params="duration:0.5,from:1.0,to:0.4" />
+ </h:graphicImage>
+
+ <f:verbatim>
+ <br />
+ <span onclick="hideFrm3(),showIndexID()"><font color="blue">Close</font></span>
+ </f:verbatim>
+ </h:form>
+
+ <h:form id="frm4">
+ <h:graphicImage id="img_1_ID" value="/pics/asus.jpg" width="200px"
+ height="150px" />
+ <f:verbatim>
+ <br />
+ </f:verbatim>
+ <h:graphicImage id="img_2_ID" value="/pics/benq.jpg" width="200px"
+ height="150px" />
+ <f:verbatim>
+ <br />
+ </f:verbatim>
+ <h:graphicImage id="img_3_ID" value="/pics/toshiba.jpg" width="200px"
+ height="150px" />
+
+ <rich:effect event="onclick" for="img_1_ID" targetId="img_2_ID"
+ type="BlindDown" params="duration:0.8" />
+ <rich:effect event="onclick" for="img_2_ID" targetId="img_1_ID"
+ type="BlindUp" params="duration:0.8" />
+ <rich:effect event="onclick" for="img_3_ID" targetId="img_1_ID"
+ type="Appear" params="duration:0.8" />
+
+ <f:verbatim>
+ <br />
+ <span onclick="hideFrm4(),showIndexID()"><font color="blue">Close</font></span>
+ </f:verbatim>
+ </h:form>
+
+
+ <rich:effect for="indexID" name="hideIndexID" type="BlindUp" />
+ <rich:effect for="indexID" name="showIndexID" type="BlindDown" />
+
+ <rich:effect for="frm1" name="hideFrm1" type="Fade" />
+ <rich:effect for="frm1" name="showFrm1" type="Appear" />
+
+ <rich:effect for="frm2" name="hideFrm2" type="Fade" />
+ <rich:effect for="frm2" name="showFrm2" type="Appear" />
+
+ <rich:effect for="frm3" name="hideFrm3" type="Fade" />
+ <rich:effect for="frm3" name="showFrm3" type="Appear" />
+
+ <rich:effect for="frm4" name="hideFrm4" type="Fade" />
+ <rich:effect for="frm4" name="showFrm4" type="Appear" />
+
+ <rich:effect for="backFrmID" name="hideBackFrm" type="Fade" />
+ <rich:effect for="backFrmID" name="showBackFrm" type="Appear" />
+
+ <h:form id="backFrmID">
+ <h:commandLink value="Back" action="main"></h:commandLink>
+
+ </h:form>
+ </body>
+ </html>
+</f:view>
More information about the richfaces-svn-commits
mailing list