Examples of ValueChangedEvent


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

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

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

            } else {
                this.enteredValue = null;
            }

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

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

        GoogleMapValue oldValue = this.value;
        value = newValue;

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

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

        // 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

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

        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

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

        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

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

                this.enteredValue = getDatatype().convertToString(newValue, getForm().getLocale());
            } else {
                this.enteredValue = null;
            }
            if (changed) {
                getForm().addWidgetEvent(new ValueChangedEvent(this, oldValue, newValue));
            }
        }
    }
View Full Code Here

Examples of org.apache.cocoon.woody.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

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

            value = Boolean.TRUE;
        else
            value = Boolean.FALSE;
       
        if (value != oldValue) {
            getForm().addWidgetEvent(new ValueChangedEvent(this, oldValue, value));
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.