Author: abelevich
Date: 2008-02-13 09:50:42 -0500 (Wed, 13 Feb 2008)
New Revision: 6060
Modified:
trunk/sandbox/ui/inplaceInput/src/main/config/component/inplaceinput.xml
trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
trunk/sandbox/ui/inplaceInput/src/main/templates/inplaceinput.jspx
Log:
small fix
Modified: trunk/sandbox/ui/inplaceInput/src/main/config/component/inplaceinput.xml
===================================================================
--- trunk/sandbox/ui/inplaceInput/src/main/config/component/inplaceinput.xml 2008-02-13
14:49:19 UTC (rev 6059)
+++ trunk/sandbox/ui/inplaceInput/src/main/config/component/inplaceinput.xml 2008-02-13
14:50:42 UTC (rev 6060)
@@ -64,7 +64,7 @@
<defaultvalue>false</defaultvalue>
</property>
<property>
- <name>apllyFromControlsOnly</name>
+ <name>applyFromControlsOnly</name>
<classname>boolean</classname>
<defaultvalue>false</defaultvalue>
</property>
@@ -100,6 +100,20 @@
<classname>boolean</classname>
<defaultvalue>false</defaultvalue>
</property>
+ <property>
+ <name>tabindex</name>
+ <classname>int</classname>
+ </property>
+ <property>
+ <name>saveControlIcon</name>
+ <classname>java.lang.String</classname>
+ </property>
+ <property>
+ <name>cancelControlIcon</name>
+ <classname>java.lang.String</classname>
+ </property>
+
+
</properties>
</component>
</components>
Modified:
trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
===================================================================
---
trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-02-13
14:49:19 UTC (rev 6059)
+++
trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-02-13
14:50:42 UTC (rev 6060)
@@ -79,14 +79,14 @@
}
if (this.events.oneditactivation) {
- this.inplaceInput.fire("rich:oneditactivation", {oldValue :
this.valueKepeer.value, value : this.tempValueKeeper.value});
+ this.inplaceInput.fire("rich:oneditactivation", {oldValue :
this.valueKeeper.value, value : this.tempValueKeeper.value});
}
var textSize = this.inplaceInput.offsetWidth;
this.endViewState();
this.startEditableState(textSize);
if (this.events.oneditactivated) {
- this.inplaceInput.fire("rich:oneditactivated", {oldValue :
this.valueKepeer.value, value : this.tempValueKeeper.value});
+ this.inplaceInput.fire("rich:oneditactivated", {oldValue :
this.valueKeeper.value, value : this.tempValueKeeper.value});
}
},
@@ -97,7 +97,7 @@
return;
}
- if (!this.attributes.apllyFromControlsOnly) {
+ if (!this.attributes.applyFromControlsOnly) {
this.inputProcessing();
}
},
@@ -224,7 +224,7 @@
var userValue = this.tempValueKeeper.value;
var value = this.valueKeeper.value;
if (this.events.onviewactivation) {
- this.inplaceInput.fire("rich:onviewactivation", {oldValue :
this.valueKepeer.value, value : this.tempValueKeeper.value});
+ this.inplaceInput.fire("rich:onviewactivation", {oldValue :
this.valueKeeper.value, value : this.tempValueKeeper.value});
}
this.endEditableState();
//this.applyUserValue();
@@ -242,7 +242,7 @@
this.startViewState();
}
if (this.events.onviewactivated) {
- this.inplaceInput.fire("rich:onviewactivated", {oldValue :
this.valueKepeer.value, value : this.tempValueKeeper.value});
+ this.inplaceInput.fire("rich:onviewactivated", {oldValue :
this.valueKeeper.value, value : this.tempValueKeeper.value});
}
},
Modified: trunk/sandbox/ui/inplaceInput/src/main/templates/inplaceinput.jspx
===================================================================
--- trunk/sandbox/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2008-02-13 14:49:19
UTC (rev 6059)
+++ trunk/sandbox/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2008-02-13 14:50:42
UTC (rev 6060)
@@ -16,8 +16,8 @@
new org.ajax4jsf.javascript.PrototypeScript(),
scripts/inplaceinput.js
</h:scripts>
- <f:resource var="ok_icon"
name="org.richfaces.renderkit.images.OkControlIcon"/>
- <f:resource var="cancel_icon"
name="org.richfaces.renderkit.images.CancelControlIcon"/>
+ <f:resource var="saveIcon"
name="org.richfaces.renderkit.images.OkControlIcon"/>
+ <f:resource var="cancelIcon"
name="org.richfaces.renderkit.images.CancelControlIcon"/>
<f:resource var="spacer" name="images/spacer.gif"/>
@@ -36,6 +36,16 @@
}
variables.setVariable("value", value);
variables.setVariable("fieldValue", fieldValue);
+
+ String saveIcon =
(String)component.getAttributes().get("saveControlIcon");
+ if (saveIcon != null && saveIcon.length() != 0 ) {
+ variables.setVariable("saveIcon", saveIcon);
+ }
+
+ String cancelIcon =
(String)component.getAttributes().get("cancelControlIcon");
+ if (cancelIcon != null && cancelIcon.length() != 0 ) {
+ variables.setVariable("cancelIcon", cancelIcon);
+ }
]]>
</jsp:scriptlet>
@@ -47,7 +57,8 @@
type='text'
maxlength='#{component.attributes["inputMaxLength"]}'
autocomplete="off"
- value='#{fieldValue}'/>
+ value='#{fieldValue}'
+ tabindex='#{component.attributes["tabindex"]}'/>
<input id='#{clientId}value' name='#{clientId}value'
type='hidden' value='#{fieldValue}'/>
<div id="#{clientId}bar" class="is_btn_set"
style="display:none;">
<jsp:scriptlet>
@@ -82,10 +93,10 @@
<div id="#{clientId}buttons" style="position:relative;">
<input id="#{clientId}ok" class="rich-inplace-control"
type="image" onmouseup="this.className='rich-inplace-control'"
onmouseout="this.className='rich-inplace-control'"
onmousedown="this.className='rich-inplace-control-press'"
- src="#{ok_icon}"/>
+ src="#{saveIcon}"/>
<input id="#{clientId}cancel" class="rich-inplace-control"
type="image" onmouseup="this.className='rich-inplace-control'"
onmouseout="this.className='rich-inplace-control'"
onmousedown="this.className='rich-inplace-control-press'"
- src="#{cancel_icon}"/>
+ src="#{cancelIcon}"/>
</div>
<jsp:scriptlet>
<![CDATA[
@@ -98,7 +109,7 @@
<script type="text/javascript">
var attributes = {defaultLabel :
'#{component.attributes["defaultLabel"]}',
showControls : #{component.attributes["showControls"]},
- apllyFromControlsOnly :
#{component.attributes["apllyFromControlsOnly"]},
+ applyFromControlsOnly :
#{component.attributes["applyFromControlsOnly"]},
editEvent : '#{component.attributes["editEvent"]}',
selectOnEdit : #{component.attributes["selectOnEdit"]},
controlsPosition :
'#{component.attributes["controlsPosition"]}',