Skip navigation links
Mojarra 2.3.14.SP04-redhat-00001 2.3.14.SP04-redhat-00001
com.sun.faces.renderkit.html_basic

Class MenuRenderer

    • Constructor Detail

      • MenuRenderer

        public MenuRenderer()
    • Method Detail

      • convertSelectManyValue

        public Object convertSelectManyValue(javax.faces.context.FacesContext context,
                                             javax.faces.component.UISelectMany uiSelectMany,
                                             String[] newValues)
                                      throws javax.faces.convert.ConverterException
        Throws:
        javax.faces.convert.ConverterException
      • convertSelectOneValue

        public Object convertSelectOneValue(javax.faces.context.FacesContext context,
                                            javax.faces.component.UISelectOne uiSelectOne,
                                            String newValue)
                                     throws javax.faces.convert.ConverterException
        Throws:
        javax.faces.convert.ConverterException
      • decode

        public void decode(javax.faces.context.FacesContext context,
                           javax.faces.component.UIComponent component)
        Description copied from class: javax.faces.render.Renderer

        Decode any new state of the specified UIComponent from the request contained in the specified FacesContext, and store that state on the UIComponent.

        During decoding, events may be enqueued for later processing (by event listeners that have registered an interest), by calling queueEvent() on the associated UIComponent.

        Overrides:
        decode in class HtmlBasicRenderer
        Parameters:
        context - FacesContext for the request we are processing
        component - UIComponent to be decoded.
      • encodeBegin

        public void encodeBegin(javax.faces.context.FacesContext context,
                                javax.faces.component.UIComponent component)
                         throws IOException
        Description copied from class: javax.faces.render.Renderer

        Render the beginning specified UIComponent to the output stream or writer associated with the response we are creating. If the conversion attempted in a previous call to getConvertedValue() for this component failed, the state information saved during execution of decode() should be used to reproduce the incorrect input.

        Overrides:
        encodeBegin in class javax.faces.render.Renderer
        Parameters:
        context - FacesContext for the request we are processing
        component - UIComponent to be rendered
        Throws:
        IOException - if an input/output error occurs while rendering
      • encodeEnd

        public void encodeEnd(javax.faces.context.FacesContext context,
                              javax.faces.component.UIComponent component)
                       throws IOException
        Description copied from class: javax.faces.render.Renderer

        Render the ending of the current state of the specified UIComponent, following the rules described for encodeBegin() to acquire the appropriate value to be rendered.

        Overrides:
        encodeEnd in class HtmlBasicRenderer
        Parameters:
        context - FacesContext for the response we are creating
        component - UIComponent to be rendered
        Throws:
        IOException - if an input/output error occurs while rendering
      • getConvertedValue

        public Object getConvertedValue(javax.faces.context.FacesContext context,
                                        javax.faces.component.UIComponent component,
                                        Object submittedValue)
                                 throws javax.faces.convert.ConverterException
        Description copied from class: javax.faces.render.Renderer

        Attempt to convert previously stored state information into an object of the type required for this component (optionally using the registered Converter for this component, if there is one). If conversion is successful, the new value should be returned from this method; if not, a ConverterException should be thrown.

        Overrides:
        getConvertedValue in class HtmlBasicInputRenderer
        Parameters:
        context - FacesContext for the request we are processing
        component - UIComponent to be decoded.
        submittedValue - a value stored on the component during decode.
        Returns:
        the converted value
        Throws:
        javax.faces.convert.ConverterException - if the submitted value cannot be converted successfully.
      • convertSelectManyValuesForModel

        protected Object convertSelectManyValuesForModel(javax.faces.context.FacesContext context,
                                                         javax.faces.component.UISelectMany uiSelectMany,
                                                         Class<?> modelType,
                                                         String[] newValues)
      • convertSelectManyValuesForArray

        protected Object convertSelectManyValuesForArray(javax.faces.context.FacesContext context,
                                                         javax.faces.component.UISelectMany uiSelectMany,
                                                         Class<?> elementType,
                                                         String[] newValues)
                                                  throws javax.faces.convert.ConverterException
        Throws:
        javax.faces.convert.ConverterException
      • convertSelectManyValuesForCollection

        protected Collection<Object> convertSelectManyValuesForCollection(javax.faces.context.FacesContext context,
                                                                          javax.faces.component.UISelectMany uiSelectMany,
                                                                          Class<? extends Collection<Object>> collectionType,
                                                                          String[] newValues)
      • renderOption

        protected boolean renderOption(javax.faces.context.FacesContext context,
                                       javax.faces.component.UIComponent component,
                                       javax.faces.component.UIComponent selectComponent,
                                       javax.faces.convert.Converter<?> converter,
                                       javax.faces.model.SelectItem curItem,
                                       Object currentSelections,
                                       Object[] submittedValues,
                                       HtmlBasicRenderer.OptionComponentInfo optionInfo)
                                throws IOException
        Throws:
        IOException
      • writeDefaultSize

        protected void writeDefaultSize(javax.faces.context.ResponseWriter writer,
                                        int itemCount)
                                 throws IOException
        Throws:
        IOException
      • containsaValue

        protected boolean containsaValue(Object valueArray)
      • getCurrentSelectedValues

        protected Object getCurrentSelectedValues(javax.faces.component.UIComponent component)
      • getMultipleText

        protected String getMultipleText(javax.faces.component.UIComponent component)
      • getSubmittedSelectedValues

        protected Object[] getSubmittedSelectedValues(javax.faces.component.UIComponent component)
      • isSelected

        protected boolean isSelected(javax.faces.context.FacesContext context,
                                     javax.faces.component.UIComponent component,
                                     Object itemValue,
                                     Object valueArray,
                                     javax.faces.convert.Converter<?> converter)
      • renderOptions

        protected int renderOptions(javax.faces.context.FacesContext context,
                                    javax.faces.component.UIComponent component,
                                    SelectItemsIterator<javax.faces.model.SelectItem> items)
                             throws IOException
        Throws:
        IOException
      • renderSelect

        protected void renderSelect(javax.faces.context.FacesContext context,
                                    javax.faces.component.UIComponent component)
                             throws IOException
        Throws:
        IOException
      • coerceToModelType

        protected Object coerceToModelType(javax.faces.context.FacesContext ctx,
                                           Object value,
                                           Class<?> itemValueType)
      • createCollection

        protected Collection<Object> createCollection(Collection<Object> collection,
                                                      Class<? extends Collection<Object>> fallBackType)
        Parameters:
        collection - a Collection instance
        Returns:
        a new Collection instance or null if the instance cannot be created
      • cloneValue

        protected Collection<Object> cloneValue(Object value)

        Utility method to invoke the the clone method on the provided value.

        Parameters:
        value - the value to clone
        Returns:
        the result of invoking clone() or null if the value could not be cloned or does not implement the Cloneable interface
      • bestGuess

        protected Collection<Object> bestGuess(Class<? extends Collection<Object>> type,
                                               int initialSize)
        Parameters:
        type - the target model type
        initialSize - the initial size of the Collection
        Returns:
        a Collection instance that best matches type
      • createCollectionFromHint

        protected Collection<Object> createCollectionFromHint(Object collectionTypeHint)

        Create a collection from the provided hint.

        Parameters:
        collectionTypeHint - the Collection type as either a String or Class
        Returns:
        a new Collection instance
      • isHideNoSelection

        protected static boolean isHideNoSelection(javax.faces.component.UIComponent component)
Mojarra 2.3.14.SP04-redhat-00001 2.3.14.SP04-redhat-00001

Copyright © 2010–2021 JBoss by Red Hat. All rights reserved.