Package javax.faces.component

Examples of javax.faces.component.UIParameter


                // set up the expand control and remove whatever children (if any) this control had previously
                UICommand expandControl = tree.getExpandControl();
                expandControl.getChildren().clear();
                expandControl.setId(TOGGLE_ID);

                UIParameter param = new UIParameter();
                param.setName(tree.getId() + NamingContainer.SEPARATOR_CHAR + NAV_COMMAND);
                param.setValue(tree.getNodeId());
                expandControl.getChildren().add(param);
                expandControl.getChildren().add(image);

                RendererUtils.renderChild(context, expandControl);
            }
View Full Code Here


        List<Object> elements = new ArrayList<Object>();
        List<UIComponent> children = behavior.getChildren();

        for (UIComponent child : children) {
            if (child instanceof UIParameter) {
                UIParameter parameter = (UIParameter) child;
                Object value = RendererUtils.getInstance().createParameterValue(parameter);

                if (value != null) {
                    elements.add(value);
                }
            }

            if (child instanceof UIHashParameter) {
                UIHashParameter parameter = (UIHashParameter) child;
                String name = parameter.getName();

                Map<String, Object> value = RendererUtils.getInstance().createParametersMap(FacesContext.getCurrentInstance(),
                    child);

                if (value != null) {
View Full Code Here

        quantity = null;
        myMeasure = null;
    }

    public void deleteProduct(ActionEvent e) {
        UIParameter param = (UIParameter) e.getComponent().getChildren().get(0);
        detailId = Long.valueOf(param.getValue().toString());

        if (detailId != null) {
            QuotationDetail detail = quotation.getDetails().get(detailId.intValue());
            quotation.getDetails().remove(detail);
            deletes.add(detail);
View Full Code Here

        HtmlCommandLink link =
            (HtmlCommandLink)application.createComponent(HtmlCommandLink.COMPONENT_TYPE);
        link.setId(scroller.getId() + id);
        link.setTransient(true);
        UIParameter parameter
            = (UIParameter)application.createComponent(UIParameter.COMPONENT_TYPE);
        parameter.setId(scroller.getId() + id + "_param");
        parameter.setTransient(true);
        parameter.setName(scroller.getClientId(facesContext));
        parameter.setValue(id);
        List children = link.getChildren();
        children.add(parameter);
        if (text != null)
        {
            HtmlOutputText uiText =
View Full Code Here

        HtmlCommandLink link
                = (HtmlCommandLink)application.createComponent(HtmlCommandLink.COMPONENT_TYPE);
        link.setId(scroller.getId() + facetName);
        link.setTransient(true);
        UIParameter parameter
                = (UIParameter)application.createComponent(UIParameter.COMPONENT_TYPE);
        parameter.setId(scroller.getId() + facetName + "_param");
        parameter.setTransient(true);
        parameter.setName(scroller.getClientId(facesContext));
        parameter.setValue(facetName);
        List children = link.getChildren();
        children.add(parameter);
        if (facetComp != null)
            children.add(facetComp);
        // dirty, cause facet-comp is now child from link & scroller!
View Full Code Here

                = (HtmlOutputText)application.createComponent(HtmlOutputText.COMPONENT_TYPE);
        text.setValue(content);
        text.setId(component.getId() + "_" + valueForLink.getTime() + "_text");
        text.setTransient(true);

        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));

        component.getChildren().add(link);
        link.getChildren().add(parameter);
        link.getChildren().add(text);
View Full Code Here

            // set up the expand control and remove whatever children (if any) this control had previously
            UICommand expandControl = tree.getExpandControl();
            expandControl.setId(context.getViewRoot().createUniqueId());
            expandControl.getChildren().clear();

            UIParameter param = new UIParameter();
            param.setName(tree.getId() + NamingContainer.SEPARATOR_CHAR + NAV_COMMAND);
            param.setValue(tree.getNodeId());
            expandControl.getChildren().add(param);
            expandControl.getChildren().add(image);

            encodeRecursive(context, expandControl);
        }
View Full Code Here

        }
        List<UIParameter> validParams = HtmlRendererUtils.getValidUIParameterChildren(
                context, childrenList, false, false);
        for (int j = 0, size = validParams.size(); j < size; j++)
        {
            UIParameter param = validParams.get(j);
            String name = param.getName();

            //Not necessary, since we are using oamSetHiddenInput to create hidden fields
            if (MyfacesConfig.getCurrentInstance(context.getExternalContext()).isRenderHiddenFieldsForLinkParams())
            {
                addHiddenCommandParameter(context, nestingForm, name);
            }

            Object value = param.getValue();

            //UIParameter is no ValueHolder, so no conversion possible - calling .toString on value....
            // MYFACES-1832 bad charset encoding for f:param
            // if HTMLEncoder.encode is called, then
            // when is called on writer.writeAttribute, encode method
View Full Code Here

        List<UIParameter> validParams = HtmlRendererUtils.getValidUIParameterChildren(
                facesContext, childrenList, false, false);
       
        for (int i = 0, size = validParams.size(); i < size; i++)
        {
            UIParameter param = validParams.get(i);
            String name = param.getName();
            Object value = param.getValue();
            addParameterToHref(name, value, hrefBuf, firstParameter, charEncoding, strictXhtmlLinks);
            firstParameter = false;
        }
    }
View Full Code Here

            {
                List<UIParameter> validParams = HtmlRendererUtils.getValidUIParameterChildren(
                        facesContext, htmlOutputFormat.getChildren(), false, false, false);
                for (int i = 0, size = validParams.size(); i < size; i++)
                {
                    UIParameter param = validParams.get(i);
                    if (argsList == null)
                    {
                        argsList = new ArrayList<Object>();
                    }
                    argsList.add(param.getValue());
                }
            }
           
            if (argsList != null)
            {
View Full Code Here

TOP

Related Classes of javax.faces.component.UIParameter

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.