Package javax.faces.component

Examples of javax.faces.component.UIParameter


            {
                parameters = new HashMap<String, List<String>>();
            }
            for (int i = 0, size = validParams.size(); i < size; i++)
            {
                UIParameter param = validParams.get(i);
                String name = param.getName();
                Object value = param.getValue();
                if (parameters.containsKey(name))
                {
                    parameters.get(name).add(value.toString());
                }
                else
View Full Code Here


        {
            List<UIParameter> validParams = getValidUIParameterChildren(
                    facesContext, uiComponent.getChildren(), true, true);
            for (int i = 0, size = validParams.size(); i < size; i++)
            {
                UIParameter param = validParams.get(i);
                String name = param.getName();
                Object value = param.getValue();
                if (retVal == null)
                {
                    retVal = new HashMap<String, String>();
                }
                if (value instanceof String)
View Full Code Here

        for (int i = 0, size = children.size(); i < size; i++)
        {
            UIComponent child = children.get(i);
            if (child instanceof UIParameter)
            {
                UIParameter param = (UIParameter) child;
                // check for the disable attribute (since 2.0)
                // and the render attribute (only if skipUnrendered is true)
                if (param.isDisable() || (skipUnrendered && !param.isRendered()))
                {
                    // ignore this UIParameter and continue
                    continue;
                }
                // check the name
                String name = param.getName();
                if (skipNullName && (name == null || STR_EMPTY.equals(name)))
                {
                    // warn for a null-name
                    log.log(Level.WARNING, "The UIParameter " + RendererUtils.getPathToComponent(param)
                                    + " has a name of null or empty string and thus will not be added to the URL.");
                    // and skip it
                    continue;
                }
                // check the value
                if (skipNullValue && param.getValue() == null)
                {
                    if (facesContext.isProjectStage(ProjectStage.Development))
                    {
                        // inform the user about the null value when in Development stage
                        log.log(Level.INFO, "The UIParameter " + RendererUtils.getPathToComponent(param)
View Full Code Here

        if (list == null)
        {
          // leave plenty of room to hold the parameters
          list = new ArrayList<ClientBehaviorContext.Parameter>(childCount);
        }
        UIParameter param = (UIParameter) child;
        list.add(new ClientBehaviorContext.Parameter(param.getName(), param.getValue()));
      }

      if (list != null)
      {
        return list;
View Full Code Here

     * he should be ignored.
     * @throws Exception
     */
    public void testDisabledUIParameterNotRenderedCommandLink() throws Exception
    {
        UIParameter param1 = new UIParameter();
        param1.setName("param1");
        param1.setValue("value1");
        param1.setDisable(true);
        UIParameter param2 = new UIParameter();
        param2.setName("param2");
        param2.setValue("value2");
        commandLink.getChildren().add(param1);
        commandLink.getChildren().add(param2);
       
        commandLink.encodeAll(facesContext);
        String output = writer.getWriter().toString();
View Full Code Here

     * he should be ignored.
     * @throws Exception
     */
    public void testDisabledUIParameterNotRenderedOutputLink() throws Exception
    {
        UIParameter param1 = new UIParameter();
        param1.setName("param1");
        param1.setValue("value1");
        param1.setDisable(true);
        UIParameter param2 = new UIParameter();
        param2.setName("param2");
        param2.setValue("value2");
        outputLink.getChildren().add(param1);
        outputLink.getChildren().add(param2);
       
        outputLink.encodeAll(facesContext);
        String output = writer.getWriter().toString();
View Full Code Here

     * with a non-null-name when creating the URL.
     */
    public void testOutcomeTargetLinkIncludesUIParameterInURL()
    {
        // create the UIParameter and attach it
        UIParameter param = new UIParameter();
        param.setName("myParameter");
        param.setValue("myValue");
        outcomeTargetLink.getChildren().add(param);
       
        try
        {
            outcomeTargetLink.encodeAll(facesContext);
View Full Code Here

     * with a null-name when creating the URL.
     */
    public void testOutcomeTargetLinkSkipsNullValueOfUIParameterInURL()
    {
        // create the UIParameter with value = null and attach it
        UIParameter param = new UIParameter();
        param.setName("myNullParameter");
        param.setValue(null);
        outcomeTargetLink.getChildren().add(param);
       
        try
        {
            outcomeTargetLink.encodeAll(facesContext);
View Full Code Here

     * with a non-null-name when creating the URL.
     */
    public void testIncludesUIParameterInURL()
    {
        // create the UIParameter and attach it
        UIParameter param = new UIParameter();
        param.setName("myParameter");
        param.setValue("myValue");
        outcomeTargetButton.getChildren().add(param);
       
        try
        {
            outcomeTargetButton.encodeAll(facesContext);
View Full Code Here

     * with a null-name when creating the URL.
     */
    public void testSkipsNullValueOfUIParameterInURL()
    {
        // create the UIParameter with value = null and attach it
        UIParameter param = new UIParameter();
        param.setName("myNullParameter");
        param.setValue(null);
        outcomeTargetButton.getChildren().add(param);
       
        try
        {
            outcomeTargetButton.encodeAll(facesContext);
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.