Package org.apache.empire.jsf2.pages

Examples of org.apache.empire.jsf2.pages.PageNavigationHandler


        if (StringUtils.isNotEmpty(forInput) && !forInput.equals("*"))
        {   // Set Label input Id
            UIComponent input = FacesUtils.getFacesApplication().findComponent(context, forInput, tag);
            if (input!=null && (input instanceof InputTag))
            {   // Check Read-Only
                InputTag inputTag = ((InputTag)input);
                column = inputTag.getInputColumn();
                readOnly = inputTag.isInputReadOnly();
                required = inputTag.isInputRequired();
            }
            else
            {   // Not found (<e:input id="ABC"...> must match <e:label for="ABC"...>
                log.warn("Input component {} not found for label {}.", forInput, getColumn().getName());
            }
View Full Code Here


   
    public void updateLabelComponent(FacesContext context, HtmlOutputLabel label, String forInput)
    {
        boolean hasMark = (label.getChildCount()>0);
        // Find Input Control (only if forInput Attribute has been set!)
        InputTag inputTag = null;
        if (StringUtils.isNotEmpty(forInput) && !forInput.equals("*"))
        {   // Set Label input Id
            UIComponent input = FacesUtils.getFacesApplication().findComponent(context, forInput, tag);
            if (input!=null && (input instanceof InputTag))
            {   // Check Read-Only
                inputTag = ((InputTag)input);
            }
        }
        // Is the Mark required?
        boolean required = (inputTag!=null ? inputTag.isInputRequired() : isValueRequired());
        if (required==hasMark)
            return;
        // Add or remove the mark
        if (required)
            addRequiredMark(label);
View Full Code Here

        if (StringUtils.isNotEmpty(forInput) && !forInput.equals("*"))
        {   // Set Label input Id
            UIComponent input = FacesUtils.getFacesApplication().findComponent(context, forInput, tag);
            if (input!=null && (input instanceof InputTag))
            {   // Check Read-Only
                InputTag inputTag = ((InputTag)input);
                column = inputTag.getInputColumn();
                readOnly = inputTag.isInputReadOnly();
                required = inputTag.isInputRequired();
            }
            else
            {   // Not found (<e:input id="ABC"...> must match <e:label for="ABC"...>
                log.warn("Input component {} not found for label {}.", forInput, getColumn().getName());
            }
View Full Code Here

   
    public void updateLabelComponent(FacesContext context, HtmlOutputLabel label, String forInput)
    {
        boolean hasMark = (label.getChildCount()>0);
        // Find Input Control (only if forInput Attribute has been set!)
        InputTag inputTag = null;
        if (StringUtils.isNotEmpty(forInput) && !forInput.equals("*"))
        {   // Set Label input Id
            UIComponent input = FacesUtils.getFacesApplication().findComponent(context, forInput, tag);
            if (input!=null && (input instanceof InputTag))
            {   // Check Read-Only
                inputTag = ((InputTag)input);
            }
        }
        // Is the Mark required?
        boolean required = (inputTag!=null ? inputTag.isInputRequired() : isValueRequired());
        if (required==hasMark)
            return;
        // Add or remove the mark
        if (required)
            addRequiredMark(label);
View Full Code Here

        if (StringUtils.isNotEmpty(forInput) && !forInput.equals("*"))
        {   // Set Label input Id
            UIComponent input = FacesUtils.getFacesApplication().findComponent(context, forInput, tag);
            if (input!=null && (input instanceof InputTag))
            {   // Check Read-Only
                InputTag inputTag = ((InputTag)input);
                column = inputTag.getInputColumn();
                readOnly = inputTag.isInputReadOnly();
                required = inputTag.isInputRequired();
            }
        }
        if (column==null)
        {   // Get from LinkTag
            column = getColumn();
View Full Code Here

        if (hasValueExpression())
        {   // See if the record is in value
            return null;
        }
        // if parent is a record tag, get the record from there
        RecordTag recordComponent = getRecordComponent();
        if (recordComponent != null)
        {
            rec = recordComponent.getRecord();
        }
        else
        {   // not supplied
            if ((tag instanceof ControlTag) && !((ControlTag)tag).isCustomInput())
                log.warn("No record supplied for {} and column {}.", tag.getClass().getSimpleName(), getColumnName());
View Full Code Here

        if (hasValueExpression())
        {   // See if the record is in value
            return null;
        }
        // if parent is a record tag, get the record from there
        RecordTag recordComponent = getRecordComponent();
        if (recordComponent != null)
        {
            rec = recordComponent.getRecord();
        }
        else
        {   // not supplied
            if (!(tag instanceof ControlTag) && !((ControlTag)tag).isCustomInput())
                log.warn("No record supplied for {} and column {}.", tag.getClass().getSimpleName(), getColumnName());
View Full Code Here

            return null;
        }

        if (rec == null)
        { // if parent is a record tag, get the record from there
            RecordTag recordComponent = getRecordComponent();
            if (recordComponent != null)
            {
                rec = recordComponent.getRecord();
            }
            else
            {
                // not supplied;
            }
View Full Code Here

        // 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

    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

TOP

Related Classes of org.apache.empire.jsf2.pages.PageNavigationHandler

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.