JBoss Rich Faces SVN: r21563 - in branches/4.0.0.M6/core: impl/src/main/java/org/richfaces/application/push/impl and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2011-02-09 09:11:59 -0500 (Wed, 09 Feb 2011)
New Revision: 21563
Modified:
branches/4.0.0.M6/core/api/src/main/java/org/richfaces/application/push/Session.java
branches/4.0.0.M6/core/impl/src/main/java/org/richfaces/application/push/impl/AbstractSession.java
branches/4.0.0.M6/core/impl/src/main/java/org/richfaces/application/push/impl/AtmospherePushHandler.java
branches/4.0.0.M6/core/impl/src/main/java/org/richfaces/application/push/impl/SessionManagerImpl.java
Log:
https://issues.jboss.org/browse/RF-10457
Modified: branches/4.0.0.M6/core/api/src/main/java/org/richfaces/application/push/Session.java
===================================================================
--- branches/4.0.0.M6/core/api/src/main/java/org/richfaces/application/push/Session.java 2011-02-09 13:20:59 UTC (rev 21562)
+++ branches/4.0.0.M6/core/api/src/main/java/org/richfaces/application/push/Session.java 2011-02-09 14:11:59 UTC (rev 21563)
@@ -51,6 +51,4 @@
public void invalidate();
- public void destroy();
-
}
Modified: branches/4.0.0.M6/core/impl/src/main/java/org/richfaces/application/push/impl/AbstractSession.java
===================================================================
--- branches/4.0.0.M6/core/impl/src/main/java/org/richfaces/application/push/impl/AbstractSession.java 2011-02-09 13:20:59 UTC (rev 21562)
+++ branches/4.0.0.M6/core/impl/src/main/java/org/richfaces/application/push/impl/AbstractSession.java 2011-02-09 14:11:59 UTC (rev 21563)
@@ -26,6 +26,7 @@
import org.richfaces.application.push.Request;
import org.richfaces.application.push.Session;
import org.richfaces.application.push.SessionManager;
+import org.richfaces.application.push.impl.SessionManagerImpl.DestroyableSession;
import org.richfaces.log.Logger;
import org.richfaces.log.RichfacesLogger;
@@ -33,7 +34,7 @@
* @author Nick Belaevski
*
*/
-public abstract class AbstractSession implements Session {
+public abstract class AbstractSession implements Session, DestroyableSession {
private static final Logger LOGGER = RichfacesLogger.APPLICATION.getLogger();
Modified: branches/4.0.0.M6/core/impl/src/main/java/org/richfaces/application/push/impl/AtmospherePushHandler.java
===================================================================
--- branches/4.0.0.M6/core/impl/src/main/java/org/richfaces/application/push/impl/AtmospherePushHandler.java 2011-02-09 13:20:59 UTC (rev 21562)
+++ branches/4.0.0.M6/core/impl/src/main/java/org/richfaces/application/push/impl/AtmospherePushHandler.java 2011-02-09 14:11:59 UTC (rev 21563)
@@ -96,7 +96,8 @@
resp.setContentType("text/plain");
try {
- session.connect(createRequest(resource, session));
+ Request request = createRequest(resource, session);
+ request.suspend();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
Modified: branches/4.0.0.M6/core/impl/src/main/java/org/richfaces/application/push/impl/SessionManagerImpl.java
===================================================================
--- branches/4.0.0.M6/core/impl/src/main/java/org/richfaces/application/push/impl/SessionManagerImpl.java 2011-02-09 13:20:59 UTC (rev 21562)
+++ branches/4.0.0.M6/core/impl/src/main/java/org/richfaces/application/push/impl/SessionManagerImpl.java 2011-02-09 14:11:59 UTC (rev 21563)
@@ -40,13 +40,21 @@
private static final Logger LOGGER = RichfacesLogger.APPLICATION.getLogger();
+ interface DestroyableSession {
+
+ public void destroy();
+
+ }
+
private final class SessionsExpirationRunnable implements Runnable {
public void run() {
while (true) {
try {
Session session = sessionQueue.take();
sessionMap.remove(session.getId());
- session.destroy();
+ if (session instanceof DestroyableSession) {
+ ((DestroyableSession) session).destroy();
+ }
} catch (InterruptedException e) {
LOGGER.error(e.getMessage(), e);
}
@@ -75,7 +83,9 @@
for (Iterator<Session> sessionsItr = sessionMap.values().iterator(); sessionsItr.hasNext(); ) {
Session session = sessionsItr.next();
- session.destroy();
+ if (session instanceof DestroyableSession) {
+ ((DestroyableSession) session).destroy();
+ }
}
}
15 years, 2 months
JBoss Rich Faces SVN: r21562 - trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2011-02-09 08:20:59 -0500 (Wed, 09 Feb 2011)
New Revision: 21562
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TabPanelRenderer.java
Log:
RF-10443 Tab panel: attribute execute ignored
RF-10441 Tab panel: attribute render ignored
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TabPanelRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TabPanelRenderer.java 2011-02-09 12:25:54 UTC (rev 21561)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TabPanelRenderer.java 2011-02-09 13:20:59 UTC (rev 21562)
@@ -36,6 +36,7 @@
import static org.richfaces.renderkit.RenderKitUtils.renderPassThroughAttributes;
import java.io.IOException;
+import java.util.HashMap;
import java.util.Map;
import javax.faces.application.ResourceDependencies;
@@ -252,9 +253,16 @@
@Override
protected Map<String, Object> getScriptObjectOptions(FacesContext context, UIComponent component) {
- Map<String, Object> options = super.getScriptObjectOptions(context, component);
+ AbstractTogglePanel panel = (AbstractTogglePanel) component;
+
+ Map<String, Object> options = new HashMap<String, Object>();
+ options.put("activeItem", panel.getActiveItem());
+ options.put("cycledSwitching", panel.isCycledSwitching());
options.put("isKeepHeight", attributeAsString(component, "height").length() > 0);
+ addEventOption(context, panel, options, ITEM_CHANGE);
+ addEventOption(context, panel, options, BEFORE_ITEM_CHANGE);
+
return options;
}
15 years, 2 months
JBoss Rich Faces SVN: r21561 - branches/community/3.3.X/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2011-02-09 07:25:54 -0500 (Wed, 09 Feb 2011)
New Revision: 21561
Modified:
branches/community/3.3.X/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
Log:
RF-10477
Modified: branches/community/3.3.X/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
===================================================================
--- branches/community/3.3.X/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2011-02-09 10:41:30 UTC (rev 21560)
+++ branches/community/3.3.X/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2011-02-09 12:25:54 UTC (rev 21561)
@@ -301,6 +301,25 @@
this.detectWidth();
this.LMPopUp(menuName, false);
this.setLMTO(4);
+ },
+
+ bindMouseMove: function (layerId) {
+ if (typeof this.mouseMoveHandler == "function") {
+ Event.stopObserving(document.body, "mousemove", this.mouseMoveHandler);
+ }
+ this.mouseMoveHandler = function () {
+ if (typeof RichFaces.Menu.Layers.mouseMoveHandler == "function") {
+ Event.stopObserving(document.body, "mousemove", RichFaces.Menu.Layers.mouseMoveHandler);
+ RichFaces.Menu.Layers.mouseMoveHandler = undefined;
+ }
+ var layer = RichFaces.Menu.Layers.layers[layerId];
+ if (layer) {
+ RichFaces.Menu.Layers.setLMTO(layer.hideDelay);
+ } else {
+ RichFaces.Menu.Layers.shutdown();
+ }
+ };
+ Event.observe(document.body, "mousemove", this.mouseMoveHandler);
}
};
@@ -407,6 +426,9 @@
RichFaces.Menu.Layers.LMPopUp(this.layer.id, false,e);
RichFaces.Menu.Layers.clearLMTO();
+
+ RichFaces.Menu.Layers.bindMouseMove(this.layer.id);
+
}.bind(this);
}
15 years, 2 months
JBoss Rich Faces SVN: r21560 - trunk/examples/richfaces-showcase/src/main/webapp/richfaces/calendar/samples.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2011-02-09 05:41:30 -0500 (Wed, 09 Feb 2011)
New Revision: 21560
Modified:
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/calendar/samples/clientStylingDisablement-sample.xhtml
Log:
wrong class name after calendar refactoring.
Modified: trunk/examples/richfaces-showcase/src/main/webapp/richfaces/calendar/samples/clientStylingDisablement-sample.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/calendar/samples/clientStylingDisablement-sample.xhtml 2011-02-09 10:02:18 UTC (rev 21559)
+++ trunk/examples/richfaces-showcase/src/main/webapp/richfaces/calendar/samples/clientStylingDisablement-sample.xhtml 2011-02-09 10:41:30 UTC (rev 21560)
@@ -25,7 +25,7 @@
if (curDt.getTime() - day.date.getTime() < 0) return true; else return false;
}
function disabledClassesProv(day){
- if (curDt.getTime() - day.date.getTime() >= 0) return 'rf-ca-boundary-dates';
+ if (curDt.getTime() - day.date.getTime() >= 0) return 'rf-cal-boundary-day';
var res = '';
if (day.isWeekend) res+='weekendBold ';
if (day.day%3==0) res+='everyThirdDay';
15 years, 2 months
JBoss Rich Faces SVN: r21559 - in modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest: richTabPanel and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-02-09 05:02:18 -0500 (Wed, 09 Feb 2011)
New Revision: 21559
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelect.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java
Log:
* test for inplace select fixed
* added issue tracking info to test for tab panel
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelect.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelect.java 2011-02-09 09:42:29 UTC (rev 21558)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceSelect/TestRichInplaceSelect.java 2011-02-09 10:02:18 UTC (rev 21559)
@@ -30,6 +30,7 @@
import static org.testng.Assert.assertTrue;
import java.net.URL;
+
import javax.faces.event.PhaseId;
import org.jboss.test.selenium.css.CssProperty;
@@ -144,7 +145,7 @@
assertTrue(selenium.isElementPresent(select), "Inplace input is not on the page.");
assertTrue(selenium.isElementPresent(label), "Default label should be present on the page.");
- assertEquals(selenium.getText(label), "Hawaii", "Default label");
+ assertEquals(selenium.getText(label), "Hawaii", "Label");
assertFalse(selenium.isElementPresent(input), "Input should not be present on the page.");
assertFalse(selenium.isElementPresent(okButton), "OK button should not be present on the page.");
assertFalse(selenium.isElementPresent(cancelButton), "Cancel button should not be present on the page.");
@@ -555,7 +556,7 @@
guardNoRequest(selenium).fireEvent(input, Event.BLUR);
assertFalse(selenium.isDisplayed(popup), "Popup should not be displayed.");
- assertEquals(selenium.getValue(input), "Click here to edit", "Input should contain default label.");
+ assertEquals(selenium.getText(label), "Click here to edit", "Label should contain default value.");
}
@Test
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java 2011-02-09 09:42:29 UTC (rev 21558)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java 2011-02-09 10:02:18 UTC (rev 21559)
@@ -199,6 +199,7 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-10443")
public void testExecute() {
selenium.type(pjq("input[type=text][id$=executeInput]"), "@this executeChecker");
selenium.waitForPageToLoad();
@@ -363,6 +364,7 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-10441")
public void testRender() {
selenium.type(pjq("input[type=text][id$=renderInput]"), "renderChecker");
selenium.waitForPageToLoad();
15 years, 2 months
JBoss Rich Faces SVN: r21558 - in trunk: core/impl/src/main/java/org/richfaces/renderkit/html/images and 8 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2011-02-09 04:42:29 -0500 (Wed, 09 Feb 2011)
New Revision: 21558
Added:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/images/ProgressBarAnimatedBackgroundImage.java
Removed:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarAnimatedBackgroundImage.java
Modified:
trunk/core/impl/src/main/java/org/richfaces/renderkit/html/BaseGradient.java
trunk/core/impl/src/main/java/org/richfaces/renderkit/html/images/OneColorBasedResource.java
trunk/core/impl/src/main/resources/META-INF/skins/plain.skin.properties
trunk/core/impl/src/test/resources/resources/full.css
trunk/core/impl/src/test/resources/resources/importedEL.css
trunk/core/impl/src/test/resources/resources/resource.css
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconBasic.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/ArrowBase.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/AutocompleteBaseGradient.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/AutocompleteButtonGradient.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/CalendarIcon.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/CalendarSeparator.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/ComboButtonBase.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/ComboDisabledDownButton.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/ComboDownButton.java
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/html/images/TreeLineImage.java
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/html/images/TreePlusImage.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/images/ToolbarSeparatorImage.java
trunk/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties
Log:
RF-9613 glassfish throws NullPointerException when skin plain is used
Modified: trunk/core/impl/src/main/java/org/richfaces/renderkit/html/BaseGradient.java
===================================================================
--- trunk/core/impl/src/main/java/org/richfaces/renderkit/html/BaseGradient.java 2011-02-09 09:35:26 UTC (rev 21557)
+++ trunk/core/impl/src/main/java/org/richfaces/renderkit/html/BaseGradient.java 2011-02-09 09:42:29 UTC (rev 21558)
@@ -55,9 +55,9 @@
protected Integer headerGradientColor;
protected GradientType gradientType;
- private int width;
- private int height;
- private int gradientHeight;
+ private Integer width;
+ private Integer height;
+ private Integer gradientHeight;
private String baseColor;
private String gradientColor;
private boolean horizontal;
@@ -142,17 +142,17 @@
}
@ResourceParameter(defaultValue = "30")
- public final void setWidth(int width) {
+ public final void setWidth(Integer width) {
this.width = width;
}
@ResourceParameter(defaultValue = "50")
- public final void setHeight(int height) {
+ public final void setHeight(Integer height) {
this.height = height;
}
@ResourceParameter(defaultValue = "20")
- public final void setGradientHeight(int gradientHeight) {
+ public final void setGradientHeight(Integer gradientHeight) {
this.gradientHeight = gradientHeight;
}
@@ -176,24 +176,36 @@
}
public Dimension getDimension() {
- return new Dimension(getWidth(), getHeight());
+ return new Dimension(getSafeWidth(), getSafeHeight());
}
/**
* @return the gradientHeight
*/
- protected int getGradientHeight() {
+ protected Integer getGradientHeight() {
return gradientHeight;
}
- protected int getHeight() {
+ protected Integer getHeight() {
return height;
}
- protected int getWidth() {
+ protected Integer getWidth() {
return width;
}
+ protected Integer getSafeGradientHeight() {
+ return gradientHeight == null ? 0 : gradientHeight;
+ }
+
+ protected Integer getSafeHeight() {
+ return height == null ? 0 : height;
+ }
+
+ protected Integer getSafeWidth() {
+ return width == null ? 0 : width;
+ }
+
/**
* @return the baseColor
*/
@@ -240,7 +252,7 @@
* @param dim
*/
protected void paintGradient(Graphics2D g2d, Dimension dim) {
- if ((headerBackgroundColor != null || headerGradientColor != null) && gradientType != null) {
+ if (headerBackgroundColor != null && headerGradientColor != null && gradientType != null) {
BiColor biColor = new GradientType.BiColor(headerBackgroundColor, headerGradientColor);
BiColor firstLayer = gradientType.getFirstLayerColors(biColor);
@@ -278,29 +290,62 @@
}
public void readState(FacesContext context, DataInput dataInput) throws IOException {
- this.width = dataInput.readShort();
- this.height = dataInput.readShort();
- this.gradientHeight = dataInput.readShort();
+ this.width = readIntegerParameterAsShort(dataInput);
+ this.height = readIntegerParameterAsShort(dataInput);
+ this.gradientHeight = readIntegerParameterAsShort(dataInput);
+ this.headerBackgroundColor = readIntegerParameter(dataInput);
+ this.headerGradientColor = readIntegerParameter(dataInput);
+
this.horizontal = dataInput.readBoolean();
-
- this.headerBackgroundColor = dataInput.readInt();
- this.headerGradientColor = dataInput.readInt();
this.gradientType = GradientType.values()[dataInput.readByte()];
}
public void writeState(FacesContext context, DataOutput dataOutput) throws IOException {
- dataOutput.writeShort((short) width);
- dataOutput.writeShort((short) height);
- dataOutput.writeShort((short) gradientHeight);
- dataOutput.writeBoolean(horizontal);
+ writeIntegerParameterAsShort(dataOutput, this.width);
+ writeIntegerParameterAsShort(dataOutput, this.height);
+ writeIntegerParameterAsShort(dataOutput, this.gradientHeight);
+ writeIntegerParameter(dataOutput, this.headerBackgroundColor);
+ writeIntegerParameter(dataOutput, this.headerGradientColor);
- dataOutput.writeInt(this.headerBackgroundColor);
- dataOutput.writeInt(this.headerGradientColor);
+ dataOutput.writeBoolean(this.horizontal);
dataOutput.writeByte((byte) this.gradientType.ordinal());
}
+ protected void writeIntegerParameterAsShort(DataOutput dataOutput, Integer parameter) throws IOException {
+ if (parameter != null) {
+ dataOutput.writeBoolean(true);
+ dataOutput.writeShort(parameter);
+ } else {
+ dataOutput.writeBoolean(false);
+ }
+ }
+
+ protected Integer readIntegerParameterAsShort(DataInput dataInput) throws IOException {
+ if (dataInput.readBoolean()) {
+ return (int) dataInput.readShort();
+ } else {
+ return null;
+ }
+ }
+
+ protected void writeIntegerParameter(DataOutput dataOutput, Integer parameter) throws IOException {
+ if (parameter != null) {
+ dataOutput.writeBoolean(true);
+ dataOutput.writeInt(parameter);
+ } else {
+ dataOutput.writeBoolean(false);
+ }
+ }
+
+ protected Integer readIntegerParameter(DataInput dataInput) throws IOException {
+ if (dataInput.readBoolean()) {
+ return dataInput.readInt();
+ } else {
+ return null;
+ }
+ }
+
public boolean isTransient() {
return false;
}
-
}
Modified: trunk/core/impl/src/main/java/org/richfaces/renderkit/html/images/OneColorBasedResource.java
===================================================================
--- trunk/core/impl/src/main/java/org/richfaces/renderkit/html/images/OneColorBasedResource.java 2011-02-09 09:35:26 UTC (rev 21557)
+++ trunk/core/impl/src/main/java/org/richfaces/renderkit/html/images/OneColorBasedResource.java 2011-02-09 09:42:29 UTC (rev 21558)
@@ -63,7 +63,12 @@
public void writeState(FacesContext context, DataOutput dataOutput) throws IOException {
Skin skin = SkinFactory.getInstance(context).getSkin(context);
- dataOutput.writeInt(skin.getColorParameter(context, basicColorParamName));
+ Integer colorParameter = skin.getColorParameter(context, basicColorParamName);
+ if (colorParameter == null) {
+ Skin defaultSkin = SkinFactory.getInstance(context).getDefaultSkin(context);
+ colorParameter = defaultSkin.getColorParameter(context, basicColorParamName);
+ }
+ dataOutput.writeInt(colorParameter);
}
public void readState(FacesContext context, DataInput dataInput) throws IOException {
Modified: trunk/core/impl/src/main/resources/META-INF/skins/plain.skin.properties
===================================================================
--- trunk/core/impl/src/main/resources/META-INF/skins/plain.skin.properties 2011-02-09 09:35:26 UTC (rev 21557)
+++ trunk/core/impl/src/main/resources/META-INF/skins/plain.skin.properties 2011-02-09 09:42:29 UTC (rev 21558)
@@ -72,4 +72,5 @@
errorColor=#{null}
editorBackgroundColor=#{null}
-editBackgroundColor=#{null}
\ No newline at end of file
+editBackgroundColor=#{null}
+gradientType=plain
Modified: trunk/core/impl/src/test/resources/resources/full.css
===================================================================
--- trunk/core/impl/src/test/resources/resources/full.css 2011-02-09 09:35:26 UTC (rev 21557)
+++ trunk/core/impl/src/test/resources/resources/full.css 2011-02-09 09:42:29 UTC (rev 21558)
@@ -22,5 +22,5 @@
padding: 10px !important;
border: 1px solid green;
background-image: url(image.png);
- background: red url(/rfRes/org.richfaces.renderkit.html.images.ButtonBackgroundImage.jsf?db=eAFjYGTg!v-f4f!bV8!-Xzl!nAkAQAgJMg__);
+ background: red url(/rfRes/org.richfaces.renderkit.html.images.ButtonBackgroundImage.jsf?db=eAFjZGBkZOBm!P-f8f!bV88Y!185f5yBCQBPWAk3);
}
Modified: trunk/core/impl/src/test/resources/resources/importedEL.css
===================================================================
--- trunk/core/impl/src/test/resources/resources/importedEL.css 2011-02-09 09:35:26 UTC (rev 21557)
+++ trunk/core/impl/src/test/resources/resources/importedEL.css 2011-02-09 09:42:29 UTC (rev 21558)
@@ -22,5 +22,5 @@
padding: 10px !important;
border: 1px solid green;
background-image: url(image.png);
- background: red url(/rfRes/org.richfaces.renderkit.html.images.ButtonBackgroundImage.jsf?db=eAFjYGTg!v-f4f!bV8!-Xzl!nAkAQAgJMg__);
+ background: red url(/rfRes/org.richfaces.renderkit.html.images.ButtonBackgroundImage.jsf?db=eAFjZGBkZOBm!P-f8f!bV88Y!185f5yBCQBPWAk3);
}
\ No newline at end of file
Modified: trunk/core/impl/src/test/resources/resources/resource.css
===================================================================
--- trunk/core/impl/src/test/resources/resources/resource.css 2011-02-09 09:35:26 UTC (rev 21557)
+++ trunk/core/impl/src/test/resources/resources/resource.css 2011-02-09 09:42:29 UTC (rev 21558)
@@ -1,3 +1,3 @@
body {
- background: red url(/rfRes/org.richfaces.renderkit.html.images.ButtonBackgroundImage.jsf?db=eAFjYGTg!v-f4f!bV8!-Xzl!nAkAQAgJMg__);
+ background: red url(/rfRes/org.richfaces.renderkit.html.images.ButtonBackgroundImage.jsf?db=eAFjZGBkZOBm!P-f8f!bV88Y!185f5yBCQBPWAk3);
}
\ No newline at end of file
Modified: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconBasic.java
===================================================================
--- trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconBasic.java 2011-02-09 09:35:26 UTC (rev 21557)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconBasic.java 2011-02-09 09:42:29 UTC (rev 21558)
@@ -71,7 +71,12 @@
public void initialize() {
FacesContext context = FacesContext.getCurrentInstance();
Skin skin = SkinFactory.getInstance(context).getSkin(context);
- color = new Color(skin.getColorParameter(context, disabled ? "tabDisabledTextColor" : Skin.HEADER_TEXT_COLOR));
+ Skin defaultSkin = SkinFactory.getInstance(context).getDefaultSkin(context);
+ Integer colorParameter = skin.getColorParameter(context, disabled ? "tabDisabledTextColor" : Skin.HEADER_TEXT_COLOR);
+ if (colorParameter == null) {
+ colorParameter = defaultSkin.getColorParameter(context, disabled ? "tabDisabledTextColor" : Skin.HEADER_TEXT_COLOR);
+ }
+ color = new Color(colorParameter);
}
public void setDisabled(boolean topIcon) {
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/ArrowBase.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/ArrowBase.java 2011-02-09 09:35:26 UTC (rev 21557)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/ArrowBase.java 2011-02-09 09:42:29 UTC (rev 21558)
@@ -46,7 +46,7 @@
@DynamicUserResource
public abstract class ArrowBase extends AbstractJava2DUserResource implements StateHolderResource {
- private int color;
+ private Integer color;
private String colorName = Skin.GENERAL_TEXT_COLOR;
public ArrowBase(Dimension dimension) {
@@ -57,7 +57,12 @@
public void initialize() {
FacesContext context = FacesContext.getCurrentInstance();
Skin skin = SkinFactory.getInstance(context).getSkin(context);
+ Skin defaultSkin = SkinFactory.getInstance(context).getDefaultSkin(context);
+
this.color = skin.getColorParameter(context, colorName);
+ if (this.color == null) {
+ this.color = defaultSkin.getColorParameter(context, colorName);
+ }
}
protected final void setColorName(String colorName) {
@@ -80,5 +85,4 @@
public boolean isTransient() {
return false;
}
-
}
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/AutocompleteBaseGradient.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/AutocompleteBaseGradient.java 2011-02-09 09:35:26 UTC (rev 21557)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/AutocompleteBaseGradient.java 2011-02-09 09:42:29 UTC (rev 21558)
@@ -34,6 +34,7 @@
import org.richfaces.resource.AbstractJava2DUserResource;
import org.richfaces.resource.DynamicUserResource;
+import org.richfaces.resource.PostConstructResource;
import org.richfaces.resource.StateHolderResource;
import org.richfaces.skin.Skin;
import org.richfaces.skin.SkinFactory;
@@ -51,35 +52,52 @@
private String bottomColorSkinParameter;
- private Color topColor;
+ private Integer topColor;
- private Color bottomColor;
+ private Integer bottomColor;
public AutocompleteBaseGradient() {
super(DIMENSION);
}
+ @PostConstructResource
+ public void initialize() {
+ FacesContext context = FacesContext.getCurrentInstance();
+ Skin skin = SkinFactory.getInstance(context).getSkin(context);
+
+ topColor = skin.getColorParameter(context, topColorSkinParameter);
+ bottomColor = skin.getColorParameter(context, bottomColorSkinParameter);
+ }
+
public void paint(Graphics2D graphics2d) {
+ if (topColor == null || bottomColor == null) {
+ return;
+ }
Dimension dimension = getDimension();
- GradientPaint paint = new GradientPaint(0, 0, topColor, 0, dimension.height, bottomColor);
+ GradientPaint paint = new GradientPaint(0, 0, new Color(topColor), 0, dimension.height, new Color(bottomColor));
graphics2d.setPaint(paint);
graphics2d.fill(new Rectangle(dimension));
}
public void writeState(FacesContext context, DataOutput dataOutput) throws IOException {
- Skin skin = SkinFactory.getInstance(context).getSkin(context);
-
- Integer topColor = skin.getColorParameter(context, topColorSkinParameter);
- Integer bottomColor = skin.getColorParameter(context, bottomColorSkinParameter);
-
- dataOutput.writeInt(topColor);
- dataOutput.writeInt(bottomColor);
+ if (topColor != null && bottomColor != null) {
+ dataOutput.writeBoolean(true);
+ dataOutput.writeInt(topColor);
+ dataOutput.writeInt(bottomColor);
+ } else {
+ dataOutput.writeBoolean(false);
+ }
}
public void readState(FacesContext context, DataInput dataInput) throws IOException {
- topColor = new Color(dataInput.readInt());
- bottomColor = new Color(dataInput.readInt());
+ if (dataInput.readBoolean()) {
+ topColor = dataInput.readInt();
+ bottomColor = dataInput.readInt();
+ } else {
+ topColor = null;
+ bottomColor = null;
+ }
}
public boolean isTransient() {
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/AutocompleteButtonGradient.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/AutocompleteButtonGradient.java 2011-02-09 09:35:26 UTC (rev 21557)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/AutocompleteButtonGradient.java 2011-02-09 09:42:29 UTC (rev 21558)
@@ -33,5 +33,4 @@
setTopColorSkinParameter(Skin.HEADER_GRADIENT_COLOR);
setBottomColorSkinParameter(Skin.HEADER_BACKGROUND_COLOR);
}
-
}
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/CalendarIcon.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/CalendarIcon.java 2011-02-09 09:35:26 UTC (rev 21557)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/CalendarIcon.java 2011-02-09 09:42:29 UTC (rev 21558)
@@ -66,9 +66,17 @@
public final void initialize() {
FacesContext context = FacesContext.getCurrentInstance();
Skin skin = SkinFactory.getInstance(context).getSkin(context);
+ Skin defaultSkin = SkinFactory.getInstance(context).getDefaultSkin(context);
this.headerTextColor = skin.getColorParameter(context, Skin.HEADER_BACKGROUND_COLOR);
+ if (this.headerTextColor == null) {
+ this.headerTextColor = defaultSkin.getColorParameter(context, Skin.HEADER_BACKGROUND_COLOR);
+ }
+
this.headerBackgroundColor = skin.getColorParameter(context, Skin.SELECT_CONTROL_COLOR);
+ if (this.headerBackgroundColor == null) {
+ this.headerBackgroundColor = defaultSkin.getColorParameter(context, Skin.SELECT_CONTROL_COLOR);
+ }
}
public boolean isTransient() {
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/CalendarSeparator.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/CalendarSeparator.java 2011-02-09 09:35:26 UTC (rev 21557)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/CalendarSeparator.java 2011-02-09 09:42:29 UTC (rev 21558)
@@ -58,8 +58,12 @@
public void initialize() {
FacesContext context = FacesContext.getCurrentInstance();
Skin skin = SkinFactory.getInstance(context).getSkin(context);
+ Skin defaultSkin = SkinFactory.getInstance(context).getDefaultSkin(context);
this.headerTextColor = skin.getColorParameter(context, Skin.HEADER_TEXT_COLOR);
+ if (this.headerTextColor == null) {
+ this.headerTextColor = defaultSkin.getColorParameter(context, Skin.HEADER_TEXT_COLOR);
+ }
}
public boolean isTransient() {
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/ComboButtonBase.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/ComboButtonBase.java 2011-02-09 09:35:26 UTC (rev 21557)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/ComboButtonBase.java 2011-02-09 09:42:29 UTC (rev 21558)
@@ -33,19 +33,40 @@
import org.richfaces.resource.AbstractJava2DUserResource;
import org.richfaces.resource.DynamicUserResource;
+import org.richfaces.resource.PostConstructResource;
import org.richfaces.resource.StateHolderResource;
+import org.richfaces.skin.Skin;
+import org.richfaces.skin.SkinFactory;
@DynamicUserResource
public abstract class ComboButtonBase extends AbstractJava2DUserResource implements StateHolderResource {
private static final Dimension DIMENSION = new Dimension(15, 15);
- protected Integer arrowColor;
+ private Integer arrowColor;
+ private String colorName = Skin.GENERAL_TEXT_COLOR;
public ComboButtonBase() {
super(DIMENSION);
}
+ @PostConstructResource
+ public final void initialize() {
+ FacesContext context = FacesContext.getCurrentInstance();
+ Skin skin = SkinFactory.getInstance(context).getSkin(context);
+ Skin defaultSkin = SkinFactory.getInstance(context).getDefaultSkin(context);
+
+ this.arrowColor = skin.getColorParameter(context, Skin.TABLE_BORDER_COLOR);
+ this.arrowColor = skin.getColorParameter(context, colorName);
+ if (this.arrowColor == null) {
+ this.arrowColor = defaultSkin.getColorParameter(context, colorName);
+ }
+ }
+
+ protected final void setColorName(String colorName) {
+ this.colorName = colorName;
+ }
+
public boolean isTransient() {
return false;
}
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/ComboDisabledDownButton.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/ComboDisabledDownButton.java 2011-02-09 09:35:26 UTC (rev 21557)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/ComboDisabledDownButton.java 2011-02-09 09:42:29 UTC (rev 21558)
@@ -22,19 +22,11 @@
package org.richfaces.renderkit.html.images;
-import javax.faces.context.FacesContext;
-
-import org.richfaces.resource.PostConstructResource;
import org.richfaces.skin.Skin;
-import org.richfaces.skin.SkinFactory;
public class ComboDisabledDownButton extends ComboButtonBase {
- @PostConstructResource
- public final void initialize() {
- FacesContext context = FacesContext.getCurrentInstance();
- Skin skin = SkinFactory.getInstance(context).getSkin(context);
-
- this.arrowColor = skin.getColorParameter(context, Skin.TABLE_BORDER_COLOR);
+ public ComboDisabledDownButton() {
+ setColorName(Skin.TABLE_BORDER_COLOR);
}
}
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/ComboDownButton.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/ComboDownButton.java 2011-02-09 09:35:26 UTC (rev 21557)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/html/images/ComboDownButton.java 2011-02-09 09:42:29 UTC (rev 21558)
@@ -22,19 +22,11 @@
package org.richfaces.renderkit.html.images;
-import javax.faces.context.FacesContext;
-
-import org.richfaces.resource.PostConstructResource;
import org.richfaces.skin.Skin;
-import org.richfaces.skin.SkinFactory;
public class ComboDownButton extends ComboButtonBase {
- @PostConstructResource
- public final void initialize() {
- FacesContext context = FacesContext.getCurrentInstance();
- Skin skin = SkinFactory.getInstance(context).getSkin(context);
-
- this.arrowColor = skin.getColorParameter(context, Skin.GENERAL_TEXT_COLOR);
+ public ComboDownButton() {
+ setColorName(Skin.GENERAL_TEXT_COLOR);
}
}
Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/html/images/TreeLineImage.java
===================================================================
--- trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/html/images/TreeLineImage.java 2011-02-09 09:35:26 UTC (rev 21557)
+++ trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/html/images/TreeLineImage.java 2011-02-09 09:42:29 UTC (rev 21558)
@@ -61,13 +61,16 @@
FacesContext context = FacesContext.getCurrentInstance();
Skin skin = SkinFactory.getInstance(context).getSkin(context);
+ Skin defaultSkin = SkinFactory.getInstance(context).getDefaultSkin(context);
trimColorValue = skin.getColorParameter(context, Skin.TRIM_COLOR);
+ if (trimColorValue == null) {
+ trimColorValue = defaultSkin.getColorParameter(context, Skin.TRIM_COLOR);
+ }
}
public void paint(Graphics2D g2d) {
g2d.setColor(new Color(trimColorValue));
-
g2d.drawLine(7, 0, 7, 15);
}
@@ -82,5 +85,4 @@
public boolean isTransient() {
return false;
}
-
}
Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/html/images/TreePlusImage.java
===================================================================
--- trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/html/images/TreePlusImage.java 2011-02-09 09:35:26 UTC (rev 21557)
+++ trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/html/images/TreePlusImage.java 2011-02-09 09:42:29 UTC (rev 21558)
@@ -60,13 +60,21 @@
@PostConstructResource
public void init() {
+ generalColorValue = getColorParameter(Skin.GENERAL_TEXT_COLOR);
+ controlColorValue = getColorParameter(Skin.CONTROL_BACKGROUND_COLOR);
+ trimColorValue = getColorParameter(Skin.TRIM_COLOR);
+ }
+
+ protected Integer getColorParameter(String property) {
FacesContext context = FacesContext.getCurrentInstance();
-
Skin skin = SkinFactory.getInstance(context).getSkin(context);
+ Skin defaultSkin = SkinFactory.getInstance(context).getDefaultSkin(context);
- generalColorValue = skin.getColorParameter(context, Skin.GENERAL_TEXT_COLOR);
- controlColorValue = skin.getColorParameter(context, Skin.CONTROL_BACKGROUND_COLOR);
- trimColorValue = skin.getColorParameter(context, Skin.TRIM_COLOR);
+ Integer value = skin.getColorParameter(context, property);
+ if (value == null) {
+ value = defaultSkin.getColorParameter(context, property);
+ }
+ return value;
}
protected void drawFrame(Graphics2D g2d) {
@@ -108,7 +116,7 @@
}
public void readState(FacesContext context, DataInput dataInput) throws IOException {
- generalColorValue = dataInput.readInt();
+ generalColorValue = dataInput.readInt();
controlColorValue = dataInput.readInt();
trimColorValue = dataInput.readInt();
}
@@ -116,5 +124,4 @@
public boolean isTransient() {
return false;
}
-
}
Deleted: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarAnimatedBackgroundImage.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarAnimatedBackgroundImage.java 2011-02-09 09:35:26 UTC (rev 21557)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarAnimatedBackgroundImage.java 2011-02-09 09:42:29 UTC (rev 21558)
@@ -1,141 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.richfaces.renderkit.html;
-
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.GradientPaint;
-import java.awt.Graphics;
-import java.awt.Graphics2D;
-import java.awt.image.BufferedImage;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import javax.faces.context.FacesContext;
-
-import org.richfaces.renderkit.util.ColorUtils;
-import org.richfaces.resource.AbstractJava2DUserResource;
-import org.richfaces.resource.DynamicUserResource;
-import org.richfaces.resource.ImageType;
-import org.richfaces.resource.Java2DAnimatedUserResource;
-import org.richfaces.resource.StateHolderResource;
-import org.richfaces.skin.Skin;
-import org.richfaces.skin.SkinFactory;
-
-/**
- * @author Nick Belaevski
- *
- */
-//TODO - add version
-@DynamicUserResource
-public class ProgressBarAnimatedBackgroundImage extends AbstractJava2DUserResource implements Java2DAnimatedUserResource, StateHolderResource {
-
- private static final int NUMBER_OF_FRAMES = 12;
-
- private static final Dimension DIMENSION = new Dimension(24, 48);
-
- private int frameNumber = 0;
-
- private Color basicColor;
-
- public ProgressBarAnimatedBackgroundImage() {
- super(ImageType.GIF, DIMENSION);
- }
-
- public boolean isLooped() {
- return true;
- }
-
- public int getFrameDelay() {
- return 1000;
- }
-
- public void startFramesSequence() {
- frameNumber = 0;
- }
-
- public boolean hasNextFrame() {
- return frameNumber < NUMBER_OF_FRAMES;
- }
-
- /**
- * Creates a main stage for progress bar background.
- *
- * @param context
- * resource context
- * @return a <code>BufferedImage</code> object
- */
- private BufferedImage createMainStage() {
- Color progressbarBackgroundColor = basicColor;
- Color progressbarSpiralColor = ColorUtils.adjustLightness(basicColor, 0.2f);
-
- Dimension dimension = getDimension();
- BufferedImage retVal = getImageType().createImage(dimension.width, dimension.height * 2);
- Graphics g = retVal.getGraphics();
- try {
- g.setColor(progressbarBackgroundColor);
- g.fillRect(0, 0, dimension.width, dimension.height * 2);
- g.setColor(progressbarSpiralColor);
- for (int k : new int[] { -24, 0, 24, 48, 72 }) {
- g.fillPolygon(new int[] { 0, 24, 24, 0 }, new int[] { 24 + k, k, 12 + k, 36 + k }, 4);
- }
- } finally {
- if (g != null) {
- g.dispose();
- }
- }
-
- return retVal;
- }
-
- public void paint(Graphics2D g2d) {
- frameNumber++;
-
- Dimension dimension = getDimension();
-
- BufferedImage mainStage = createMainStage();
- BufferedImage frame = mainStage.getSubimage(0, 48 - frameNumber * 2, dimension.width, dimension.height);
- g2d.drawImage(frame, null, null);
- Color progressbarShadowStartColor = ColorUtils.overwriteAlpha(ColorUtils.adjustLightness(basicColor, 0.7f), 0.6f);
- Color progressbarShadowEndColor = ColorUtils.overwriteAlpha(ColorUtils.adjustLightness(basicColor, 0.3f), 0.6f);
- // paint a shadow in the form of semi-transparent gradient
- g2d.setPaint(new GradientPaint(0, 0, progressbarShadowStartColor, 0, 7, progressbarShadowEndColor));
- g2d.fillRect(0, 0, dimension.width, 7);
- }
-
- public boolean isTransient() {
- return false;
- }
-
- public void writeState(FacesContext context, DataOutput dataOutput) throws IOException {
- // TODO Auto-generated method stub
- Skin skin = SkinFactory.getInstance(context).getSkin(context);
- Integer color = skin.getColorParameter(context, Skin.SELECT_CONTROL_COLOR);
- dataOutput.writeInt(color.intValue());
- }
-
- public void readState(FacesContext context, DataInput dataInput) throws IOException {
- basicColor = new Color(dataInput.readInt());
- }
-
-}
Added: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/images/ProgressBarAnimatedBackgroundImage.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/images/ProgressBarAnimatedBackgroundImage.java (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/images/ProgressBarAnimatedBackgroundImage.java 2011-02-09 09:42:29 UTC (rev 21558)
@@ -0,0 +1,150 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.renderkit.html.images;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.GradientPaint;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import javax.faces.context.FacesContext;
+
+import org.richfaces.renderkit.util.ColorUtils;
+import org.richfaces.resource.AbstractJava2DUserResource;
+import org.richfaces.resource.DynamicUserResource;
+import org.richfaces.resource.ImageType;
+import org.richfaces.resource.Java2DAnimatedUserResource;
+import org.richfaces.resource.PostConstructResource;
+import org.richfaces.resource.StateHolderResource;
+import org.richfaces.skin.Skin;
+import org.richfaces.skin.SkinFactory;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+//TODO - add version
+@DynamicUserResource
+public class ProgressBarAnimatedBackgroundImage extends AbstractJava2DUserResource implements Java2DAnimatedUserResource, StateHolderResource {
+
+ private static final int NUMBER_OF_FRAMES = 12;
+
+ private static final Dimension DIMENSION = new Dimension(24, 48);
+
+ private int frameNumber = 0;
+
+ private Integer basicColor;
+
+ public ProgressBarAnimatedBackgroundImage() {
+ super(ImageType.GIF, DIMENSION);
+ }
+
+ public boolean isLooped() {
+ return true;
+ }
+
+ public int getFrameDelay() {
+ return 1000;
+ }
+
+ public void startFramesSequence() {
+ frameNumber = 0;
+ }
+
+ public boolean hasNextFrame() {
+ return frameNumber < NUMBER_OF_FRAMES;
+ }
+
+ @PostConstructResource
+ public void initialize() {
+ FacesContext context = FacesContext.getCurrentInstance();
+ Skin skin = SkinFactory.getInstance(context).getSkin(context);
+ Skin defaultSkin = SkinFactory.getInstance(context).getDefaultSkin(context);
+ basicColor = skin.getColorParameter(context, Skin.SELECT_CONTROL_COLOR);
+ if (basicColor == null) {
+ basicColor = defaultSkin.getColorParameter(context, Skin.SELECT_CONTROL_COLOR);
+ }
+ }
+
+ /**
+ * Creates a main stage for progress bar background.
+ *
+ * @param context
+ * resource context
+ * @return a <code>BufferedImage</code> object
+ */
+ private BufferedImage createMainStage() {
+ Color progressbarBackgroundColor = new Color(basicColor);
+ Color progressbarSpiralColor = ColorUtils.adjustLightness(progressbarBackgroundColor, 0.2f);
+
+ Dimension dimension = getDimension();
+ BufferedImage retVal = getImageType().createImage(dimension.width, dimension.height * 2);
+ Graphics g = retVal.getGraphics();
+ try {
+ g.setColor(progressbarBackgroundColor);
+ g.fillRect(0, 0, dimension.width, dimension.height * 2);
+ g.setColor(progressbarSpiralColor);
+ for (int k : new int[] { -24, 0, 24, 48, 72 }) {
+ g.fillPolygon(new int[] { 0, 24, 24, 0 }, new int[] { 24 + k, k, 12 + k, 36 + k }, 4);
+ }
+ } finally {
+ if (g != null) {
+ g.dispose();
+ }
+ }
+
+ return retVal;
+ }
+
+ public void paint(Graphics2D g2d) {
+ frameNumber++;
+
+ Dimension dimension = getDimension();
+
+ BufferedImage mainStage = createMainStage();
+ BufferedImage frame = mainStage.getSubimage(0, 48 - frameNumber * 2, dimension.width, dimension.height);
+ g2d.drawImage(frame, null, null);
+ Color progressbarBackgroundColor = new Color(basicColor);
+ Color progressbarShadowStartColor = ColorUtils.overwriteAlpha(ColorUtils.adjustLightness(progressbarBackgroundColor, 0.7f), 0.6f);
+ Color progressbarShadowEndColor = ColorUtils.overwriteAlpha(ColorUtils.adjustLightness(progressbarBackgroundColor, 0.3f), 0.6f);
+ // paint a shadow in the form of semi-transparent gradient
+ g2d.setPaint(new GradientPaint(0, 0, progressbarShadowStartColor, 0, 7, progressbarShadowEndColor));
+ g2d.fillRect(0, 0, dimension.width, 7);
+ }
+
+ public boolean isTransient() {
+ return false;
+ }
+
+ public void writeState(FacesContext context, DataOutput dataOutput) throws IOException {
+ dataOutput.writeInt(basicColor);
+ }
+
+ public void readState(FacesContext context, DataInput dataInput) throws IOException {
+ basicColor = dataInput.readInt();
+ }
+}
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/images/ToolbarSeparatorImage.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/images/ToolbarSeparatorImage.java 2011-02-09 09:35:26 UTC (rev 21557)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/images/ToolbarSeparatorImage.java 2011-02-09 09:42:29 UTC (rev 21558)
@@ -19,32 +19,32 @@
public abstract class ToolbarSeparatorImage implements Java2DUserResource, StateHolderResource {
- private int headerBackgroundColor;
- private int separatorHeight;
- private int headerGradientColor;
+ private Integer headerBackgroundColor;
+ private Integer separatorHeight;
+ private Integer headerGradientColor;
- public int getHeaderBackgroundColor() {
+ public Integer getHeaderBackgroundColor() {
return headerBackgroundColor;
}
- public void setHeaderBackgroundColor(int bgColor) {
+ public void setHeaderBackgroundColor(Integer bgColor) {
this.headerBackgroundColor = bgColor;
}
- public int getSeparatorHeight() {
+ public Integer getSeparatorHeight() {
return separatorHeight;
}
@ResourceParameter(defaultValue = "9")
- public void setSeparatorHeight(int separatorHeight) {
+ public void setSeparatorHeight(Integer separatorHeight) {
this.separatorHeight = separatorHeight;
}
- public int getHeaderGradientColor() {
+ public Integer getHeaderGradientColor() {
return headerGradientColor;
}
- public void setHeaderGradientColor(int headerGradientColor) {
+ public void setHeaderGradientColor(Integer headerGradientColor) {
this.headerGradientColor = headerGradientColor;
}
@@ -95,5 +95,9 @@
tmp = (String) defaultSkin.getParameter(context, skinParameter);
}
this.setHeaderGradientColor(Color.decode(tmp == null ? "#CCCCFF" : tmp).getRGB());
+
+ if (getSeparatorHeight() == null) {
+ setSeparatorHeight(0);
+ }
}
}
Modified: trunk/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties 2011-02-09 09:35:26 UTC (rev 21557)
+++ trunk/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties 2011-02-09 09:42:29 UTC (rev 21558)
@@ -19,7 +19,7 @@
org.richfaces.images\:actRightTabBg.png=org.richfaces.renderkit.html.BaseGradient\
{width=26, height=5, baseColorParam=generalBackgroundColor, gradientColorParam=tabBackgroundColor, horizontal=true}
-org.richfaces.images\:pbAniBg.gif=org.richfaces.renderkit.html.ProgressBarAnimatedBackgroundImage
+org.richfaces.images\:pbAniBg.gif=org.richfaces.renderkit.html.images.ProgressBarAnimatedBackgroundImage
org.richfaces.images\:menu_list_bg.gif=org.richfaces.renderkit.html.BaseGradient\
{width=22, height=3, baseColorParam=additionalBackgroundColor, gradientColorParam=tabBackgroundColor, horizontal=true}
15 years, 2 months
JBoss Rich Faces SVN: r21557 - trunk/core/impl/src/main/resources/META-INF/resources.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2011-02-09 04:35:26 -0500 (Wed, 09 Feb 2011)
New Revision: 21557
Modified:
trunk/core/impl/src/main/resources/META-INF/resources/richfaces.js
Log:
https://issues.jboss.org/browse/RF-10365
Modified: trunk/core/impl/src/main/resources/META-INF/resources/richfaces.js
===================================================================
--- trunk/core/impl/src/main/resources/META-INF/resources/richfaces.js 2011-02-09 08:30:47 UTC (rev 21556)
+++ trunk/core/impl/src/main/resources/META-INF/resources/richfaces.js 2011-02-09 09:35:26 UTC (rev 21557)
@@ -408,7 +408,7 @@
ignoreSuccess = true;
} else if (ignoreSuccess) {
return;
- } else if (status == 'complete' && richfaces.ajaxContainer.isIgnoreResponse && richfaces.ajaxContainer.isIgnoreResponse()) {
+ } else if (status == 'complete' && richfaces.ajaxContainer && richfaces.ajaxContainer.isIgnoreResponse && richfaces.ajaxContainer.isIgnoreResponse()) {
return;
}
15 years, 2 months
JBoss Rich Faces SVN: r21556 - management/design-4x/showcase_markup.
by richfaces-svn-commits@lists.jboss.org
Author: Ochikvina
Date: 2011-02-09 03:30:47 -0500 (Wed, 09 Feb 2011)
New Revision: 21556
Modified:
management/design-4x/showcase_markup/index.html
management/design-4x/showcase_markup/styles.css
Log:
Updated markup.
Modified: management/design-4x/showcase_markup/index.html
===================================================================
--- management/design-4x/showcase_markup/index.html 2011-02-09 03:37:42 UTC (rev 21555)
+++ management/design-4x/showcase_markup/index.html 2011-02-09 08:30:47 UTC (rev 21556)
@@ -50,7 +50,7 @@
</div>
<div id="page-content">
<div class="left-menu">
- <div style="height:800px;border:1px solid black;">Panel Menu</div>
+ <div style="height:700px;border:1px solid black;">Panel Menu</div>
</div>
<div class="content-container">
<p>Welcome to the demo site for the <strong>RichFaces</strong> project!</p>
@@ -58,6 +58,7 @@
capabilities into business applications. This demo is the reference for all <strong>RichFaces</strong> components with examples.</p>
<p>The project homepage is located at <a href="http://jboss.org/richfaces">http://jboss.org/richfaces</a>.</p>
</div>
+ <div class="clear"></div>
</div>
<div id="footer">
RichFaces Core Implementation by JBoss, a division of Red Hat, Inc., version v.4.0.0-SNAPSHOT SVN r.20520
Modified: management/design-4x/showcase_markup/styles.css
===================================================================
--- management/design-4x/showcase_markup/styles.css 2011-02-09 03:37:42 UTC (rev 21555)
+++ management/design-4x/showcase_markup/styles.css 2011-02-09 08:30:47 UTC (rev 21556)
@@ -110,14 +110,6 @@
min-height:520px;
padding:10px 20px 0;
}
-#page-content:after{
- content: ".";
- display: block;
- clear: both;
- visibility: hidden;
- line-height: 0;
- height: 0;
-}
#page-content .left-menu{
float:left;
margin:5px 10px 5px 0;
@@ -132,4 +124,8 @@
color:#2d4351;
text-align:center;
padding:15px 20px 10px;
+}
+.clear{
+ clear:both;
+ height:0%;
}
\ No newline at end of file
15 years, 2 months
JBoss Rich Faces SVN: r21555 - in modules/docs/trunk/Component_Reference/src/main/docbook/en-US: extras and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2011-02-08 22:37:42 -0500 (Tue, 08 Feb 2011)
New Revision: 21555
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-Table_sorting-External_sorting.xml_sample
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-Tables_and_grids-richextendedDataTable_example.xml_sample
Log:
Updated sorting information as per RF-10445
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml 2011-02-08 23:55:43 UTC (rev 21554)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml 2011-02-09 03:37:42 UTC (rev 21555)
@@ -927,39 +927,15 @@
<section id="sect-Component_Reference-richextendedDataTable-Filtering">
<title>Filtering</title>
<para>
- <!--
- The example uses the <literal>filter</literal> facet of the <sgmltag><rich:column></sgmltag> component to display the text field.
- -->
- A user can type their criteria into the text field to customize the filter of the column below. For full details on filtering tables, refer to <xref linkend="sect-Component_Reference-Tables_and_grids-Table_filtering" />.
+ The example table features a text field as part of the header of a column. A user can type their criteria into the text field to customize the filter of the column below. For full details on filtering tables, refer to <xref linkend="sect-Component_Reference-Tables_and_grids-Table_filtering" />.
</para>
</section>
<section id="sect-Component_Reference-richextendedDataTable-Sorting">
<title>Sorting</title>
- <!--
<para>
- When hovering the mouse over a column header, a menu button appears to the right-hand side, as shown in <xref linkend="figu-Component_Reference-richextendedDataTable-Column_menu" />. This menu allows the user to sort the contents of the column, group the table by the column, or hide and show columns.
+ The example table features controls in the column headers for sorting the the table according to the relevant column. The value of the data model to sort by is specified with the <varname>sortBy</varname> attribute. For full details on sorting tables, refer to <xref linkend="sect-Component_Reference-Tables_and_grids-Table_sorting" />.
</para>
- <figure id="figu-Component_Reference-richextendedDataTable-Column_menu">
- <title>Column menu</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/figu-Component_Reference-Tables_and_grids-Column_menu.png" format="PNG" width="444" />
- </imageobject>
- <textobject>
- <para>
- The menu for sorting, grouping, and hiding or showing columns.
- </para>
- </textobject>
- </mediaobject>
- </figure>
- -->
- <para>
- <!--
- Each column can allow sorting by setting the <sgmltag><rich:column></sgmltag> component's <varname>sortable</varname> attribute to <literal>true</literal>.
- -->
- Each column can be used to sort the contents of the table. The value of the data model to sort by is specified with the <varname>sortBy</varname> attribute. Columns can be quickly sorted either ascending or descending by clicking on the directional icon next to the column title. The directional icons are defined in each <sgmltag><rich:column></sgmltag> component with the <varname>sortIconAscending</varname> and <varname>sortIconDescending</varname> attributes, for ascending and descending icons respectively. For full details on sorting tables, refer to <xref linkend="sect-Component_Reference-Tables_and_grids-Table_sorting" />.
- </para>
</section>
<!--
@@ -1412,7 +1388,7 @@
</important>
<para>
- Tables entries can be sorted by the user through either the basic method built in to the <sgmltag><rich:column></sgmltag> component, or by defining external sorting algorithms. Refer to <xref linkend="sect-Component_Reference-Tables_and_grids-richcolumn" /> for details on using the <sgmltag><rich:column></sgmltag> component in tables.
+ Tables entries can be sorted <!--by the user through either the basic method built in to the <sgmltag><rich:column></sgmltag> component, or -->by defining external sorting algorithms. Refer to <xref linkend="sect-Component_Reference-Tables_and_grids-richcolumn" /> for details on using the <sgmltag><rich:column></sgmltag> component in tables.
</para>
<note>
<title>Sorting non-English tables</title>
@@ -1421,6 +1397,7 @@
</para>
</note>
+ <!--
<section id="sect-Component_Reference-Tables_and_grids-Basic_sorting">
<title>Basic sorting</title>
<para>
@@ -1453,15 +1430,13 @@
Use the <varname>sortMode</varname> attribute to determine how multiple columns are sorted. By default, the value of the <varname>sortMode</varname> attribute is <literal>single</literal>, so tables are only sorted by a single column. Each time the header of a column is clicked the entire table is re-sorted according to that column. Set <code>sortMode="multiple"</code> to allow tables to be sorted by a primary column, then by a secondary column, and so on.
</para>
</section>
+ -->
<section id="sect-Component_Reference-Table_sorting-External_sorting">
<title>External sorting</title>
<para>
- If you require more advanced sorting using custom functions or expressions, use the external sorting properties of the <sgmltag><rich:column></sgmltag> component.
+ Bind the <varname>sortOrder</varname> attribute to bean properties to manage the sorting order externally. The bean must handle all the sorting algorithms. <xref linkend="exam-Component_Reference-Table_sorting-External_sorting" /> demonstrates table sorting using an external control.
</para>
- <para>
- Deactivate the built-in sorting by setting <code>selfSorted="false"</code> for the <sgmltag><rich:column></sgmltag> component. You can then bind the <varname>sortOrder</varname> attribute to bean properties and manage the sorting order externally.
- </para>
<example id="exam-Component_Reference-Table_sorting-External_sorting">
<title>External sorting</title>
<programlisting language="XML" role="XML"><xi:include parse="text" href="extras/exam-Component_Reference-Table_sorting-External_sorting.xml_sample" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-Table_sorting-External_sorting.xml_sample
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-Table_sorting-External_sorting.xml_sample 2011-02-08 23:55:43 UTC (rev 21554)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-Table_sorting-External_sorting.xml_sample 2011-02-09 03:37:42 UTC (rev 21555)
@@ -2,28 +2,28 @@
var="category" rows="20" id="table" reRender="ds2"
sortPriority="#{sortingBean.prioritList}">
<rich:column id="make" sortBy="#{category.make}"
- sortOrder="#{sortingBean.makeDirection}" selfSorted="false">
+ sortOrder="#{sortingBean.makeDirection}">
<f:facet name="header">
<h:outputText styleClass="headerText" value="Make" />
</f:facet>
<h:outputText value="#{category.make}" />
</rich:column>
<rich:column id="model" sortBy="#{category.model}"
- sortOrder="#{sortingBean.modelDirection}" selfSorted="false">
+ sortOrder="#{sortingBean.modelDirection}">
<f:facet name="header">
<h:outputText styleClass="headerText" value="Model" />
</f:facet>
<h:outputText value="#{category.model}" />
</rich:column>
<rich:column id="price" sortBy="#{category.price}"
- sortOrder="#{sortingBean.priceDirection}" selfSorted="false">
+ sortOrder="#{sortingBean.priceDirection}">
<f:facet name="header">
<h:outputText styleClass="headerText" value="Price" />
</f:facet>
<h:outputText value="#{category.price}" />
</rich:column>
<rich:column id="mileage" sortBy="#{category.mileage}"
- sortOrder="#{sortingBean.mileageDirection}" selfSorted="false">
+ sortOrder="#{sortingBean.mileageDirection}">
<f:facet name="header">
<h:outputText styleClass="headerText" value="Mileage" />
</f:facet>
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-Tables_and_grids-richextendedDataTable_example.xml_sample
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-Tables_and_grids-richextendedDataTable_example.xml_sample 2011-02-08 23:55:43 UTC (rev 21554)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-Tables_and_grids-richextendedDataTable_example.xml_sample 2011-02-09 03:37:42 UTC (rev 21555)
@@ -1,24 +1,24 @@
<rich:extendedDataTable id="edt" value="#{extendedDT.dataModel}" var="edt" width="500px" height="500px" selectedClass="dataTableSelectedRow" sortMode="single" selectionMode="multi" selection="#{extendedDT.selection}" rowKeyVar="rkvar" tableState="#{extendedDT.tableState}">
- <rich:column id="id" headerClass="dataTableHeader" width="50" label="Id" sortable="true" sortBy="#{edt.id}" sortIconAscending="dataTableAscIcon" sortIconDescending="dataTableDescIcon">
+ <rich:column id="id" headerClass="dataTableHeader" width="50" label="Id" sortBy="#{edt.id}">
<f:facet name="header">
<h:outputText value="Id" />
</f:facet>
<h:outputText value="#{edt.id}" />
</rich:column>
- <rich:column id="name" width="300" headerClass="dataTableHeader" label="Name" sortable="true" sortBy="#{edt.name}" sortIconAscending="dataTableAscIcon" sortIconDescending="dataTableDescIcon" filterBy="#{edt.name}" filterEvent="keyup" visible="false">
+ <rich:column id="name" width="300" headerClass="dataTableHeader" label="Name" sortBy="#{edt.name}" filterBy="#{edt.name}" filterEvent="keyup" visible="false">
<f:facet name="header">
<h:outputText value="Name" />
</f:facet>
<h:outputText value="#{edt.name}" />
</rich:column>
- <rich:column id="date" width="100" headerClass="dataTableHeader" label="Date" sortable="true" comparator="#{extendedDT.dateComparator}" sortIconAscending="dataTableAscIcon" sortIconDescending="dataTableDescIcon">
+ <rich:column id="date" width="100" headerClass="dataTableHeader" label="Date" comparator="#{extendedDT.dateComparator}">
<f:facet name="header">
<h:outputText value="Date" />
</f:facet>
<h:outputText value="#{edt.date}"><f:convertDateTime pattern="yyyy-MM-dd HH:mm:ss" />
</h:outputText>
</rich:column>
- <rich:column id="group" width="50" headerClass="dataTableHeader" label="Group" sortable="true" sortBy="#{edt.group}" sortIconAscending="dataTableAscIcon" sortIconDescending="dataTableDescIcon">
+ <rich:column id="group" width="50" headerClass="dataTableHeader" label="Group" sortBy="#{edt.group}">
<f:facet name="header">
<h:outputText value="Group" />
</f:facet>
15 years, 2 months
JBoss Rich Faces SVN: r21554 - trunk/ui/validator/ui/src/main/java/org/richfaces/validator.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2011-02-08 18:55:43 -0500 (Tue, 08 Feb 2011)
New Revision: 21554
Modified:
trunk/ui/validator/ui/src/main/java/org/richfaces/validator/FacesBeanValidator.java
Log:
Fix 'NonSerialisableException'
Modified: trunk/ui/validator/ui/src/main/java/org/richfaces/validator/FacesBeanValidator.java
===================================================================
--- trunk/ui/validator/ui/src/main/java/org/richfaces/validator/FacesBeanValidator.java 2011-02-08 23:23:53 UTC (rev 21553)
+++ trunk/ui/validator/ui/src/main/java/org/richfaces/validator/FacesBeanValidator.java 2011-02-08 23:55:43 UTC (rev 21554)
@@ -44,7 +44,7 @@
/**
* Implementation of the JSF validator to use with Bean Validation / Hibernate validator
- *
+ * TODO - implement partial state saving.
* @author asmirnov
*
*/
@@ -63,10 +63,8 @@
private ValueExpression groupsExpression = null;
private Class<?>[] groups = null;
- private BeanValidatorService validatorService;
public FacesBeanValidator() {
- this.validatorService = ServiceTracker.getService(BeanValidatorService.class);
}
/**
* @return the summary
@@ -110,6 +108,7 @@
try {
ValueExpression valueExpression = component.getValueExpression("value");
if (null != valueExpression) {
+ BeanValidatorService validatorService = ServiceTracker.getService(BeanValidatorService.class);
Collection<String> messages =
validatorService.validateExpression(context, valueExpression, convertedValue,
getGroups());
@@ -157,6 +156,7 @@
public Collection<String> validateGraph(FacesContext context, UIComponent component, Object value,
Class<?>[] groups) throws ValidatorException {
+ BeanValidatorService validatorService = ServiceTracker.getService(BeanValidatorService.class);
Collection<String> messages = validatorService.validateObject(context, value, groups);
return messages;
}
15 years, 2 months