Examples of HtmlInputText


Examples of org.apache.myfaces.component.html.ext.HtmlInputText

            String dateFormat = CalendarDateTimeConverter.createJSPopupFormat(facesContext,
                    inputCalendar.getPopupDateFormat());

            Application application = facesContext.getApplication();

            HtmlInputText inputText = null;

            List li = inputCalendar.getChildren();

            for (int i = 0; i < li.size(); i++)
            {
                UIComponent uiComponent = (UIComponent) li.get(i);

                if(uiComponent instanceof HtmlInputText)
                {
                    inputText = (HtmlInputText) uiComponent;
                    break;
                }
            }

            if(inputText == null)
            {
                inputText = (HtmlInputText) application.createComponent(HtmlInputText.COMPONENT_TYPE);
            }

            RendererUtils.copyHtmlInputTextAttributes(inputCalendar, inputText);

            inputText.setConverter(null); // value for this transient component will already be converted
            inputText.setTransient(true);

            if (value == null && inputCalendar.getSubmittedValue() != null)
            {
                inputText.setValue(inputCalendar.getSubmittedValue());
            }
            else
            {
                inputText.setValue(getConverter(inputCalendar).getAsString(
                        facesContext,inputCalendar,value));
            }
            inputText.setDisabled(inputCalendar.isDisabled());
            inputText.setReadonly(inputCalendar.isReadonly());
            inputText.setEnabledOnUserRole(inputCalendar.getEnabledOnUserRole());
            inputText.setVisibleOnUserRole(inputCalendar.getVisibleOnUserRole());

            //This is where two components with the same id are in the tree,
            //so make sure that during the rendering the id is unique.

            inputCalendar.setId(inputCalendar.getId()+"tempId");

            inputCalendar.getChildren().add(inputText);

            RendererUtils.renderChild(facesContext, inputText);

            inputCalendar.getChildren().remove(inputText);

            //Set back the correct id to the input calendar
            inputCalendar.setId(inputText.getId());

            if (!inputCalendar.isDisabled())
            {
              ResponseWriter writer = facesContext.getResponseWriter();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.