Examples of PresentationEvent


Examples of org.jboss.mbui.gui.behaviour.PresentationEvent

                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

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

                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

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

                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

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

                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

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

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