[richfaces-svn-commits] JBoss Rich Faces SVN: r13705 - in trunk/test-applications/facelets/src/main: webapp/InplaceInput and 1 other directory.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Mon Apr 20 11:46:45 EDT 2009


Author: adubovsky
Date: 2009-04-20 11:46:45 -0400 (Mon, 20 Apr 2009)
New Revision: 13705

Modified:
   trunk/test-applications/facelets/src/main/java/inplaceInput/InplaceInput.java
   trunk/test-applications/facelets/src/main/webapp/InplaceInput/InplaceInput.xhtml
   trunk/test-applications/facelets/src/main/webapp/InplaceInput/InplaceInputProperty.xhtml
Log:
+ maxlength test to inplaceInput

Modified: trunk/test-applications/facelets/src/main/java/inplaceInput/InplaceInput.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/inplaceInput/InplaceInput.java	2009-04-20 15:46:36 UTC (rev 13704)
+++ trunk/test-applications/facelets/src/main/java/inplaceInput/InplaceInput.java	2009-04-20 15:46:45 UTC (rev 13705)
@@ -29,6 +29,8 @@
 		private String bindLabel;
 		private String layout;		
 		
+		private int maxLength;
+		
 		public HtmlInplaceInput getMyInplaceInput() {
 			return myInplaceInput;
 		}
@@ -75,8 +77,18 @@
 			valueCL = "---";
 			bindLabel = "Click Binding";
 			layout = "inline";
+			
+			maxLength = 6;
 		}
 		
+		public int getMaxLength() {
+			return maxLength;
+		}
+
+		public void setMaxLength(int maxLength) {
+			this.maxLength = maxLength;
+		}
+
 		public void valueChangeListener(ValueChangeEvent event){
 			valueCL = "valueChangeListener work!";
 		}

Modified: trunk/test-applications/facelets/src/main/webapp/InplaceInput/InplaceInput.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/InplaceInput/InplaceInput.xhtml	2009-04-20 15:46:36 UTC (rev 13704)
+++ trunk/test-applications/facelets/src/main/webapp/InplaceInput/InplaceInput.xhtml	2009-04-20 15:46:45 UTC (rev 13705)
@@ -1,12 +1,18 @@
 
-<f:subview xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:a4j="http://richfaces.org/a4j" xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich" id="inplaceInputSubviewID">
+<f:subview xmlns:ui="http://java.sun.com/jsf/facelets"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:a4j="http://richfaces.org/a4j"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:rich="http://richfaces.org/rich" id="inplaceInputSubviewID">
 
-<h:inputText value="For verify tabbing tabindex=3" size="25" tabindex="3"></h:inputText> <br/>
+	<h:inputText value="For verify tabbing tabindex=3" size="25"
+		tabindex="3"></h:inputText>
+	<br />
 
 This is because such an error can easily be made at programming level, <br />
 and while invisible for the user who does not understand or cannot <br />
 acquire the source code, many of those 
-<rich:inplaceInput id = "inplaceInputId" 
+<rich:inplaceInput id="inplaceInputId"
 		inputWidth="#{inplaceInput.inputWidth}"
 		valueChangeListener="#{inplaceInput.valueChangeListener}"
 		maxInputWidth="#{inplaceInput.maxInputWidth}"
@@ -22,16 +28,12 @@
 		selectOnEdit="#{inplaceInput.selectOnEdit}"
 		showControls="#{inplaceInput.showControls}"
 		rendered="#{inplaceInput.rendered}"
-		immediate="#{inplaceInput.immediate}"
-		layout = "#{inplaceInput.layout}"
-		onblur="#{event.onblur}" 
-		onchange="#{event.onchange}" 
-		onclick="#{event.onclick}" 
-		ondblclick="#{event.ondblclick}" 
+		immediate="#{inplaceInput.immediate}" layout="#{inplaceInput.layout}"
+		onblur="#{event.onblur}" onchange="#{event.onchange}"
+		onclick="#{event.onclick}" ondblclick="#{event.ondblclick}"
 		oneditactivated="#{event.oneditactivated}"
 		oneditactivation="#{event.oneditactivation}"
-		onfocus="#{event.onfocus}"
-		oninputclick="#{event.oninputclick}"
+		onfocus="#{event.onfocus}" oninputclick="#{event.oninputclick}"
 		oninputdblclick="#{event.oninputdblclick}"
 		oninputkeydown="#{event.oninputkeydown}"
 		oninputkeypress="#{event.oninputkeypress}"
@@ -41,24 +43,21 @@
 		oninputmouseout="#{event.oninputmouseout}"
 		oninputmouseover="#{event.oninputmouseover}"
 		oninputmouseup="#{event.oninputmouseup}"
-		onkeydown="#{event.onkeydown}"
-		onkeypress="#{event.onkeypress}"
-		onkeyup="#{event.onkeyup}"
-		onmousedown="#{event.onmousedown}"
-		onmousemove="#{event.onmousemove}"
-		onmouseout="#{event.onmouseout}"
-		onmouseover="#{event.onmouseover}" 
-		onmouseup="#{event.onmouseup}"
+		onkeydown="#{event.onkeydown}" onkeypress="#{event.onkeypress}"
+		onkeyup="#{event.onkeyup}" onmousedown="#{event.onmousedown}"
+		onmousemove="#{event.onmousemove}" onmouseout="#{event.onmouseout}"
+		onmouseover="#{event.onmouseover}" onmouseup="#{event.onmouseup}"
 		onselect="#{event.onselect}"
 		onviewactivated="#{evant.onviewactivated}"
 		onviewactivation="#{event.onviewactivation}"
-		binding="#{inplaceInput.myInplaceInput}" 
-		converter="inplaceInputConverter"
-		converterMessage="Can't convert">
+		binding="#{inplaceInput.myInplaceInput}"
+		converter="inplaceInputConverter" converterMessage="Can't convert"
+		maxlength="#{inplaceInput.maxLength}">
 	</rich:inplaceInput>
  are easy to exploit.
   	<h:panelGrid columns="2">
-		<a4j:commandButton value="reRender" reRender="inplaceInputValueCLID, inplaceInputId"></a4j:commandButton>
+		<a4j:commandButton value="reRender"
+			reRender="inplaceInputValueCLID, inplaceInputId"></a4j:commandButton>
 		<h:outputText id="inplaceInputValueCLID"
 			value="#{inplaceInput.valueCL}"></h:outputText>
 	</h:panelGrid>

Modified: trunk/test-applications/facelets/src/main/webapp/InplaceInput/InplaceInputProperty.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/InplaceInput/InplaceInputProperty.xhtml	2009-04-20 15:46:36 UTC (rev 13704)
+++ trunk/test-applications/facelets/src/main/webapp/InplaceInput/InplaceInputProperty.xhtml	2009-04-20 15:46:45 UTC (rev 13705)
@@ -6,6 +6,10 @@
 	id="inplaceInputPropertySubviewID">
 	<h:commandButton action="#{inplaceInput.add}" value="add test" />
 	<h:panelGrid columns="2">
+		<h:outputText value="maxlength: "></h:outputText>
+		<h:inputText value="#{inplaceInput.maxLength}" onchange="submit();">
+		</h:inputText>
+
 		<h:outputText value="value"></h:outputText>
 		<h:outputText id="inplaceInputValueID" value="#{inplaceInput.value}"
 			onchange="submit();">
@@ -111,5 +115,5 @@
 	<br />
 	<a4j:commandLink
 		onclick="$('formID:inplaceInputSubviewID:inplaceInputId').component.setValue('setValue')"
-		value="setValuel"></a4j:commandLink>	
+		value="setValuel"></a4j:commandLink>
 </f:subview>
\ No newline at end of file




More information about the richfaces-svn-commits mailing list