empire-db-jakarta-faces/src/main/java/org/apache/empire/jakarta/components/ControlTag.java [560:598]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    protected void encodeInput(FacesContext context, UIComponent parent)
        throws IOException
    {
        // check children
        int count = parent.getChildCount();
        UIComponent valueComp = (count>0 ? parent.getChildren().get(count-1) : null);
        boolean resetChildId = (count==0);
        // continue
        this.inpInfo = helper.getInputInfo(context);
        // set required
        super.setRequired(this.controlVisible && helper.isValueRequired());
        // create Input Controls
        // boolean recordReadOnly = helper.isRecordReadOnly();
        if (count==0)
        {   // Create components
            control.createInput(parent, inpInfo, context);
            // create Value Component
            if (valueComp == null)
            {   // create ValueOutputComponent
                valueComp = new ValueOutputComponent();
                parent.getChildren().add(valueComp);
            }
        }
        else if (this.controlVisible)
        {   // Update
            control.updateInputState(parent, inpInfo, context, context.getCurrentPhaseId());
        }
        // set rendered
        boolean renderValue = helper.isRenderValueComponent();
        List<UIComponent> children = parent.getChildren();
        for (UIComponent child : children)
        {   // reset child id
            if (resetChildId && child.getId()!=null)
                child.setId(child.getId());
            // set rendered
            boolean valueOutput = (child instanceof ValueOutputComponent);
            child.setRendered((valueOutput ? renderValue : !renderValue));
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/ControlTag.java [560:598]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    protected void encodeInput(FacesContext context, UIComponent parent)
        throws IOException
    {
        // check children
        int count = parent.getChildCount();
        UIComponent valueComp = (count>0 ? parent.getChildren().get(count-1) : null);
        boolean resetChildId = (count==0);
        // continue
        this.inpInfo = helper.getInputInfo(context);
        // set required
        super.setRequired(this.controlVisible && helper.isValueRequired());
        // create Input Controls
        // boolean recordReadOnly = helper.isRecordReadOnly();
        if (count==0)
        {   // Create components
            control.createInput(parent, inpInfo, context);
            // create Value Component
            if (valueComp == null)
            {   // create ValueOutputComponent
                valueComp = new ValueOutputComponent();
                parent.getChildren().add(valueComp);
            }
        }
        else if (this.controlVisible)
        {   // Update
            control.updateInputState(parent, inpInfo, context, context.getCurrentPhaseId());
        }
        // set rendered
        boolean renderValue = helper.isRenderValueComponent();
        List<UIComponent> children = parent.getChildren();
        for (UIComponent child : children)
        {   // reset child id
            if (resetChildId && child.getId()!=null)
                child.setId(child.getId());
            // set rendered
            boolean valueOutput = (child instanceof ValueOutputComponent);
            child.setRendered((valueOutput ? renderValue : !renderValue));
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



