Examples of BoundWidgetProvider


Examples of com.totsp.gwittir.client.ui.util.BoundWidgetProvider

        addressCols[3] = new Field("city", "City");
        addressCols[4] = new Field("state", "State");
        addressCols[5] = new Field("zip", "Zip");

        factory.add(StateLookup.class,
            new BoundWidgetProvider() {
                public BoundWidget get() {
                    Label label = new Label();
                    label.setRenderer(new Renderer() {
                            public Object render(Object o) {
                                return (o == null) ? "" : ((StateLookup) o).code;
                            }
                        });

                    return label;
                }
            });

        factory.add(TypeLookup.class,
            new BoundWidgetProvider() {
                public BoundWidget get() {
                    TextBox label = new TextBox();
                    label.setRenderer(new Renderer() {
                            public Object render(Object o) {
                                return (o == null) ? "" : ((TypeLookup) o).name;
                            }
                        });

                    return label;
                }
            });
        factory.add(String.class, BoundWidgetTypeFactory.LABEL_PROVIDER);
        factory.add(Address.class,
            new BoundWidgetProvider() {
                public BoundWidget get() {
                    AddressEdit e = new AddressEdit();
                    e.setAction(new AddressEditAction());

                    return e;
View Full Code Here

Examples of com.totsp.gwittir.client.ui.util.BoundWidgetProvider

            Object o = (Object) it.next();
            Class clazz = o.getClass();
            if( clazz == null ){
                throw new RuntimeException("Unable to resolve class "+ o.getClass().getName() );
            }
            BoundWidgetProvider provider =  this.getFactory().getWidgetProvider(clazz);
            if(provider == null){
                throw new RuntimeException("Unable to find a BoundWidgetProvider for class "+ clazz.getName() );
            }
            BoundWidget w = provider.get();
            try{
                w.setModel(o);
                if( this.getActionFactory() != null ){
                    ActionProvider ap = this.getActionFactory().getActionProvider(Introspector.INSTANCE.resolveClass(w));
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.