Package org.apache.myfaces.wap.component

Examples of org.apache.myfaces.wap.component.SelectMany


            throw new NullPointerException();
        }
       
        if (!component.isRendered()) return;
       
        SelectMany comp = (SelectMany)component;
       
        ResponseWriter writer = context.getResponseWriter();
       
        writer.startElement(Attributes.SELECT, component);
        RendererUtils.writeAttribute(Attributes.ID, comp.getClientId(context), writer);
        RendererUtils.writeAttribute(Attributes.STYLE_CLASS, comp.getStyleClass(), writer);
        RendererUtils.writeAttribute(Attributes.XML_LANG, comp.getXmllang(), writer);
        /* TODO: attribute "required" */
       
        /* attribute name is not required. If is not set, name value equals component id */
        if (comp.getName() == null) {
            log.debug("getName is null");
            comp.setName(comp.getClientId(context));
        }
        RendererUtils.writeAttribute(Attributes.NAME, comp.getName(), writer);
       
        RendererUtils.writeAttribute(Attributes.TABINDEX, comp.getTabindex(), writer);
        RendererUtils.writeAttribute(Attributes.TITLE, comp.getTitle(), writer);
       
//        RenderUtils.writeAttribute(Attributes.VALUE, convertSelectedValuesToString(comp.getSelectedValues()), writer);
        RendererUtils.writeAttribute(Attributes.VALUE, convertSelectedValuesToString(comp.getSelectedValues()), writer);
       
        // multiple
        RendererUtils.writeAttribute(Attributes.MULTIPLE, "true", writer);
       
        List child = component.getChildren();
View Full Code Here


        log.debug("decode(" + component.getId() + ")");
        if (component == null || context == null) throw new NullPointerException();
        if (!(component instanceof SelectMany))
            log.error("Component " + component.getClass().getName() + " is no SelectMany component, cannot be converted!");
       
        SelectMany comp = (SelectMany)component;
       
        Map map = context.getExternalContext().getRequestParameterMap();
       
        // Set the submitted value of this UISelectOne component
        if (map.containsKey(comp.getName())){
            log.debug("Parameter:" + comp.getName() + " was found in the request. Value: " + (String)map.get(comp.getName()));
           
            String value = (String)map.get(comp.getName());                    
            comp.setSelectedValues(convertSubmittedValueToObject(value));
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.wap.component.SelectMany

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.