Examples of HtmlCommandButton


Examples of javax.faces.component.html.HtmlCommandButton

            HtmlInputText input = new HtmlInputText();
            input.setValue("var");
            input.setId("var1");
           
            HtmlCommandButton button = new HtmlCommandButton();
            button.setId("button1");
           
            UIForm form = new HtmlForm();
            form.setId("form1");
           
            form.getChildren().add(output);
View Full Code Here

Examples of javax.faces.component.html.HtmlCommandButton

      String idPrefix,
      String id)
  {
    Application application = FacesContext.getCurrentInstance().getApplication();
   
    HtmlCommandButton button= (HtmlCommandButton)application.createComponent(HtmlCommandButton.COMPONENT_TYPE);
   
    button.setId("commandButton_" + displayValue +"_" + id);
    button.setTitle(displayValue);
    button.setValue(displayValue);
    button.setStyleClass("commandExButton");
   
    button.setActionExpression(Utils.createAction(bindingValue.getExpressionString(), String.class));
   
    return button;
    
  }
View Full Code Here

Examples of javax.faces.component.html.HtmlCommandButton

       //add to parent
       parent.getChildren().add(select);
      }
    
      //2d) finally the submit button for saving the configuration
     HtmlCommandButton button_save = new HtmlCommandButton();
     button_save.setId("buttonSave"+metric.getInternalID());
     button_save.setValue("add config");
     Class[] parms3 = new Class[]{ActionEvent.class};
        MethodExpression mb4 = ef.createMethodExpression(FacesContext.getCurrentInstance().getELContext(),
                "#{AutoEvalSerUserConfigBean.command_saveMetricConfiguration}", null, parms3);
        MethodExpressionActionListener vcl4 = new MethodExpressionActionListener(mb4);
        button_save.addActionListener(vcl4);
     UIParameter p = new UIParameter();
     p.setId("param_save_button"+metric.getInternalID());
     p.setName("pConfigPanel");
     p.setValue(parent.getId());
     button_save.getChildren().add(p);
    
     parent.getChildren().add(button_save);
    
     HtmlOutputText message = new HtmlOutputText();
     message.setId("message"+metric.getInternalID());
View Full Code Here

Examples of javax.faces.component.html.HtmlCommandButton

        assertEquals(1, findInput.getValueChangeListeners().length);
        assertTrue(getValueChangeListener() == findInput.getValueChangeListeners()[0]);     
    }
   
    public void testCommandBindings() {
        HtmlCommandButton findCommand = (HtmlCommandButton) findComponent(clay, "command");
        assertNotNull(findCommand);
       
        assertEquals(1, findCommand.getActionListeners().length);
        assertTrue(getActionListener() == findCommand.getActionListeners()[0]);
    }
View Full Code Here

Examples of javax.faces.component.html.HtmlCommandButton

        this.actionListener = actionListener;
    }

    public HtmlCommandButton getCommand() {
        if (command == null) {
            command = new HtmlCommandButton();
        }
        return command;
    }
View Full Code Here

Examples of javax.faces.component.html.HtmlCommandButton

       
        HtmlOutcomeTargetLink link4 = (HtmlOutcomeTargetLink) form.findComponent("link4");
        Assert.assertNotNull(link4);
        Assert.assertEquals("rollback", link4.getOutcome());
       
        HtmlCommandButton button = (HtmlCommandButton) form.findComponent("button1");
        Assert.assertNotNull(button);
        Assert.assertEquals("#{test.testAction}", button.getActionExpression().getExpressionString());
       
        HtmlOutcomeTargetButton button2 = (HtmlOutcomeTargetButton) form.findComponent("button2");
        Assert.assertNotNull(button2);
        Assert.assertEquals("rollback", button2.getOutcome());
       
        HtmlGraphicImage img1 = (HtmlGraphicImage) form.findComponent("img1");
        Assert.assertNotNull(img1);
        Assert.assertEquals("/my/image.png", img1.getUrl());
       
        HtmlCommandButton input1 = (HtmlCommandButton) form.findComponent("input1");
        Assert.assertNotNull(input1);
       
        HtmlSelectBooleanCheckbox input2 = (HtmlSelectBooleanCheckbox) form.findComponent("input2");
        Assert.assertNotNull(input2);
       
        HtmlInputText input3 = (HtmlInputText) form.findComponent("input3");
        Assert.assertNotNull(input3);

        HtmlInputText input4 = (HtmlInputText) form.findComponent("input4");
        Assert.assertNotNull(input4);

        HtmlInputText input5 = (HtmlInputText) form.findComponent("input5");
        Assert.assertNotNull(input5);

        HtmlInputText input6 = (HtmlInputText) form.findComponent("input6");
        Assert.assertNotNull(input6);

        HtmlInputText input7 = (HtmlInputText) form.findComponent("input7");
        Assert.assertNotNull(input7);

        HtmlInputText input8 = (HtmlInputText) form.findComponent("input8");
        Assert.assertNotNull(input8);

        HtmlInputText input9 = (HtmlInputText) form.findComponent("input9");
        Assert.assertNotNull(input9);

        HtmlInputText input10 = (HtmlInputText) form.findComponent("input10");
        Assert.assertNotNull(input10);

        HtmlInputText input11 = (HtmlInputText) form.findComponent("input11");
        Assert.assertNotNull(input11);

        HtmlInputText input12 = (HtmlInputText) form.findComponent("input12");
        Assert.assertNotNull(input12);

        HtmlInputText input13 = (HtmlInputText) form.findComponent("input13");
        Assert.assertNotNull(input13);

        HtmlInputText input14 = (HtmlInputText) form.findComponent("input14");
        Assert.assertNotNull(input14);
       
        HtmlInputFile input15 = (HtmlInputFile) form.findComponent("input15");
        Assert.assertNotNull(input15);
       
        HtmlInputHidden input16 = (HtmlInputHidden) form.findComponent("input16");
        Assert.assertNotNull(input16);
       
        HtmlInputSecret input17 = (HtmlInputSecret) form.findComponent("input17");
        Assert.assertNotNull(input17);
       
        HtmlCommandButton input18 = (HtmlCommandButton) form.findComponent("input18");
        Assert.assertNotNull(input18);
       
        HtmlCommandButton input19 = (HtmlCommandButton) form.findComponent("input19");
        Assert.assertNotNull(input19);

        HtmlInputText input20 = (HtmlInputText) form.findComponent("input20");
        Assert.assertNotNull(input20);
       
View Full Code Here

Examples of javax.faces.component.html.HtmlCommandButton

      && testResourceKey.length()>0){
    String testResourceLabel = msgBroker.retrieveMessage(testResourceKey);
    UIComponent inputComponent = applyHint(context,component);     
    HtmlPanelGroup panel = new HtmlPanelGroup();
    panel.getChildren().add(inputComponent);
    HtmlCommandButton testBtn = new HtmlCommandButton();
    String inputComponentId = getFacesId();
    testBtn.setId(inputComponentId +"_testBtn");
    testBtn.setOnclick("window.open(document.getElementById('mdEditor:"+inputComponentId+"').value)");
    testBtn.setValue(testResourceLabel);
    panel.getChildren().add(testBtn);
    return panel;
  }else{
    return applyHint(context,component);
  }
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.