[richfaces-svn-commits] JBoss Rich Faces SVN: r13704 - in trunk/test-applications/jsp/src/main: webapp/ExtendedDataTable and 1 other directories.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Mon Apr 20 11:46:36 EDT 2009
Author: adubovsky
Date: 2009-04-20 11:46:36 -0400 (Mon, 20 Apr 2009)
New Revision: 13704
Modified:
trunk/test-applications/jsp/src/main/java/inplaceInput/InplaceInput.java
trunk/test-applications/jsp/src/main/webapp/ExtendedDataTable/ExtendedDataTable.jsp
trunk/test-applications/jsp/src/main/webapp/InplaceInput/InplaceInput.jsp
trunk/test-applications/jsp/src/main/webapp/InplaceInput/InplaceInputProperty.jsp
Log:
+ maxlength test to inplaceInput
Modified: trunk/test-applications/jsp/src/main/java/inplaceInput/InplaceInput.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/inplaceInput/InplaceInput.java 2009-04-20 15:41:57 UTC (rev 13703)
+++ trunk/test-applications/jsp/src/main/java/inplaceInput/InplaceInput.java 2009-04-20 15:46:36 UTC (rev 13704)
@@ -9,187 +9,232 @@
import util.componentInfo.ComponentInfo;
public class InplaceInput {
- private String inputMaxLength;
- private String inputWidth;
- private String maxInputWidth;
- private String minInputWidth;
- private boolean required;
- private String requiredMessage;
- private int tabindex;
- private String editEvent;
- private String defaultLabel;
- private String controlsVerticalPosition;
- private String controlsHorizontalPosition;
- private String value;
- private boolean selectOnEdit;
- private boolean showControls;
- private boolean rendered;
- private boolean immediate;
- private String valueCL;
- private HtmlInplaceInput htmlInplaceInput = null;
- private String bindLabel;
- private String layout;
-
- public InplaceInput() {
- inputMaxLength = "200";
- inputWidth = "150";
- maxInputWidth = "250";
- minInputWidth = "100";
- required = false;
- requiredMessage = "requiredMessage";
- tabindex = 1;
- editEvent = "onclick";
- defaultLabel = "defaultLabel";
- controlsVerticalPosition = "top";
- controlsHorizontalPosition = "left";
- value = "errors";
- selectOnEdit = false;
- showControls = false;
- rendered = true;
- immediate = false;
- valueCL = "---";
- bindLabel = "Click Binding";
- layout = "inline";
- }
-
- public HtmlInplaceInput getHtmlInplaceInput() {
- return htmlInplaceInput;
- }
+ private String inputMaxLength;
+ private String inputWidth;
+ private String maxInputWidth;
+ private String minInputWidth;
+ private boolean required;
+ private String requiredMessage;
+ private int tabindex;
+ private String editEvent;
+ private String defaultLabel;
+ private String controlsVerticalPosition;
+ private String controlsHorizontalPosition;
+ private String value;
+ private boolean selectOnEdit;
+ private boolean showControls;
+ private boolean rendered;
+ private boolean immediate;
+ private String valueCL;
+ private HtmlInplaceInput htmlInplaceInput = null;
+ private String bindLabel;
+ private String layout;
- public void setHtmlInplaceInput(HtmlInplaceInput myInplaceInput) {
- this.htmlInplaceInput = myInplaceInput;
- }
+ private int maxLength;
- public void addHtmlInplaceInput(){
- ComponentInfo info = ComponentInfo.getInstance();
- info.addField(htmlInplaceInput);
- }
-
- public String getBindLabel() {
- return bindLabel;
- }
+ public InplaceInput() {
+ inputMaxLength = "200";
+ inputWidth = "150";
+ maxInputWidth = "250";
+ minInputWidth = "100";
+ required = false;
+ requiredMessage = "requiredMessage";
+ tabindex = 1;
+ editEvent = "onclick";
+ defaultLabel = "defaultLabel";
+ controlsVerticalPosition = "top";
+ controlsHorizontalPosition = "left";
+ value = "errors";
+ selectOnEdit = false;
+ showControls = false;
+ rendered = true;
+ immediate = false;
+ valueCL = "---";
+ bindLabel = "Click Binding";
+ layout = "inline";
- public void setBindLabel(String bindLabel) {
- this.bindLabel = bindLabel;
- }
-
- public void checkBinding(ActionEvent actionEvent){
- FacesContext context = FacesContext.getCurrentInstance();
- bindLabel = htmlInplaceInput.getClientId(context);
- }
+ maxLength = 6;
+ }
- public void valueChangeListener(ValueChangeEvent event){
- valueCL = "valueChangeListener work!";
- }
-
- public String getInputMaxLength() {
- return inputMaxLength;
- }
- public void setInputMaxLength(String inputMaxLength) {
- this.inputMaxLength = inputMaxLength;
- }
- public String getInputWidth() {
- return inputWidth;
- }
- public void setInputWidth(String inputWidth) {
- this.inputWidth = inputWidth;
- }
- public String getMaxInputWidth() {
- return maxInputWidth;
- }
- public void setMaxInputWidth(String maxInputWidth) {
- this.maxInputWidth = maxInputWidth;
- }
- public String getMinInputWidth() {
- return minInputWidth;
- }
- public void setMinInputWidth(String minInputWidth) {
- this.minInputWidth = minInputWidth;
- }
- public boolean isRequired() {
- return required;
- }
- public void setRequired(boolean required) {
- this.required = required;
- }
- public String getRequiredMessage() {
- return requiredMessage;
- }
- public void setRequiredMessage(String requiredMessage) {
- this.requiredMessage = requiredMessage;
- }
- public int getTabindex() {
- return tabindex;
- }
- public void setTabindex(int tabindex) {
- this.tabindex = tabindex;
- }
- public String getEditEvent() {
- return editEvent;
- }
- public void setEditEvent(String editEvent) {
- this.editEvent = editEvent;
- }
- public String getDefaultLabel() {
- return defaultLabel;
- }
- public void setDefaultLabel(String defaultLabel) {
- this.defaultLabel = defaultLabel;
- }
- public String getControlsVerticalPosition() {
- return controlsVerticalPosition;
- }
- public void setControlsVerticalPosition(String controlsVerticalPosition) {
- this.controlsVerticalPosition = controlsVerticalPosition;
- }
- public String getControlsHorizontalPosition() {
- return controlsHorizontalPosition;
- }
- public void setControlsHorizontalPosition(String controlsHorizontalPosition) {
- this.controlsHorizontalPosition = controlsHorizontalPosition;
- }
- public String getValue() {
- return value;
- }
- public void setValue(String value) {
- this.value = value;
- }
- public boolean isSelectOnEdit() {
- return selectOnEdit;
- }
- public void setSelectOnEdit(boolean selectOnEdit) {
- this.selectOnEdit = selectOnEdit;
- }
- public boolean isShowControls() {
- return showControls;
- }
- public void setShowControls(boolean showControls) {
- this.showControls = showControls;
- }
- public boolean isRendered() {
- return rendered;
- }
- public void setRendered(boolean rendered) {
- this.rendered = rendered;
- }
- public boolean isImmediate() {
- return immediate;
- }
- public void setImmediate(boolean immediate) {
- this.immediate = immediate;
- }
- public String getValueCL() {
- return valueCL;
- }
- public void setValueCL(String valueCL) {
- this.valueCL = valueCL;
- }
-
- public String getLayout() {
- return layout;
- }
+ public int getMaxLength() {
+ return maxLength;
+ }
- public void setLayout(String layout) {
- this.layout = layout;
- }
+ public void setMaxLength(int maxLength) {
+ this.maxLength = maxLength;
+ }
+
+ public HtmlInplaceInput getHtmlInplaceInput() {
+ return htmlInplaceInput;
+ }
+
+ public void setHtmlInplaceInput(HtmlInplaceInput myInplaceInput) {
+ this.htmlInplaceInput = myInplaceInput;
+ }
+
+ public void addHtmlInplaceInput() {
+ ComponentInfo info = ComponentInfo.getInstance();
+ info.addField(htmlInplaceInput);
+ }
+
+ public String getBindLabel() {
+ return bindLabel;
+ }
+
+ public void setBindLabel(String bindLabel) {
+ this.bindLabel = bindLabel;
+ }
+
+ public void checkBinding(ActionEvent actionEvent) {
+ FacesContext context = FacesContext.getCurrentInstance();
+ bindLabel = htmlInplaceInput.getClientId(context);
+ }
+
+ public void valueChangeListener(ValueChangeEvent event) {
+ valueCL = "valueChangeListener work!";
+ }
+
+ public String getInputMaxLength() {
+ return inputMaxLength;
+ }
+
+ public void setInputMaxLength(String inputMaxLength) {
+ this.inputMaxLength = inputMaxLength;
+ }
+
+ public String getInputWidth() {
+ return inputWidth;
+ }
+
+ public void setInputWidth(String inputWidth) {
+ this.inputWidth = inputWidth;
+ }
+
+ public String getMaxInputWidth() {
+ return maxInputWidth;
+ }
+
+ public void setMaxInputWidth(String maxInputWidth) {
+ this.maxInputWidth = maxInputWidth;
+ }
+
+ public String getMinInputWidth() {
+ return minInputWidth;
+ }
+
+ public void setMinInputWidth(String minInputWidth) {
+ this.minInputWidth = minInputWidth;
+ }
+
+ public boolean isRequired() {
+ return required;
+ }
+
+ public void setRequired(boolean required) {
+ this.required = required;
+ }
+
+ public String getRequiredMessage() {
+ return requiredMessage;
+ }
+
+ public void setRequiredMessage(String requiredMessage) {
+ this.requiredMessage = requiredMessage;
+ }
+
+ public int getTabindex() {
+ return tabindex;
+ }
+
+ public void setTabindex(int tabindex) {
+ this.tabindex = tabindex;
+ }
+
+ public String getEditEvent() {
+ return editEvent;
+ }
+
+ public void setEditEvent(String editEvent) {
+ this.editEvent = editEvent;
+ }
+
+ public String getDefaultLabel() {
+ return defaultLabel;
+ }
+
+ public void setDefaultLabel(String defaultLabel) {
+ this.defaultLabel = defaultLabel;
+ }
+
+ public String getControlsVerticalPosition() {
+ return controlsVerticalPosition;
+ }
+
+ public void setControlsVerticalPosition(String controlsVerticalPosition) {
+ this.controlsVerticalPosition = controlsVerticalPosition;
+ }
+
+ public String getControlsHorizontalPosition() {
+ return controlsHorizontalPosition;
+ }
+
+ public void setControlsHorizontalPosition(String controlsHorizontalPosition) {
+ this.controlsHorizontalPosition = controlsHorizontalPosition;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public boolean isSelectOnEdit() {
+ return selectOnEdit;
+ }
+
+ public void setSelectOnEdit(boolean selectOnEdit) {
+ this.selectOnEdit = selectOnEdit;
+ }
+
+ public boolean isShowControls() {
+ return showControls;
+ }
+
+ public void setShowControls(boolean showControls) {
+ this.showControls = showControls;
+ }
+
+ public boolean isRendered() {
+ return rendered;
+ }
+
+ public void setRendered(boolean rendered) {
+ this.rendered = rendered;
+ }
+
+ public boolean isImmediate() {
+ return immediate;
+ }
+
+ public void setImmediate(boolean immediate) {
+ this.immediate = immediate;
+ }
+
+ public String getValueCL() {
+ return valueCL;
+ }
+
+ public void setValueCL(String valueCL) {
+ this.valueCL = valueCL;
+ }
+
+ public String getLayout() {
+ return layout;
+ }
+
+ public void setLayout(String layout) {
+ this.layout = layout;
+ }
}
Modified: trunk/test-applications/jsp/src/main/webapp/ExtendedDataTable/ExtendedDataTable.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/ExtendedDataTable/ExtendedDataTable.jsp 2009-04-20 15:41:57 UTC (rev 13703)
+++ trunk/test-applications/jsp/src/main/webapp/ExtendedDataTable/ExtendedDataTable.jsp 2009-04-20 15:46:36 UTC (rev 13704)
@@ -40,7 +40,7 @@
</style>
<rich:extendedDataTable id="demoTable"
value="#{extendedDataTableBean.dataModel}" var="patient"
- style="margin: 0 auto;"
+ style="margin: 0 auto;"
rows="#{extendedDataTableControlBean.rowsNumber}"
width="#{extendedDataTableControlBean.width}"
height="#{extendedDataTableControlBean.height}"
@@ -49,7 +49,7 @@
selectionMode="#{extendedDataTableControlBean.selectionMode}"
selection="#{extendedDataTableBean.selection}" rowKeyVar="rkvar"
tableState="#{extendedDataTableBean.tableState}"
- binding="#{extendedDataTableBean.extDTable}"
+ binding="#{extendedDataTableControlBean.extDTable}"
onclick="#{event.onclick}" ondblclick="#{event.ondblclick}"
onkeydown="#{event.onkeydown}" onkeypress="#{event.onkeypress}"
onkeyup="#{event.onkeyup}" onmousedown="#{event.onmousedown}"
@@ -73,7 +73,7 @@
rendered="#{extendedDataTableControlBean.rendered}">
<rich:column id="id" headerClass="dataTableHeader" width="25%"
- label="First name" sortable="true" sortBy="#{patient.id}"
+ label="id" sortable="true" sortBy="#{patient.id}"
filterBy="#{patient.id}" filterEvent="onkeyup">
<f:facet name="header">
<h:outputText value="id" />
@@ -81,7 +81,7 @@
<h:outputText value="#{patient.id}" />
</rich:column>
<rich:column id="firstName" headerClass="dataTableHeader" width="25%"
- label="First name" sortable="true" sortBy="#{patient.firstName}"
+ label="FirstName" sortable="true" sortBy="#{patient.firstName}"
filterBy="#{patient.firstName}" filterEvent="onkeyup">
<f:facet name="header">
<h:outputText value="First name" />
Modified: trunk/test-applications/jsp/src/main/webapp/InplaceInput/InplaceInput.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/InplaceInput/InplaceInput.jsp 2009-04-20 15:41:57 UTC (rev 13703)
+++ trunk/test-applications/jsp/src/main/webapp/InplaceInput/InplaceInput.jsp 2009-04-20 15:46:36 UTC (rev 13704)
@@ -15,56 +15,47 @@
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"
- valueChangeListener="#{inplaceInput.valueChangeListener}"
- converter="inplaceInputConverter"
- converterMessage="Can't convert"
- inputWidth="#{inplaceInput.inputWidth}"
- maxInputWidth="#{inplaceInput.maxInputWidth}"
- minInputWidth="#{inplaceInput.minInputWidth}"
- required="#{inplaceInput.required}"
- requiredMessage="#{inplaceInput.requiredMessage}"
- tabindex="#{inplaceInput.tabindex}"
- editEvent="#{inplaceInput.editEvent}"
- defaultLabel="#{inplaceInput.defaultLabel}"
- controlsVerticalPosition="#{inplaceInput.controlsVerticalPosition}"
- controlsHorizontalPosition="#{inplaceInput.controlsHorizontalPosition}"
- value="#{inplaceInput.value}"
- 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}"
- oneditactivated="#{event.oneditactivated}"
- oneditactivation="#{event.oneditactivation}"
- onfocus="#{event.onfocus}"
- oninputclick="#{event.oninputclick}"
- oninputdblclick="#{event.oninputdblclick}"
- oninputkeydown="#{event.oninputkeydown}"
- oninputkeypress="#{event.oninputkeypress}"
- oninputkeyup="#{event.oninputkeyup}"
- oninputmousedown="#{event.oninputmousedown}"
- oninputmousemove="#{event.oninputmousemove}"
- 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}"
- onselect="#{event.onselect}"
- onviewactivated="#{event.onviewactivated}"
- onviewactivation="#{event.onviewactivation}"
- binding="#{inplaceInput.htmlInplaceInput}" >
+ <rich:inplaceInput id="inplaceInputId"
+ valueChangeListener="#{inplaceInput.valueChangeListener}"
+ converter="inplaceInputConverter" converterMessage="Can't convert"
+ inputWidth="#{inplaceInput.inputWidth}"
+ maxInputWidth="#{inplaceInput.maxInputWidth}"
+ minInputWidth="#{inplaceInput.minInputWidth}"
+ required="#{inplaceInput.required}"
+ requiredMessage="#{inplaceInput.requiredMessage}"
+ tabindex="#{inplaceInput.tabindex}"
+ editEvent="#{inplaceInput.editEvent}"
+ defaultLabel="#{inplaceInput.defaultLabel}"
+ controlsVerticalPosition="#{inplaceInput.controlsVerticalPosition}"
+ controlsHorizontalPosition="#{inplaceInput.controlsHorizontalPosition}"
+ value="#{inplaceInput.value}"
+ 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}"
+ oneditactivated="#{event.oneditactivated}"
+ oneditactivation="#{event.oneditactivation}"
+ onfocus="#{event.onfocus}" oninputclick="#{event.oninputclick}"
+ oninputdblclick="#{event.oninputdblclick}"
+ oninputkeydown="#{event.oninputkeydown}"
+ oninputkeypress="#{event.oninputkeypress}"
+ oninputkeyup="#{event.oninputkeyup}"
+ oninputmousedown="#{event.oninputmousedown}"
+ oninputmousemove="#{event.oninputmousemove}"
+ 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}"
+ onselect="#{event.onselect}"
+ onviewactivated="#{event.onviewactivated}"
+ onviewactivation="#{event.onviewactivation}"
+ binding="#{inplaceInput.htmlInplaceInput}"
+ maxlength="#{inplaceInput.maxLength}">
</rich:inplaceInput>
are easy to exploit.
Modified: trunk/test-applications/jsp/src/main/webapp/InplaceInput/InplaceInputProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/InplaceInput/InplaceInputProperty.jsp 2009-04-20 15:41:57 UTC (rev 13703)
+++ trunk/test-applications/jsp/src/main/webapp/InplaceInput/InplaceInputProperty.jsp 2009-04-20 15:46:36 UTC (rev 13704)
@@ -4,8 +4,13 @@
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<f:subview id="inplaceInputPropertySubviewID">
-<h:commandButton value="add test" action="#{inplaceInput.addHtmlInplaceInput}"></h:commandButton>
+ <h:commandButton value="add test"
+ action="#{inplaceInput.addHtmlInplaceInput}"></h:commandButton>
<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}">
</h:outputText>
@@ -118,15 +123,17 @@
<h:outputText value="Component Control test"
style="FONT-WEIGHT: bold;"></h:outputText>
<br />
- <a href="#" id="setValueID">setValue('testValue: ~!@#$%^&*()_+=-[]{}"|;<>/')</a>
+ <a href="#" id="setValueID">setValue('testValue:
+ ~!@#$%^&*()_+=-[]{}"|;/')</a>
<br />
</f:verbatim>
<br />
<rich:componentControl attachTo="setValueID" event="onclick"
for="inplaceInputId" operation="setValue">
- <f:param name="value" value="testValue: ~!@#$%^&*()_+=-[]{}|;<>/"/>
+ <f:param name="value" value="testValue: ~!@#$%^&*()_+=-[]{}|;/>/" />
</rich:componentControl>
<br />
+ <%--
<div style="FONT-WEIGHT: bold;">rich:findComponent</div>
<h:panelGrid columns="2">
<rich:column>
@@ -136,4 +143,5 @@
<h:outputText value="#{rich:findComponent('inplaceInputId').value}" />
</rich:column>
</h:panelGrid>
+ --%>
</f:subview>
\ No newline at end of file
More information about the richfaces-svn-commits
mailing list