Package pt.ist.fenixWebFramework.renderers.components

Examples of pt.ist.fenixWebFramework.renderers.components.HtmlHiddenField


    public HtmlComponent render(Object object, Class type) {
        String prefix =
                HtmlComponent.getValidIdOrName(((MetaSlot) getInputContext().getMetaObject()).getKey().toString()
                        .replaceAll("\\.", "_").replaceAll("\\:", "_"));

        HtmlHiddenField hidden = new HtmlHiddenField(prefix + HIDDEN_NAME, "");

        HtmlBlockContainer container = (HtmlBlockContainer) super.render(object, type);
        HtmlHiddenField hiddenValue = null;
        for (HtmlComponent childComponent : container.getChildren()) {
            if ((childComponent instanceof HtmlHiddenField) && (childComponent.getId().endsWith("_AutoComplete"))) {
                hiddenValue = (HtmlHiddenField) childComponent;
            }
        }
        hiddenValue.setOnChange("this.form." + prefix + HIDDEN_NAME + ".value='true';this.form.submit();");
        hiddenValue.setController(new PostBackController(hidden, getDestination()));

        container.addChild(hidden);

        return container;
    }
View Full Code Here


    }

    private HtmlComponent decorateTable(HtmlTable table, List<? extends DomainObject> objects) {
        MetaObject bean = getContext().getMetaObject();

        HtmlHiddenField page = new HtmlHiddenField();
        HtmlHiddenField selected = new HtmlHiddenField();

        page.setValue(getCurrentPage());

        page.bind(bean, "page");
        selected.bind(bean, "selected");
        selected.setConverter(new DomainObjectKeyConverter());

        HtmlContainer container = new HtmlBlockContainer();
        container.addChild(page);
        container.addChild(selected);
View Full Code Here

TOP

Related Classes of pt.ist.fenixWebFramework.renderers.components.HtmlHiddenField

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.