Package org.apache.cocoon.forms.event

Examples of org.apache.cocoon.forms.event.ValueChangedEvent


                } catch (Exception exc) {
                    throw Context.reportRuntimeError(exc.getMessage());
                }
            }
        } else if (e instanceof ValueChangedEvent) {
            ValueChangedEvent vce = (ValueChangedEvent)e;
            Object obj = super.get("onChange", this);
            if (obj instanceof Function) {
                try {
                    Function fun = (Function)obj;
                    Object[] args = new Object[2];
                    Scriptable scope = getTopLevelScope(this);
                    Scriptable thisObj = scope;
                    Context cx = Context.getCurrentContext();
                    args[0] = vce.getOldValue();
                    args[1] = vce.getNewValue();
                    fun.call(cx, scope, thisObj, args);
                } catch (Exception exc) {
                    throw Context.reportRuntimeError(exc.getMessage());
                }
            }
View Full Code Here


                } catch (Exception exc) {
                    throw Context.reportRuntimeError(exc.getMessage());
                }
            }
        } else if (e instanceof ValueChangedEvent) {
            ValueChangedEvent vce = (ValueChangedEvent)e;
            Object obj = super.get("onChange", this);
            if (obj instanceof Function) {
                try {
                    Function fun = (Function)obj;
                    Object[] args = new Object[2];
                    Scriptable scope = getTopLevelScope(this);
                    Scriptable thisObj = scope;
                    Context cx = Context.getCurrentContext();
                    args[0] = vce.getOldValue();
                    args[1] = vce.getNewValue();
                    fun.call(cx, scope, thisObj, args);
                } catch (Exception exc) {
                    throw Context.reportRuntimeError(exc.getMessage());
                }
            }
View Full Code Here

            } else {
                this.enteredValue = null;
            }

            if (callListeners) {
                getForm().addWidgetEvent(new ValueChangedEvent(this, oldValue, newValue));
            }
            getForm().addWidgetUpdate(this);
        }
    }
View Full Code Here

        }
        if (!ObjectUtils.equals(value, object)) {
            Object oldValue = value;
            value = object;
            if (hasValueChangedListeners() || getForm().hasFormHandler()) {
                getForm().addWidgetEvent(new ValueChangedEvent(this, oldValue, value));
            }
            getForm().addWidgetUpdate(this);
        }
    }
View Full Code Here

        String param = formContext.getRequest().getParameter(getRequestParameterName());

        value = BooleanUtils.toBooleanObject(definition.getTrueParamValue().equals(param));

        if (!value.equals(oldValue)) {
            getForm().addWidgetEvent(new ValueChangedEvent(this, oldValue, value));
        }
    }
View Full Code Here

        Object oldValue = value;
        value = (Boolean)object;
        if (!value.equals(oldValue)) {
            Form form = getForm();
            if (hasValueChangedListeners() || this.getForm().hasFormHandler()) {
                form.addWidgetEvent(new ValueChangedEvent(this, oldValue, value));
            }
            form.addWidgetUpdate(this);
        }
    }
View Full Code Here

        }
        if (!ObjectUtils.equals(value, object)) {
            Object oldValue = value;
            value = object;
            if (hasValueChangedListeners() || getForm().hasFormHandler()) {
                getForm().addWidgetEvent(new ValueChangedEvent(this, oldValue, value));
            }
            getForm().addWidgetUpdate(this);
        }
    }
View Full Code Here

        GoogleMapValue oldValue = this.value;
        value = newValue;

        if (!value.equals(oldValue)) {
            getForm().addWidgetEvent(new ValueChangedEvent(this, oldValue, value));
        }
    }
View Full Code Here

        // And keep the current state if the parameter doesn't exist or is null
    }

    private void changed() {
        if (this.hasValueChangedListeners() || this.getForm().hasFormHandler()) {
            this.getForm().addWidgetEvent(new ValueChangedEvent(this, null, this.part));
        }
        getForm().addWidgetUpdate(this);
    }
View Full Code Here

            } else {
                this.enteredValue = null;
            }

            if (callListeners) {
                getForm().addWidgetEvent(new ValueChangedEvent(this, oldValue, newValue));
            }
            getForm().addWidgetUpdate(this);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.cocoon.forms.event.ValueChangedEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.