Author: ilya_shaikovsky
Date: 2008-03-20 09:49:29 -0400 (Thu, 20 Mar 2008)
New Revision: 6991
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceInput/examples/simpleDefault.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceInput/examples/simpleWithControls.xhtml
Removed:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceInput/examples/simple.xhtml
Modified:
trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties
trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceInput/examples/blockInplace.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceInput/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/toolBar.xhtml
Log:
Modified:
trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties
===================================================================
---
trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties 2008-03-20
12:43:20 UTC (rev 6990)
+++
trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties 2008-03-20
13:49:29 UTC (rev 6991)
@@ -77,6 +77,6 @@
comboBox= richInputs, Combo Box, \t\t/images/ico_ComboBox.gif,
\t\t/images/cn_ComboBox.gif, RichFacesComponentsLibrary.html\#comboBox,
jbossrichfaces/freezone/docs/tlddoc/rich/comboBox.html,
jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIcomboBox.html,
\t\t\t\t\t/richfaces/comboBox.jsf
inplaceInput= richInputs, Inplace Input,
\t\t/images/ico_InplaceInput.gif, \t\t/images/cn_InplaceInput.gif,
RichFacesComponentsLibrary.html\#inplaceInput,
jbossrichfaces/freezone/docs/tlddoc/rich/inplaceInput.html,
jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIinplaceInput.html,
\t\t\t\t\t/richfaces/inplaceInput.jsf
inplaceSelect= richInputs, Inplace Select,
\t\t/images/ico_InplaceSelect.gif, \t\t/images/cn_InplaceSelect.gif,
RichFacesComponentsLibrary.html\#inplaceSelect,
jbossrichfaces/freezone/docs/tlddoc/rich/inplaceSelect.html,
jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIinplaceSelect.html,
\t\t\t\t\t/richfaces/inplaceSelect.jsf
-sorting= richDataIterators, Sorting Feature, \t\t/images/ico_DataTable.gif,
\t\t/images/cn_DataTable.gif, RichFacesComponentsLibrary.html\#dataTable,
jbossrichfaces/freezone/docs/tlddoc/rich/dataTable.html,
jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIdataTable.html,
\t\t\t\t\t/richfaces/sortingFeature.jsf
-filtering= richDataIterators, Filtering Feature, \t\t/images/ico_DataTable.gif,
\t\t/images/cn_DataTable.gif,
RichFacesComponentsLibrary.html\#dataTable,
jbossrichfaces/freezone/docs/tlddoc/rich/dataTable.html,
jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIdataTable.html,
\t\t\t\t\t/richfaces/filteringFeature.jsf
-columns = richDataIterators, \t\tColumns, \t\t/images/ico_columns.gif,
\t\t/images/cn_Columns.gif, \t\t\tRichFacesComponentsLibrary.html\#columns,
jbossrichfaces/freezone/docs/tlddoc/rich/columns.html,
jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIColumns.html,
\t\t\t\t\t/richfaces/columns.jsf
\ No newline at end of file
+sorting= richDataIterators, Table Sorting, \t\t/images/ico_DataTable.gif,
\t\t/images/cn_DataTable.gif, RichFacesComponentsLibrary.html\#dataTable,
jbossrichfaces/freezone/docs/tlddoc/rich/dataTable.html,
jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIdataTable.html,
\t\t\t\t\t/richfaces/sortingFeature.jsf
+filtering= richDataIterators, Table Filtering, \t\t/images/ico_DataTable.gif,
\t\t/images/cn_DataTable.gif, RichFacesComponentsLibrary.html\#dataTable,
jbossrichfaces/freezone/docs/tlddoc/rich/dataTable.html,
jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIdataTable.html,
\t\t\t\t\t/richfaces/filteringFeature.jsf
+columns =richDataIterators, \t\tColumns, \t\t/images/ico_columns.gif,
\t\t/images/cn_Columns.gif, \t\t\tRichFacesComponentsLibrary.html\#columns,
jbossrichfaces/freezone/docs/tlddoc/rich/columns.html,
jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIColumns.html,
\t\t\t\t\t/richfaces/columns.jsf
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml 2008-03-20 12:43:20 UTC
(rev 6990)
+++ trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml 2008-03-20 13:49:29 UTC
(rev 6991)
@@ -45,7 +45,7 @@
</context-param>
<context-param>
<param-name>org.ajax4jsf.xmlparser.ORDER</param-name>
- <param-value>NEKO</param-value>
+ <param-value>NONE, NEKO, TIDY</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.CONTROL_SKINNING</param-name>
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceInput/examples/blockInplace.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceInput/examples/blockInplace.xhtml 2008-03-20
12:43:20 UTC (rev 6990)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceInput/examples/blockInplace.xhtml 2008-03-20
13:49:29 UTC (rev 6991)
@@ -1,37 +1,73 @@
<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:rich="http://richfaces.org/rich">
- <style>
- .rich-inplace-view, .rich-inplace-changed{
- border:none;
- }
- .rich-inplace-input-view-hover, .rich-inplace-input-changed-hover{
- color:#{a4jSkin.generalTextColor};
- background-color:#{a4jSkin.tipBorderColor};
- }
-
- </style>
- <rich:dataTable value="#{dataTableScrollerBean.tenRandomCars}"
var="car" width="350px">
- <rich:column>
- <f:facet name="header">
- <h:outputText value="Make"/>
- </f:facet>
- <h:outputText value="#{car.make}"/>
- </rich:column>
- <rich:column>
- <f:facet name="header">
- <h:outputText value="Model"/>
- </f:facet>
- <h:outputText value="#{car.model}"/>
- </rich:column>
- <rich:column>
- <f:facet name="header">
- <h:outputText value="Price"/>
- </f:facet>
- <rich:inplaceInput layout="block" value="#{car.price}"/>
- </rich:column>
- </rich:dataTable>
+
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">
+ <style>
+ .inplace{
+ border: none;
+ }
+ .hover {
+ color: #{a4jSkin.generalTextColor};
+ background-color :#{a4jSkin.tipBorderColor};
+ }
+ .columns {
+ width: 33%;
+ }
+ </style>
+ <h:form>
+ <h:panelGrid columns="2" columnClasses=",top">
+ <rich:dataTable value="#{dataTableScrollerBean.allCars}"
var="car"
+ width="350px" columnClasses=",columns,columns,columns"
rows="15"
+ id="table" rowKeyVar="row">
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Row"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{row+1}"></h:outputText>
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Make" />
+ </f:facet>
+ <h:outputText value="#{car.make}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Model"/>
+ </f:facet>
+ <h:outputText value="#{car.model}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Price" />
+ </f:facet>
+ <rich:inplaceInput layout="block" value="#{car.price}"
+ converterMessage="Price value should be integer. Price at row #{row+1}
can't be changed."
+ id="inplace" required="true"
+ requiredMessage="Price at row #{row+1} wasn't filled. Value can't be
changed."
+ changedHoverClass="hover" viewHoverClass="hover"
+ styleClass="inplace" changedClass="inplace"
+ selectOnEdit="true">
+
+ <a4j:support event="onviewactivated" reRender="table,
messages"
+ bypassUpdates="true" ajaxSingle="true" />
+
+ </rich:inplaceInput>
+ </rich:column>
+ <f:facet name="footer">
+ <rich:datascroller ajaxSingle="false"/>
+ </f:facet>
+ </rich:dataTable>
+ <rich:panel id="messages">
+ <f:facet name="header">
+ <h:outputText value="Data Validation
Results:"></h:outputText>
+ </f:facet>
+ <rich:messages />
+ <h:outputText value="All Prices Valid"
+ rendered="#{facesContext.maximumSeverity==null}" />
+ </rich:panel>
+ </h:panelGrid>
+ </h:form>
</ui:composition>
\ No newline at end of file
Deleted:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceInput/examples/simple.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceInput/examples/simple.xhtml 2008-03-20
12:43:20 UTC (rev 6990)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceInput/examples/simple.xhtml 2008-03-20
13:49:29 UTC (rev 6991)
@@ -1,10 +0,0 @@
-<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:rich="http://richfaces.org/rich">
-
- <rich:inplaceInput defaultLabel="Click here to edit"/>
-
-</ui:composition>
\ No newline at end of file
Copied:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceInput/examples/simpleDefault.xhtml
(from rev 6984,
trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceInput/examples/simple.xhtml)
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceInput/examples/simpleDefault.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceInput/examples/simpleDefault.xhtml 2008-03-20
13:49:29 UTC (rev 6991)
@@ -0,0 +1,19 @@
+<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:rich="http://richfaces.org/rich">
+
+ <rich:panel style="width:200px;">
+ <f:facet name="header">
+ <h:outputText value="Person Info"></h:outputText>
+ </f:facet>
+ <h:panelGrid columns="2">
+ <h:outputText value="Name: "/>
+ <rich:inplaceInput defaultLabel="John Smith"/>
+ <h:outputText value="Email:"/>
+ <rich:inplaceInput defaultLabel="john(a)gmail.com"/>
+ </h:panelGrid>
+ </rich:panel>
+</ui:composition>
\ No newline at end of file
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceInput/examples/simpleWithControls.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceInput/examples/simpleWithControls.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceInput/examples/simpleWithControls.xhtml 2008-03-20
13:49:29 UTC (rev 6991)
@@ -0,0 +1,21 @@
+<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:rich="http://richfaces.org/rich">
+
+ <rich:panel style="width:200px;">
+ <f:facet name="header">
+ <h:outputText value="Person Info"/>
+ </f:facet>
+ <h:panelGrid columns="2">
+ <h:outputText value="Name: "/>
+ <rich:inplaceInput defaultLabel="John Smith"
+ showControls="true"/>
+ <h:outputText value="Email:"/>
+ <rich:inplaceInput defaultLabel="john(a)gmail.com"
+ showControls="true"/>
+ </h:panelGrid>
+ </rich:panel>
+</ui:composition>
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceInput/usage.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceInput/usage.xhtml 2008-03-20
12:43:20 UTC (rev 6990)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceInput/usage.xhtml 2008-03-20
13:49:29 UTC (rev 6991)
@@ -7,28 +7,56 @@
xmlns:rich="http://richfaces.org/rich">
<ui:composition template="/templates/component-sample.xhtml">
<ui:define name="sample">
-
+ <style>
+ .top{
+ vertical-align:top;
+ }
+ .equals {
+ width: 45%;
+ }
+ </style>
<p>
<b>InplaceInput </b>is a simple input component which displays current
value as
<i>outputText </i>and switches to <i>inputText </i>based
representation after defined event
to allow edit this value.
</p>
-
+
<p>
- You could try simplest example below. Just click on label to edit the value and
+ You could try two simplest examples below. For the first demo - just click on label
+ to edit the value and
click somewhere outside the component to store this value(Or just press ENTER
button).
</p>
-
- <div class="sample-container" >
- <ui:include src="/richfaces/inplaceInput/examples/simple.xhtml"/>
- <ui:include src="/templates/include/sourceview.xhtml">
- <ui:param name="sourcepath"
value="/richfaces/inplaceInput/examples/simple.xhtml"/>
- </ui:include>
- </div>
-
+ <p>
+ Second example has controls for components enabled with <b>showControls
</b>attribute.
+ These controls should
+ be used in order to apply value or cancel editing.
+ </p>
+ <h:panelGrid columns="2" columnClasses="top equals,top equals"
width="90%">
+ <div class="sample-container" jsfc="h:panelGroup">
+ <ui:include
src="/richfaces/inplaceInput/examples/simpleDefault.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/inplaceInput/examples/simpleDefault.xhtml"/>
+ </ui:include>
+ </div>
+ <div class="sample-container" jsfc="h:panelGroup">
+ <ui:include
src="/richfaces/inplaceInput/examples/simpleWithControls.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/inplaceInput/examples/simpleWithControls.xhtml"/>
+ </ui:include>
+ </div>
+ </h:panelGrid>
<p>
- EDITABLE CELLs IN TABLE DESCRIPTION
- </p>
+ Inplace Input could be rendered with <i>span </i>or <i>div
</i>elements to display its value.
+ To change default span output use <b>layout </b>attribute with
<i>block </i>value.
+ </p>
+ <p>
+ Next example shows you Inplace Input component usage in dataTable. Custom event
+ fired on component changing state used in this example to fire Ajax
+ validation for the value entered.
+ </p>
+ <p>
+
+ </p>
<div class="sample-container" >
<ui:include
src="/richfaces/inplaceInput/examples/blockInplace.xhtml"/>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/toolBar.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/toolBar.xhtml 2008-03-20
12:43:20 UTC (rev 6990)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/toolBar.xhtml 2008-03-20
13:49:29 UTC (rev 6991)
@@ -6,7 +6,7 @@
xmlns:rich="http://richfaces.org/rich">
<ui:composition template="/templates/main.xhtml">
- <ui:define name="title">RichFaces - Open Source Rich JSF Components -
PanelBar</ui:define>
+ <ui:define name="title">RichFaces - Open Source Rich JSF Components -
Tool Bar</ui:define>
<ui:define name="current">panel</ui:define>
<ui:define name="body">
<rich:tabPanel switchType="server" styleClass="top_tab"
contentClass="content_tab" headerClass="header_tabs_class"
inactiveTabClass="inactive_tab" activeTabClass="active_tab">