Package javax.faces.component.behavior

Examples of javax.faces.component.behavior.AjaxBehavior


    /**
     * Components that render client behaviors should always render "id" and "name" attribute
     */
    public void testClientBehaviorHolderRendersIdAndName()
    {
        inputTextarea.addClientBehavior("keypress", new AjaxBehavior());
        try
        {
            inputTextarea.encodeAll(facesContext);
            String output = ((StringWriter) writer.getWriter()).getBuffer().toString();
            assertTrue(output.matches("(?s).+id=\".+\".+"));
View Full Code Here


    /**
     * Components that render client behaviors should always render "id" and "name" attribute
     */
    public void testClientBehaviorHolderRendersIdAndName()
    {
        inputText.addClientBehavior("keypress", new AjaxBehavior());
        try
        {
            inputText.encodeAll(facesContext);
            String output = ((StringWriter) writer.getWriter()).getBuffer().toString();
            assertTrue(output.matches(".+id=\".+\".+"));
View Full Code Here

    /**
     * Components that render client behaviors should always render "id" and "name" attribute
     */
    public void testClientBehaviorHolderRendersIdAndName()
    {
        outcomeTargetButton.addClientBehavior("keypress", new AjaxBehavior());
        try
        {
            outcomeTargetButton.encodeAll(facesContext);
            String output = ((StringWriter) writer.getWriter()).getBuffer().toString();
            assertTrue(output.matches(".+id=\".+\".+"));
View Full Code Here

       
        for (int i = 0; i < attrs.length; i++)
        {
            UIComponent component = createComponentToTest();
            ClientBehaviorHolder clientBehaviorHolder = (ClientBehaviorHolder) component;
            clientBehaviorHolder.addClientBehavior(attrs[i].getClientEvent(), new AjaxBehavior());
            try
            {
                component.encodeAll(facesContext);
                String output = outputWriter.toString();
                Assert.assertTrue(output.matches(".+ id=\".+\".+"));
View Full Code Here

       
        for (int i = 0; i < attrs.length; i++)
        {
            UIComponent component = createComponentToTest();
            ClientBehaviorHolder clientBehaviorHolder = (ClientBehaviorHolder) component;
            clientBehaviorHolder.addClientBehavior(attrs[i].getClientEvent(), new AjaxBehavior());
            try
            {
                component.encodeAll(facesContext);
                String output = outputWriter.toString();
                Assert.assertTrue(output.matches(".+ id=\".+\".+"));
View Full Code Here

       
        UISelectItem item2 = new UISelectItem();
        item2.setItemLabel("#2");
        item2.setItemValue("#2");
       
        selectOneListbox.addClientBehavior("keypress", new AjaxBehavior());
        try
        {
            selectOneListbox.getChildren().add(item1);
            selectOneListbox.getChildren().add(item2);
            selectOneListbox.encodeAll(facesContext);
View Full Code Here

       
        UISelectItem item2 = new UISelectItem();
        item2.setItemLabel("#2");
        item2.setItemValue("#2");
       
        selectManyListbox.addClientBehavior("keypress", new AjaxBehavior());
        try
        {
            selectManyListbox.getChildren().add(item1);
            selectManyListbox.getChildren().add(item2);
            selectManyListbox.encodeAll(facesContext);
View Full Code Here

    /**
     * Components that render client behaviors should always render "id" and "name" attribute
     */
    public void testClientBehaviorHolderRendersIdAndName()
    {
        dataTable.addClientBehavior("keypress", new AjaxBehavior());
        try
        {
            dataTable.encodeAll(facesContext);
            String output = ((StringWriter) writer.getWriter()).getBuffer().toString();
            assertTrue(output.matches("(?s).+id=\".+\".+"));
View Full Code Here

    /**
     * Components that render client behaviors should always render "id" and "name" attribute
     */
    public void testClientBehaviorHolderRendersIdAndNameOutputLink()
    {
        outputLink.addClientBehavior("keypress", new AjaxBehavior());
        try
        {
            outputLink.encodeAll(facesContext);
            String output = ((StringWriter) writer.getWriter()).getBuffer().toString();
            assertTrue(output.matches(".+id=\".+\".+"));
View Full Code Here

    /**
     * Components that render client behaviors should always render "id" and "name" attribute
     */
    public void testClientBehaviorHolderRendersIdAndNameCommandLink()
    {
        commandLink.addClientBehavior("keypress", new AjaxBehavior());
        try
        {
            commandLink.encodeAll(facesContext);
            String output = ((StringWriter) writer.getWriter()).getBuffer().toString();
            System.out.println("----OUTPUT----"+output);
View Full Code Here

TOP

Related Classes of javax.faces.component.behavior.AjaxBehavior

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.