Examples of InputControl


Examples of org.apache.empire.jsf2.controls.InputControl

        // add label and input components when the view is loaded for the first time
        super.encodeBegin(context);
       
        helper.encodeBegin();
        InputControl control = helper.getInputControl();
        InputControl.ValueInfo vi = helper.getValueInfo(context);

        // render components
        ResponseWriter writer = context.getResponseWriter();
        String tag = writeStartElement(vi, writer);
        control.renderValue(vi, writer);
        if (tag != null)
            writer.endElement(tag);
    }
View Full Code Here

Examples of org.apache.empire.jsf2.controls.InputControl

    private Object getLinkValue(boolean hasColumn)
    {
        // Is a column provided?
        if (hasColumn)
        {
            InputControl control = helper.getInputControl();
            InputControl.ValueInfo vi = helper.getValueInfo(FacesContext.getCurrentInstance());
            // render value
            StringResponseWriter srw = new StringResponseWriter();
            try
            {
                control.renderValue(vi, srw);
            }
            catch (IOException e)
            {   // Error rendering value
                log.error("Failed to render value for "+vi.getColumn().getName()+" error is:"+e.getMessage(), e);
            }
View Full Code Here

Examples of org.apache.empire.jsf2.controls.InputControl

            {   log.error("Invalid parent component for "+getClass().getName());
                return;
            }
           
            ControlTag controlTag = (ControlTag)parent;
            InputControl control = controlTag.control;
            InputControl.ValueInfo valInfo = controlTag.inpInfo;

            TagEncodingHelper helper = controlTag.helper;
            if (control==null)
                control = helper.getInputControl(); // Oops, should not come here
            if (valInfo==null)
                valInfo = helper.getValueInfo(context); // Oops, should not come here
           
            String styleClass = helper.getTagStyleClass("eInpDis");
            String tooltip    = helper.getValueTooltip(helper.getTagAttributeString("title"));
           
            // render components
            ResponseWriter writer = context.getResponseWriter();
            writer.startElement(tagName, this);
            if (StringUtils.isNotEmpty(styleClass))
                writer.writeAttribute("class", styleClass, null);
            if (StringUtils.isNotEmpty(tooltip))
                writer.writeAttribute("title", tooltip, null);
            // render Value
            control.renderValue(valInfo, writer);
            writer.endElement(tagName);
        }
View Full Code Here

Examples of org.apache.empire.jsf2.controls.InputControl

            {   log.error("Invalid parent component for "+getClass().getName());
                return;
            }
           
            ControlTag controlTag = (ControlTag)parent;
            InputControl control = controlTag.control;
            InputControl.ValueInfo valInfo = controlTag.inpInfo;

            TagEncodingHelper helper = controlTag.helper;
            if (control==null)
                control = helper.getInputControl(); // Oops, should not come here
            if (valInfo==null)
                valInfo = helper.getValueInfo(context); // Oops, should not come here
           
            String styleClass = helper.getTagStyleClass("eInpDis");
            String tooltip    = helper.getValueTooltip(helper.getTagAttributeString("title"));
           
            // render components
            ResponseWriter writer = context.getResponseWriter();
            writer.startElement(tagName, this);
            if (StringUtils.isNotEmpty(styleClass))
                writer.writeAttribute("class", styleClass, null);
            if (StringUtils.isNotEmpty(tooltip))
                writer.writeAttribute("title", tooltip, null);
            // render Value
            control.renderValue(valInfo, writer);
            writer.endElement(tagName);
        }
View Full Code Here

Examples of org.apache.empire.jsf2.controls.InputControl

        // add label and input components when the view is loaded for the first time
        super.encodeBegin(context);
       
        helper.encodeBegin();
        InputControl control = helper.getInputControl();
        InputControl.ValueInfo vi = helper.getValueInfo(context);

        // render components
        ResponseWriter writer = context.getResponseWriter();
        String tag = writeStartElement(vi, writer);
        control.renderValue(vi, writer);
        if (tag != null)
            writer.endElement(tag);
    }
View Full Code Here

Examples of org.apache.empire.jsf2.controls.InputControl

            }
           
            ControlTag controlTag = (ControlTag)parent;
            TagEncodingHelper helper = controlTag.helper;

            InputControl control = helper.getInputControl();
            InputControl.ValueInfo valInfo = helper.getValueInfo(context);
            String styleClass = helper.getTagStyleClass("eInpDis");
            String tooltip    = helper.getValueTooltip(helper.getTagAttribute("title"));
           
            // render components
            ResponseWriter writer = context.getResponseWriter();
            writer.startElement(tagName, this);
            if (StringUtils.isNotEmpty(styleClass))
                writer.writeAttribute("class", styleClass, null);
            if (StringUtils.isNotEmpty(tooltip))
                writer.writeAttribute("title", tooltip, null);
            // render Value
            control.renderValue(valInfo, writer);
            writer.endElement(tagName);
        }
View Full Code Here

Examples of org.apache.empire.jsf2.controls.InputControl

        // Create
        if (getColumn() == null)
          throw new NotSupportedException(this, "getInputControl");
        // Get Control from column
        String controlType = column.getControlType();
        InputControl control = null;
        if (StringUtils.isNotEmpty(controlType))
            control = InputControlManager.getControl(controlType);
        if (control == null)
        { // Auto-detect
            if (getValueOptions()!=null)
View Full Code Here

Examples of org.apache.empire.jsf2.controls.InputControl

        // add label and input components when the view is loaded for the first time
        super.encodeBegin(context);
       
        helper.encodeBegin();
        InputControl control = helper.getInputControl();
        InputControl.ValueInfo vi = helper.getValueInfo(context);

        // render components
        ResponseWriter writer = context.getResponseWriter();
        String tag = writeStartElement(vi, writer);
        control.renderValue(vi, writer);
        if (tag != null)
            writer.endElement(tag);
    }
View Full Code Here

Examples of org.apache.empire.jsf2.controls.InputControl

    private Object getLinkValue(boolean hasColumn)
    {
        // Is a column provided?
        if (hasColumn)
        {
            InputControl control = helper.getInputControl();
            InputControl.ValueInfo vi = helper.getValueInfo(FacesContext.getCurrentInstance());
            // render value
            StringResponseWriter srw = new StringResponseWriter();
            try
            {
                control.renderValue(vi, srw);
            }
            catch (IOException e)
            {   // Error rendering value
                log.error("Failed to render value for "+vi.getColumn().getName()+" error is:"+e.getMessage(), e);
            }
View Full Code Here

Examples of org.apache.empire.struts2.jsp.controls.InputControl

            if (ObjectUtils.contains(keyColumns, col))
                continue;
            // Get the value from the input control
            Object value = null;
            String field = getRequestFieldName(col);
            InputControl control = null;
            if (record.isFieldReadOnly(col)==false)
                control = InputControlManager.getControl(col.getControlType());
            // Get Value from Control first
            if (control!=null && (value=control.getFieldValue(field, action, locale, col))!=null)
            {   // Check for Error
                if (value instanceof InputControl.FieldValueError)
                {
                    InputControl.FieldValueError fieldError = (InputControl.FieldValueError)value;
                    // Error
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.