Author: dmaliarevich
Date: 2008-11-14 12:56:14 -0500 (Fri, 14 Nov 2008)
New Revision: 11794
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractInplaceTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceInputTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceSelectTemplate.java
Log:
JUnit tests for RF InplaceInput and InplaceSelect components were updated.
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractInplaceTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractInplaceTemplate.java 2008-11-14
17:56:08 UTC (rev 11793)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractInplaceTemplate.java 2008-11-14
17:56:14 UTC (rev 11794)
@@ -158,8 +158,14 @@
// if(!(this.showControls && this.isToggle)){
rootSpan.setAttribute(VPE_USER_TOGGLE_ID_ATTR, String.valueOf(this.isToggle));
// }
- final String rootClass =
MessageFormat.format(defaultStyleClasses.get("rootSpan"), getRootSpanClasses());
//$NON-NLS-1$
- rootSpan.setAttribute(HTML.ATTR_CLASS, rootClass);
+// final String rootClass =
MessageFormat.format(defaultStyleClasses.get("rootSpan"), getRootSpanClasses());
//$NON-NLS-1$
+ String rootStyleClass = "rich-inplace" + getCssStylesSuffix();
//$NON-NLS-1$
+ for (String sc : getRootSpanClasses()) {
+ if (ComponentUtil.isNotBlank(sc)) {
+ rootStyleClass += " " + sc; //$NON-NLS-1$
+ }
+ }
+ rootSpan.setAttribute(HTML.ATTR_CLASS, rootStyleClass);
String style = ""; //$NON-NLS-1$
if (this.isToggle) {
style = "position: relative;"; //$NON-NLS-1$
@@ -196,7 +202,7 @@
*
* @return the root span classes
*/
- protected abstract Object[] getRootSpanClasses();
+ protected abstract String[] getRootSpanClasses();
/**
* Gets the value.
@@ -231,7 +237,7 @@
*/
protected void initDefaultStyleClasses() {
if (defaultStyleClasses.isEmpty()) {
- defaultStyleClasses.put("rootSpan", "rich-inplace" +
getCssStylesSuffix() + " {0} {1} {2}"); //$NON-NLS-1$ //$NON-NLS-2$
//$NON-NLS-3$
+ defaultStyleClasses.put("rootSpan", "rich-inplace" +
getCssStylesSuffix() + " {0} {1}"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceInputTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceInputTemplate.java 2008-11-14
17:56:08 UTC (rev 11793)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceInputTemplate.java 2008-11-14
17:56:14 UTC (rev 11794)
@@ -146,7 +146,7 @@
*
* @return the root span classes
*/
- protected Object[] getRootSpanClasses() {
+ protected String[] getRootSpanClasses() {
String[] rst = new String[3];
String clazz = ""; //$NON-NLS-1$
@@ -154,14 +154,15 @@
rst[0] = "rich-inplace-edit"; //$NON-NLS-1$
if (ComponentUtil.isNotBlank(this.editClass)) {
clazz = this.editClass;
+ rst[1] = clazz;
}
} else {
rst[0] = "rich-inplace-view"; //$NON-NLS-1$
if (ComponentUtil.isNotBlank(this.viewClass)) {
clazz = this.viewClass;
+ rst[1] = clazz;
}
}
- rst[1] = clazz;
if (ComponentUtil.isNotBlank(this.styleClass)) {
rst[2] = this.styleClass;
}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceSelectTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceSelectTemplate.java 2008-11-14
17:56:08 UTC (rev 11793)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceSelectTemplate.java 2008-11-14
17:56:14 UTC (rev 11794)
@@ -261,7 +261,7 @@
* RichFacesAbstractInplaceTemplate#getRootSpanClasses()
*/
@Override
- protected Object[] getRootSpanClasses() {
+ protected String[] getRootSpanClasses() {
String[] result = new String[2];
String clazz = "";
Show replies by date