Package org.apache.myfaces.extensions.cdi.message.api

Examples of org.apache.myfaces.extensions.cdi.message.api.MessageContext.message()


    @Test
    public void cloneMessageContextTest()
    {
        MessageContext messageContext = this.messageContext.cloneContext();
        messageContext.message().text("{hello}").create();

        this.messageContext.config().change().addMessageHandler(new TestInMemoryMessageHandler());

        assertFalse(messageContext.config().getMessageHandler().equals(this.messageContext.config().getMessageHandler()));
    }
View Full Code Here


            return;
        }

        for(SecurityViolation violation : violations)
        {
            messageContext.message().text(violation.getReason()).payload(MessageSeverity.ERROR).add();
        }
    }
}
View Full Code Here

    @Test
    public void cloneMessageContextTest()
    {
        MessageContext messageContext = this.messageContext.cloneContext();
        messageContext.message().text("{hello}").create();

        this.messageContext.config().change().addMessageHandler(new TestInMemoryMessageHandler());

        assertFalse(messageContext.config().getMessageHandler().equals(this.messageContext.config().getMessageHandler()));
    }
View Full Code Here

            return;
        }

        for(SecurityViolation violation : violations)
        {
            messageContext.message().text(violation.getReason()).payload(MessageSeverity.ERROR).add();
        }
    }
}
View Full Code Here

            return;
        }

        for(SecurityViolation violation : violations)
        {
            messageContext.message().text(violation.getReason()).payload(MessageSeverity.ERROR).add();
        }
    }
}
View Full Code Here

    @Test
    public void cloneMessageContextTest()
    {
        MessageContext messageContext = this.messageContext.cloneContext();
        messageContext.message().text("{hello}").create();

        this.messageContext.config().change().addMessageHandler(new TestInMemoryMessageHandler());

        assertFalse(messageContext.config().getMessageHandler().equals(this.messageContext.config().getMessageHandler()));
    }
View Full Code Here

            return;
        }

        for(SecurityViolation violation : violations)
        {
            messageContext.message().text(violation.getReason()).payload(MessageSeverity.ERROR).add();
        }
    }
}
View Full Code Here

            return;
        }

        for(SecurityViolation violation : violations)
        {
            messageContext.message().text(violation.getReason()).payload(MessageSeverity.ERROR).add();
        }
    }
}
View Full Code Here

            //here you do what ever you want with exception
            if (businessException != null) {
                try {

                    MessageContext messageContext = CodiUtils.getContextualReferenceByClass(MessageContext.class, DefaultAnnotation.of(Jsf.class));
                    messageContext.message().text(businessException.getMessage()).payload(MessageSeverity.ERROR).add();

                } finally {
                    //remove it from queue
                    i.remove();
                }
View Full Code Here

            return;
        }

        for(SecurityViolation violation : violations)
        {
            messageContext.message().text(violation.getReason()).payload(MessageSeverity.ERROR).add();
        }
    }
}
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.