Author: abelevich
Date: 2010-09-03 11:32:53 -0400 (Fri, 03 Sep 2010)
New Revision: 19116
Added:
branches/RF-8992/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceSelect.java
branches/RF-8992/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java
branches/RF-8992/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.ecss
branches/RF-8992/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js
Modified:
branches/RF-8992/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceInput.java
branches/RF-8992/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java
Log:
initial base component/renderer/template, script/style
Modified:
branches/RF-8992/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceInput.java
===================================================================
---
branches/RF-8992/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceInput.java 2010-09-03
15:26:46 UTC (rev 19115)
+++
branches/RF-8992/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceInput.java 2010-09-03
15:32:53 UTC (rev 19116)
@@ -40,7 +40,7 @@
renderer = @JsfRenderer(type = "org.richfaces.InplaceInputRenderer"),
tag = @Tag(name="inplaceInput")
)
-public abstract class AbstractInplaceInput extends UIInput {
+public abstract class AbstractInplaceInput extends UIInput implements InplaceComponent {
public static final String COMPONENT_TYPE = "org.richfaces.InplaceInput";
Added:
branches/RF-8992/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceSelect.java
===================================================================
---
branches/RF-8992/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceSelect.java
(rev 0)
+++
branches/RF-8992/ui/input/ui/src/main/java/org/richfaces/component/AbstractInplaceSelect.java 2010-09-03
15:32:53 UTC (rev 19116)
@@ -0,0 +1,35 @@
+package org.richfaces.component;
+
+import javax.faces.component.UISelectOne;
+
+import org.richfaces.cdk.annotations.Attribute;
+import org.richfaces.cdk.annotations.JsfComponent;
+import org.richfaces.cdk.annotations.JsfRenderer;
+import org.richfaces.cdk.annotations.Tag;
+
+
+/**
+ * @author Anton Belevich
+ *
+ */
+
+@JsfComponent(
+ type = AbstractInplaceSelect.COMPONENT_TYPE,
+ family = AbstractInplaceSelect.COMPONENT_FAMILY,
+ generate = "org.richfaces.component.UIInplaceSelect",
+ renderer = @JsfRenderer(type = "org.richfaces.InplaceSelectRenderer"),
+ tag = @Tag(name="inplaceSelect")
+)
+public abstract class AbstractInplaceSelect extends UISelectOne implements
InplaceComponent {
+
+ public static final String COMPONENT_TYPE = "org.richfaces.InplaceSelect";
+
+ public static final String COMPONENT_FAMILY =
"org.richfaces.InplaceSelect";
+
+ @Attribute(defaultValue="InplaceState.ready")
+ public abstract InplaceState getState();
+
+ @Attribute
+ public abstract String getDefaultLabel();
+
+}
Modified:
branches/RF-8992/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java
===================================================================
---
branches/RF-8992/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java 2010-09-03
15:26:46 UTC (rev 19115)
+++
branches/RF-8992/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java 2010-09-03
15:32:53 UTC (rev 19116)
@@ -37,6 +37,7 @@
import org.ajax4jsf.javascript.JSFunction;
import org.ajax4jsf.renderkit.RendererUtils.HTML;
import org.richfaces.component.AbstractInplaceInput;
+import org.richfaces.component.InplaceComponent;
import org.richfaces.component.InplaceState;
import org.richfaces.component.util.HtmlUtil;
@@ -121,14 +122,13 @@
}
public InplaceState getInplaceState(UIComponent component) {
- return ((AbstractInplaceInput) component).getState();
+ return ((InplaceComponent) component).getState();
}
public String getValue(FacesContext facesContext, UIComponent component) throws
IOException {
- AbstractInplaceInput inplaceInput = (AbstractInplaceInput)component;
- String value = getInputValue(facesContext, inplaceInput);
+ String value = getInputValue(facesContext, component);
if(value == null || "".equals(value)) {
- value = inplaceInput.getDefaultLabel();
+ value = ((InplaceComponent)component).getDefaultLabel();
}
return value;
}
Added:
branches/RF-8992/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java
===================================================================
---
branches/RF-8992/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java
(rev 0)
+++
branches/RF-8992/ui/input/ui/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java 2010-09-03
15:32:53 UTC (rev 19116)
@@ -0,0 +1,32 @@
+package org.richfaces.renderkit;
+
+import java.io.IOException;
+
+import javax.faces.application.ResourceDependencies;
+import javax.faces.application.ResourceDependency;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+
+/**
+ * @author Anton Belevich
+ *
+ */
+
+@ResourceDependencies({ @ResourceDependency(library = "javax.faces", name =
"jsf.js"),
+ @ResourceDependency(name = "jquery.js"), @ResourceDependency(name =
"richfaces.js"),
+ @ResourceDependency(name = "richfaces-event.js"),
+ @ResourceDependency(name = "richfaces-base-component.js"),
+ @ResourceDependency(library="org.richfaces", name =
"inplaceSelect.js"),
+ @ResourceDependency(library="org.richfaces", name =
"inplaceSelect.ecss") })
+public class InplaceSelectBaseRenderer extends InplaceInputBaseRenderer {
+
+ @Override
+ public void buildScript(ResponseWriter writer, FacesContext facesContext, UIComponent
component) throws IOException {
+ }
+
+ public String getListStyles(FacesContext facesContext, UIComponent component) {
+ return "";
+ }
+}
Added:
branches/RF-8992/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.ecss
===================================================================
---
branches/RF-8992/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.ecss
(rev 0)
+++
branches/RF-8992/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.ecss 2010-09-03
15:32:53 UTC (rev 19116)
@@ -0,0 +1,45 @@
+.insel_default_state{ display : inline-block; position : relative; white-space : nowrap;
background-color : #f1f1f1/*editorBackgroundColor*/; border-bottom : 1px dashed
#000000/*generalTextColor*/; padding-left : 3px; padding-right : 3px;}
+.insel_changed_state{ background-image:url(images/mark_changed.gif); background-position
: top left; background-repeat : no-repeat;}
+
+.insel_edit_state{ position : absolute; top : 0px; left : 0px; width : 100px; display :
inline-block;}
+.insel_field{ background : #FBFF8E/*editBackgroundColor*/; padding : 0px 0px 0px 0px;
border : 0px; margin : 0px; width : 112px; background-image:url(images/mark_list.gif);
background-position : center right; background-repeat : no-repeat;}
+
+.insel_btn{
+ background : url(images/bg_btn.png) top repeat-x #C7D7EC; /*gradient - from
generalBackgroundColor to tabBackgroundColor, background-color - tabBackgroundColor*/
+ border : 1px outset #BED6F8; /*panelBorderColor*/
+ padding : 0px;
+ margin : 0px;}
+.insel_btn_press{
+ background : url(images/bg_press.png) top repeat-x #C7D7EC; /*gradient - from
tabBackgroundColor to generalBackgroundColor, background-color - tabBackgroundColor*/
+ border : 1px inset #BED6F8; /*panelBorderColor*/
+ padding : 0px;
+ margin : 0px;}
+.insel_btn_set{ position : absolute; top:0px; left : 112px; white-space : nowrap}
+
+.insel_list_cord{ position : relative; font-size : 0px;d@isplay : none}/*DDL is
hidden!!!!!*/
+.insel_list_position{ position : absolute; top: 0px; left: -1px; }
+.insel_list_decoration{ border : 1px solid #A6A6A6 /*panelBorderColor*/; padding : 0px;
background : #FBFF8E; /*editorBackgroundColor*/}
+.insel_list_scroll{ overflow : auto; overflow-x : hidden; height : 100px;}
+.insel_option{ padding : 2px; white-space : nowrap; background : #FBFF8E
/*editorBackgroundColor*/; cursor : default;}
+.insel_select{ padding : 1px; width : 100%; background-color: #DFE8F6; border : 1px
dotted #a3bae9;/*generalTextColor*/}
+.insel_width_list{ width : 250px;}
+
+
+.insel_list_cord{ position : relative; font-size : 0px;d@isplay : none}/*DDL is
hidden!!!!!*/
+.insel_list_decoration{ border : 1px solid #A6A6A6 /*panelBorderColor*/; padding : 0px;
background : #FFFFFF; /*tableBackgroundColor*/}
+.insel_list_scroll{ overflow : auto; overflow-x : hidden;}
+.insel_option{ padding : 2px; white-space : nowrap; cursor : default;}
+.insel_select{ padding : 1px; width : 100%; background-color: #DFE8F6; border : 1px
dotted #a3bae9;/*generalTextColor*/}
+
+
+
+.insel_btn_preposition { position : absolute; top : 0px; right : 0px; wigth : 1px; height
: 1px;}
+.insel_btn_position { position : absolute; top : 0px; left : 0px; white-space : nowrap;}
+
+.insel_btn_shadow {position: relative; padding : 6px 6px 6px 6px; top : -6px; right :
-6px;}
+.insel_shadow {position: relative; padding : 6px 6px 6px 6px; top : -6px; left : -6px;}
+
+.insel_shadow_t {background: url(images/bg_shadow.png) top left; position: absolute;
width: 6px; top: 0px; bottom: 6px; left : 0px}
+.insel_shadow_l {background: url(images/bg_shadow.png) bottom left; position: absolute;
height: 6px; bottom: 0px; left: 0px; right: 6px;}
+.insel_shadow_r {background: url(images/bg_shadow.png) bottom right; position: absolute;
width: 6px; top: 6px; bottom: 0px; right: 0px;}
+.insel_shadow_b {background: url(images/bg_shadow.png) right top; position: absolute;
height: 6px; top: 0px; left: 6px; right: 0px;}
\ No newline at end of file
Added:
branches/RF-8992/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js
===================================================================
Show replies by date