Author: maksimkaszynski
Date: 2008-02-21 05:21:54 -0500 (Thu, 21 Feb 2008)
New Revision: 6231
Modified:
trunk/sandbox/ui/inplaceInput/
trunk/sandbox/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java
trunk/sandbox/ui/inplaceInput/src/main/templates/inplaceinput.jspx
trunk/sandbox/ui/inplaceSelect/
Log:
review of component and renderer code?
Property changes on: trunk/sandbox/ui/inplaceInput
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Modified:
trunk/sandbox/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java
===================================================================
---
trunk/sandbox/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java 2008-02-21
09:25:44 UTC (rev 6230)
+++
trunk/sandbox/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java 2008-02-21
10:21:54 UTC (rev 6231)
@@ -41,6 +41,10 @@
inplaceInput = (UIInplaceInput) component;
} else {
if (logger.isDebugEnabled()) {
+
+ //FIXME: from Maksim
+ //That's no ComboBox but Inplace input!
+
logger.debug("No decoding necessary since the component "
+ component.getId() +
" is not an instance or a sub class of UIComboBox");
@@ -75,6 +79,7 @@
}
}
+ //FIXME: from Maksim --> I think this method should check if facet is rendered as
well
public boolean isControlsFacetExists(FacesContext context, UIComponent component) {
UIComponent facet = component.getFacet(CONTROLS_FACET);
if (facet != null) {
Modified: trunk/sandbox/ui/inplaceInput/src/main/templates/inplaceinput.jspx
===================================================================
--- trunk/sandbox/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2008-02-21 09:25:44
UTC (rev 6230)
+++ trunk/sandbox/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2008-02-21 10:21:54
UTC (rev 6231)
@@ -24,6 +24,8 @@
<f:clientid var="clientId" />
<jsp:scriptlet>
<![CDATA[
+ //FIXME: from Maksim --> why get same attribute twice?
+ //This is UIInput, so better call getValue() directly. It's 10x faster
Object value = component.getAttributes().get("value");
Object fieldValue = component.getAttributes().get("value");
value = getConvertedStringValue(context, component,value);
@@ -47,6 +49,7 @@
variables.setVariable("cancelIcon", cancelIcon);
}
+ //FIXME: from Maksim --> Check spelling, in English control is with single L
String controllClass =
(String)component.getAttributes().get("controllClass");
variables.setVariable("controllClass", controllClass);
String controllHoveredClass =
(String)component.getAttributes().get("controllHoverClass");
@@ -123,6 +126,9 @@
#{value}
</span>
<script type="text/javascript">
+ //TODO: from Maksim --> I suggest you to change this code to use JavaScriptOption
class
+ //Constructor can be created from java code
+
var attributes = {defaultLabel :
'#{component.attributes["defaultLabel"]}',
showControls : #{component.attributes["showControls"]},
applyFromControlsOnly :
#{component.attributes["applyFromControlsOnly"]},
@@ -134,12 +140,12 @@
inputMinWidth : '#{component.attributes["minInputWidth"]}',
inputMaxWidth : '#{component.attributes["maxInputWidth"]}'
};
-
var events = {oneditactivation : #{this:getAsEventHandler(context, component,
"oneditactivation")},
onviewactivation : #{this:getAsEventHandler(context, component,
"onviewactivation")},
oneditactivated : #{this:getAsEventHandler(context, component,
"oneditactivated")},
onviewactivated : #{this:getAsEventHandler(context, component,
"onviewactivated")}};
-
+
+ //Global variable? HMMM...
Richfaces.InplaceInput.CLASSES = {
COMPONENT : {CHANGED : {NORMAL : 'rich-inplace rich-inplace-changed
#{component.attributes["changedClass"]}', HOVERED :
'rich-inplace-input-change-hover
#{component.attributes["changedHoverClass"]}'},
VIEW : {NORMAL : 'rich-inplace rich-inplace-view
#{component.attributes["viewClass"]}', HOVERED :
'rich-inplace-input-view-hover
#{component.attributes["viewHoverClass"]}'},
Property changes on: trunk/sandbox/ui/inplaceSelect
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
.classpath
.project
Show replies by date