Package javax.faces.component.html

Examples of javax.faces.component.html.HtmlCommandLink


  data.setValue(dat);
  data.setId("data");
  data.setRows(5);       
  form.getChildren().add(data);

  command = new HtmlCommandLink();
  command.setId("command");
  form.getChildren().add(command);

  dfSlider = (UIDataFltrSlider) application.createComponent(UIDataFltrSlider.COMPONENT_TYPE);
  dfSlider.setId("slider");
View Full Code Here


     
      form = new HtmlForm();
        form.setId("form");
        facesContext.getViewRoot().getChildren().add(form);
       
        command = new HtmlCommandLink();
        command.setId("command");
        form.getChildren().add(command);
       
        valueList = new ArrayList();
        valueList.add("1");
View Full Code Here

        input.setValue("");
        input.setId("opened");
        input.getAttributes().put("onchange", "return true;");
        stp1.getChildren().add(input);

        command = new HtmlCommandLink();
        command.setId("command");
        stp1.getChildren().add(command);
    }
View Full Code Here

     
      form = new HtmlForm();
        form.setId("form");
        facesContext.getViewRoot().getChildren().add(form);
       
        command = new HtmlCommandLink();
        command.setId("command");
        command.setValue("test command");
        form.getChildren().add(command);
       
        sourceBean = new ListShuttleBean(false);
View Full Code Here

            RendererUtils.renderChild(facesContext, text);
            return;
        }

        HtmlCommandLink link
                = (HtmlCommandLink)application.createComponent(HtmlCommandLink.COMPONENT_TYPE);
        link.setId(component.getId() + "_" + valueForLink.getTime() + "_link");
        link.setTransient(true);
        link.setImmediate(component.isImmediate());

        UIParameter parameter
                = (UIParameter)application.createComponent(UIParameter.COMPONENT_TYPE);
        parameter.setId(component.getId() + "_" + valueForLink.getTime() + "_param");
        parameter.setTransient(true);
        parameter.setName(component.getClientId(facesContext));
        parameter.setValue(converter.getAsString(facesContext, component, valueForLink));

        RendererUtils.addOrReplaceChild(component,link);
        link.getChildren().add(parameter);
        link.getChildren().add(text);

        RendererUtils.renderChild(facesContext, link);
    }
View Full Code Here

        HtmlCollapsiblePanel collapsiblePanel = (HtmlCollapsiblePanel) uiComponent;

        UIComponent headerComp = collapsiblePanel.getFacet("header");

        if (headerComp == null){
            HtmlCommandLink link = getLink(facesContext, collapsiblePanel);
            collapsiblePanel.getChildren().add(link);

            headerComp = link;
        }
View Full Code Here

    }

    protected HtmlCommandLink getLink(FacesContext facesContext, HtmlCollapsiblePanel collapsiblePanel)
        throws IOException {
        Application application = facesContext.getApplication();
        HtmlCommandLink link = (HtmlCommandLink) application.createComponent(HtmlCommandLink.COMPONENT_TYPE);
        link.setId(collapsiblePanel.getId() + LINK_ID);
        link.setTransient(true);
        link.setImmediate(true);

        List children = link.getChildren();
        // Create the indicator. You could later make this conditional and render optional images instead
        HtmlOutputText uiText = (HtmlOutputText) application.createComponent(HtmlOutputText.COMPONENT_TYPE);
        uiText.setTransient(true);
        uiText.setValue(collapsiblePanel.isCollapsed() ? ">" : "ν");
        uiText.setEscape(false);
View Full Code Here

     * @return UICommand
     */
    public UICommand getExpandControl()
    {
        if (_expandControl == null){
            _expandControl = new HtmlCommandLink();
            _expandControl.setParent(this);
        }
        return _expandControl;
    }
View Full Code Here

        Assert.assertNotNull(panelGroup1);
        UINamingContainer compositeComponent1 = (UINamingContainer) panelGroup1.getChildren().get(0);
        Assert.assertNotNull(compositeComponent1);
        UIComponent facet1 = compositeComponent1.getFacet(UIComponent.COMPOSITE_FACET_NAME);
        Assert.assertNotNull(facet1);
        HtmlCommandLink link = (HtmlCommandLink) facet1.findComponent("link");
        Assert.assertNotNull(link);
        Assert.assertEquals(1, link.getClientBehaviors().size());
        Assert.assertEquals(1, link.getClientBehaviors().get(link.getDefaultEventName()).size());
        /*
        StringWriter sw = new StringWriter();
        MockResponseWriter mrw = new MockResponseWriter(sw);
        facesContext.setResponseWriter(mrw);
       
View Full Code Here

        Assert.assertNotNull(panelGroup1);
        UINamingContainer compositeComponent1 = (UINamingContainer) panelGroup1.getChildren().get(0);
        Assert.assertNotNull(compositeComponent1);
        UIComponent facet1 = compositeComponent1.getFacet(UIComponent.COMPOSITE_FACET_NAME);
        Assert.assertNotNull(facet1);
        HtmlCommandLink link = (HtmlCommandLink) compositeComponent1.findComponent("link");
        Assert.assertNotNull(link);
        Assert.assertEquals(1, link.getClientBehaviors().size());
        Assert.assertEquals(1, link.getClientBehaviors().get(link.getDefaultEventName()).size());
        /*
        StringWriter sw = new StringWriter();
        MockResponseWriter mrw = new MockResponseWriter(sw);
        facesContext.setResponseWriter(mrw);
       
View Full Code Here

TOP

Related Classes of javax.faces.component.html.HtmlCommandLink

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.