Package org.useware.kernel.gui.behaviour

Examples of org.useware.kernel.gui.behaviour.PresentationEvent$PresentationHandler


                Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
                    @Override
                    public void execute() {

                        PresentationEvent presentation = new PresentationEvent(getJustification());

                        // the result is either a single resource or a collection
                        ModelNode result = response.get(RESULT);
                        if(ModelType.LIST==result.getType())
                        {
                            List<ModelNode> collection = result.asList();
                            List normalized = new ArrayList<ModelNode>(collection.size());
                            for(ModelNode model : collection)
                            {
                                ModelNode payload = model.get(RESULT).asObject();
                                assignKeyFromAddressNode(payload, model.get(ADDRESS));
                                normalized.add(payload);
                            }
                            presentation.setPayload(normalized);
                        }
                        else
                        {
                            ModelNode payload = result.asObject();
                            assignKeyFromAddressNode(payload, operation.get(ADDRESS));
                            presentation.setPayload(payload);
                        }

                        // unit and target are the same
                        presentation.setTarget(getJustification());

                        coordinator.fireEvent(presentation);
                    }
                });
View Full Code Here


                Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
                    @Override
                    public void execute() {

                        PresentationEvent presentation = new PresentationEvent(getJustification());

                        // the result is either a single resource or a collection
                        ModelNode result = response.get(RESULT);
                        if(ModelType.LIST==result.getType())
                        {
                            List<ModelNode> collection = result.asList();
                            List normalized = new ArrayList<ModelNode>(collection.size());
                            for(ModelNode model : collection)
                            {
                                ModelNode payload = model.get(RESULT).asObject();
                                assignKeyFromAddressNode(payload, model.get(ADDRESS));
                                normalized.add(payload);
                            }
                            presentation.setPayload(normalized);
                        }
                        else
                        {
                            ModelNode payload = result.asObject();
                            assignKeyFromAddressNode(payload, operation.get(ADDRESS));
                            presentation.setPayload(payload);
                        }

                        // unit and target are the same
                        presentation.setTarget(getJustification());

                        coordinator.fireEvent(presentation);
                    }
                });
View Full Code Here

                Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
                    @Override
                    public void execute() {

                        PresentationEvent presentation = new PresentationEvent(getJustification());

                        // the result is either a single resource or a collection
                        ModelNode result = response.get(RESULT);
                        if(ModelType.LIST==result.getType())
                        {
                            List<ModelNode> collection = result.asList();
                            List normalized = new ArrayList<ModelNode>(collection.size());
                            for(ModelNode model : collection)
                            {
                                ModelNode payload = model.get(RESULT).asObject();
                                assignKeyFromAddressNode(payload, model.get(ADDRESS));
                                normalized.add(payload);
                            }
                            presentation.setPayload(normalized);
                        }
                        else
                        {
                            ModelNode payload = result.asObject();
                            assignKeyFromAddressNode(payload, operation.get(ADDRESS));
                            presentation.setPayload(payload);
                        }

                        // unit and target are the same
                        presentation.setTarget(getJustification());

                        coordinator.fireEvent(presentation);
                    }
                });
View Full Code Here

                    Console.error("Failed to load resource", response.getFailureDescription());
                }
                else
                {

                    final PresentationEvent presentation = new PresentationEvent(getJustification());

                    // the result is either a single resource or a collection
                    ModelNode result = response.get(RESULT);

                    if(ModelType.LIST==result.getType())
                    {
                        List<ModelNode> collection = result.asList();
                        List normalized = new ArrayList<ModelNode>(collection.size());
                        for(ModelNode model : collection)
                        {
                            ModelNode payload = model.get(RESULT).asObject();
                            assignKeyFromAddressNode(payload, model.get(ADDRESS));
                            normalized.add(payload);
                        }
                        presentation.setPayload(normalized);
                    }
                    else
                    {
                        ModelNode payload = result.asObject();
                        assignKeyFromAddressNode(payload, operation.get(ADDRESS));
                        presentation.setPayload(payload);
                    }

                    // unit and target are the same
                    presentation.setTarget(getJustification());

                    Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
                        @Override
                        public void execute() {
                            coordinator.fireEvent(presentation);
View Full Code Here

TOP

Related Classes of org.useware.kernel.gui.behaviour.PresentationEvent$PresentationHandler

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.