Author: abelevich
Date: 2008-03-11 12:51:20 -0400 (Tue, 11 Mar 2008)
New Revision: 6707
Modified:
trunk/samples/inplaceInput-sample/src/main/java/org/richfaces/samples/Bean.java
trunk/samples/inplaceInput-sample/src/main/webapp/pages/index.jsp
trunk/samples/inplaceInput-sample/src/main/webapp/pages/index.xhtml
Log:
extend demo
Modified: trunk/samples/inplaceInput-sample/src/main/java/org/richfaces/samples/Bean.java
===================================================================
---
trunk/samples/inplaceInput-sample/src/main/java/org/richfaces/samples/Bean.java 2008-03-11
16:44:41 UTC (rev 6706)
+++
trunk/samples/inplaceInput-sample/src/main/java/org/richfaces/samples/Bean.java 2008-03-11
16:51:20 UTC (rev 6707)
@@ -1,5 +1,7 @@
package org.richfaces.samples;
+import javax.faces.event.ValueChangeEvent;
+
public class Bean {
private boolean showControls;
@@ -16,7 +18,7 @@
private String width;
- private String minInputWidth = "70px";
+ private String minInputWidth = "40px";
private String maxInputWidth = "150px" ;
@@ -201,4 +203,8 @@
public void setInputMaxLength(Integer inputMaxLength) {
this.inputMaxLength = inputMaxLength;
}
+
+ public void valueChange(ValueChangeEvent event) {
+ System.out.println("Bean.valueChange() " + event.getComponent());
+ }
}
Modified: trunk/samples/inplaceInput-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/samples/inplaceInput-sample/src/main/webapp/pages/index.jsp 2008-03-11 16:44:41
UTC (rev 6706)
+++ trunk/samples/inplaceInput-sample/src/main/webapp/pages/index.jsp 2008-03-11 16:51:20
UTC (rev 6707)
@@ -4,7 +4,11 @@
<%@ taglib
uri="http://labs.jboss.com/jbossrichfaces/ui/inplaceInput"
prefix="ii"%>
<html>
<head>
- <title></title>
+ <title>InplaceInput Sample</title>
+ <style>
+ .tab_example {width : 300px; border-top:1px solid #c0c0c0; border-left:1px solid
#c0c0c0;}
+ .tab_example td{width : 150px; border-bottom:1px solid #c0c0c0; border-right:1px
solid #c0c0c0;}
+ </style>
</head>
<body>
<f:view>
@@ -68,10 +72,10 @@
<div style="width: 300px">
Fresh off his victory in the Florida primary, Sen. John McCain is poised to
take another big prize. Former
<ii:inplaceInput
+ valueChangeListener="#{bean.valueChange}"
value="#{bean.value}"
selectOnEdit="#{bean.selectOnEdit}"
showControls="#{bean.showControls}"
- defaultLabel="#{bean.defaultLabel}"
inputWidth="#{bean.width}"
minInputWidth="#{bean.minInputWidth}"
maxInputWidth="#{bean.maxInputWidth}"
@@ -84,12 +88,101 @@
onviewactivated="#{bean.onviewactivated}"
saveControlIcon="#{bean.saveControlIcon}"
cancelControlIcon="#{bean.cancelControlIcon}"
- tabindex="#{bean.tabindex}"
+ tabindex="#{bean.tabindex}"
+ layout="inline"
</ii:inplaceInput>
Mayor Rudy Giuliani plans to drop out and endorse McCain, two GOP sources said.
That would give McCain added momentum heading into a debate Wednesday and next week's
Super Tuesday contests
</div>
<h:commandButton action="none"
value="submit"></h:commandButton>
+
+ <table class="tab_example" border="0"
cellpadding="0" cellspacing="0">
+ <tr>
+ <td>
+ <ii:inplaceInput
+ value="#{bean.value}"
+ selectOnEdit="#{bean.selectOnEdit}"
+ showControls="#{bean.showControls}"
+ inputWidth="#{bean.width}"
+ minInputWidth="#{bean.minInputWidth}"
+ maxInputWidth="#{bean.maxInputWidth}"
+ inputMaxLength="#{bean.inputMaxLength}"
+ controlsVerticalPosition="#{bean.controlsPosition}"
+ controlsHorizontalPosition="#{bean.controlsHorizontalAlign}"
+ editEvent="#{bean.editEvent}"
+ oneditactivation="#{bean.oneditactivation}"
+ onviewactivation="#{bean.onviewactivation}"
+ oneditactivated="#{bean.oneditactivated}"
+ onviewactivated="#{bean.onviewactivated}"
+ saveControlIcon="#{bean.saveControlIcon}"
+ cancelControlIcon="#{bean.cancelControlIcon}"
+ tabindex="#{bean.tabindex}"/>
+ </td>
+ <td>
+ <ii:inplaceInput
+ value="#{bean.value}"
+ selectOnEdit="#{bean.selectOnEdit}"
+ showControls="#{bean.showControls}"
+ inputWidth="#{bean.width}"
+ minInputWidth="#{bean.minInputWidth}"
+ maxInputWidth="#{bean.maxInputWidth}"
+ inputMaxLength="#{bean.inputMaxLength}"
+ controlsVerticalPosition="#{bean.controlsPosition}"
+ controlsHorizontalPosition="#{bean.controlsHorizontalAlign}"
+ editEvent="#{bean.editEvent}"
+ oneditactivation="#{bean.oneditactivation}"
+ onviewactivation="#{bean.onviewactivation}"
+ oneditactivated="#{bean.oneditactivated}"
+ onviewactivated="#{bean.onviewactivated}"
+ saveControlIcon="#{bean.saveControlIcon}"
+ cancelControlIcon="#{bean.cancelControlIcon}"
+ tabindex="#{bean.tabindex}"/>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <ii:inplaceInput
+ value="#{bean.value}"
+ selectOnEdit="#{bean.selectOnEdit}"
+ showControls="#{bean.showControls}"
+ inputWidth="#{bean.width}"
+ minInputWidth="#{bean.minInputWidth}"
+ maxInputWidth="#{bean.maxInputWidth}"
+ inputMaxLength="#{bean.inputMaxLength}"
+ controlsVerticalPosition="#{bean.controlsPosition}"
+ controlsHorizontalPosition="#{bean.controlsHorizontalAlign}"
+ editEvent="#{bean.editEvent}"
+ oneditactivation="#{bean.oneditactivation}"
+ onviewactivation="#{bean.onviewactivation}"
+ oneditactivated="#{bean.oneditactivated}"
+ onviewactivated="#{bean.onviewactivated}"
+ saveControlIcon="#{bean.saveControlIcon}"
+ cancelControlIcon="#{bean.cancelControlIcon}"
+ tabindex="#{bean.tabindex}"/>
+ </td>
+ <td>
+ <ii:inplaceInput
+ value="#{bean.value}"
+ selectOnEdit="#{bean.selectOnEdit}"
+ showControls="#{bean.showControls}"
+ inputWidth="#{bean.width}"
+ minInputWidth="#{bean.minInputWidth}"
+ maxInputWidth="#{bean.maxInputWidth}"
+ inputMaxLength="#{bean.inputMaxLength}"
+ controlsVerticalPosition="#{bean.controlsPosition}"
+ controlsHorizontalPosition="#{bean.controlsHorizontalAlign}"
+ editEvent="#{bean.editEvent}"
+ oneditactivation="#{bean.oneditactivation}"
+ onviewactivation="#{bean.onviewactivation}"
+ oneditactivated="#{bean.oneditactivated}"
+ onviewactivated="#{bean.onviewactivated}"
+ saveControlIcon="#{bean.saveControlIcon}"
+ cancelControlIcon="#{bean.cancelControlIcon}"
+ tabindex="#{bean.tabindex}"/>
+ </td>
+ </tr>
+ <table>
+
</h:form>
</f:view>
</body>
Modified: trunk/samples/inplaceInput-sample/src/main/webapp/pages/index.xhtml
===================================================================
--- trunk/samples/inplaceInput-sample/src/main/webapp/pages/index.xhtml 2008-03-11
16:44:41 UTC (rev 6706)
+++ trunk/samples/inplaceInput-sample/src/main/webapp/pages/index.xhtml 2008-03-11
16:51:20 UTC (rev 6707)
@@ -7,7 +7,11 @@
xmlns:ii="http://labs.jboss.com/jbossrichfaces/ui/inplaceInput"...
<head>
- <title></title>
+ <title>InplaceInput Facelets Sample </title>
+ <style>
+ .tab_example {width : 300px; border-top:1px solid #c0c0c0; border-left:1px solid
#c0c0c0;}
+ .tab_example td{width : 150px; border-bottom:1px solid #c0c0c0; border-right:1px
solid #c0c0c0;}
+ </style>
</head>
<body>
<f:view>
@@ -78,7 +82,6 @@
value="#{bean.value}"
selectOnEdit="#{bean.selectOnEdit}"
showControls="#{bean.showControls}"
- defaultLabel="#{bean.defaultLabel}"
inputWidth="#{bean.width}"
minInputWidth="#{bean.minInputWidth}"
maxInputWidth="#{bean.maxInputWidth}"
@@ -97,6 +100,93 @@
</ii:inplaceInput>
Mayor Rudy Giuliani plans to drop out and endorse McCain, two GOP sources said.
That would give McCain added momentum heading into a debate Wednesday and next week's
Super Tuesday contests
</div>
+ <table class="tab_example" border="0"
cellpadding="0" cellspacing="0">
+ <tr>
+ <td>
+ <ii:inplaceInput
+ value="#{bean.value}"
+ selectOnEdit="#{bean.selectOnEdit}"
+ showControls="#{bean.showControls}"
+ inputWidth="#{bean.width}"
+ minInputWidth="#{bean.minInputWidth}"
+ maxInputWidth="#{bean.maxInputWidth}"
+ inputMaxLength="#{bean.inputMaxLength}"
+ controlsPosition="#{bean.controlsPosition}"
+ controlsHorizontalAlign="#{bean.controlsHorizontalAlign}"
+ editEvent="#{bean.editEvent}"
+ oneditactivation="#{bean.oneditactivation}"
+ onviewactivation="#{bean.onviewactivation}"
+ oneditactivated="#{bean.oneditactivated}"
+ onviewactivated="#{bean.onviewactivated}"
+ saveControlIcon="#{bean.saveControlIcon}"
+ cancelControlIcon="#{bean.cancelControlIcon}"
+ tabindex="#{bean.tabindex}">
+ </td>
+ <td>
+ <ii:inplaceInput
+ value="#{bean.value}"
+ selectOnEdit="#{bean.selectOnEdit}"
+ showControls="#{bean.showControls}"
+ inputWidth="#{bean.width}"
+ minInputWidth="#{bean.minInputWidth}"
+ maxInputWidth="#{bean.maxInputWidth}"
+ inputMaxLength="#{bean.inputMaxLength}"
+ controlsPosition="#{bean.controlsPosition}"
+ controlsHorizontalAlign="#{bean.controlsHorizontalAlign}"
+ editEvent="#{bean.editEvent}"
+ oneditactivation="#{bean.oneditactivation}"
+ onviewactivation="#{bean.onviewactivation}"
+ oneditactivated="#{bean.oneditactivated}"
+ onviewactivated="#{bean.onviewactivated}"
+ saveControlIcon="#{bean.saveControlIcon}"
+ cancelControlIcon="#{bean.cancelControlIcon}"
+ tabindex="#{bean.tabindex}">
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <ii:inplaceInput
+ value="#{bean.value}"
+ selectOnEdit="#{bean.selectOnEdit}"
+ showControls="#{bean.showControls}"
+ inputWidth="#{bean.width}"
+ minInputWidth="#{bean.minInputWidth}"
+ maxInputWidth="#{bean.maxInputWidth}"
+ inputMaxLength="#{bean.inputMaxLength}"
+ controlsPosition="#{bean.controlsPosition}"
+ controlsHorizontalAlign="#{bean.controlsHorizontalAlign}"
+ editEvent="#{bean.editEvent}"
+ oneditactivation="#{bean.oneditactivation}"
+ onviewactivation="#{bean.onviewactivation}"
+ oneditactivated="#{bean.oneditactivated}"
+ onviewactivated="#{bean.onviewactivated}"
+ saveControlIcon="#{bean.saveControlIcon}"
+ cancelControlIcon="#{bean.cancelControlIcon}"
+ tabindex="#{bean.tabindex}">
+ </td>
+ <td>
+ <ii:inplaceInput
+ value="#{bean.value}"
+ selectOnEdit="#{bean.selectOnEdit}"
+ showControls="#{bean.showControls}"
+ inputWidth="#{bean.width}"
+ minInputWidth="#{bean.minInputWidth}"
+ maxInputWidth="#{bean.maxInputWidth}"
+ inputMaxLength="#{bean.inputMaxLength}"
+ controlsPosition="#{bean.controlsPosition}"
+ controlsHorizontalAlign="#{bean.controlsHorizontalAlign}"
+ editEvent="#{bean.editEvent}"
+ oneditactivation="#{bean.oneditactivation}"
+ onviewactivation="#{bean.onviewactivation}"
+ oneditactivated="#{bean.oneditactivated}"
+ onviewactivated="#{bean.onviewactivated}"
+ saveControlIcon="#{bean.saveControlIcon}"
+ cancelControlIcon="#{bean.cancelControlIcon}"
+ tabindex="#{bean.tabindex}">
+ </td>
+ </tr>
+ <table>
+
<h:commandButton action="none"
value="submit"></h:commandButton>
</h:form>
</f:view>