Package org.apache.empire.jsf2.websample.db

Examples of org.apache.empire.jsf2.websample.db.SampleDB


    public static ParameterMap getParameterMap(final FacesContext fc)
    {
        Map<String, Object> sm = fc.getExternalContext().getSessionMap();
        Object pm = sm.get(PARAMETER_MAP_ATTRIBUTE);
        if (pm==null)
        {   pm = new ParameterMap();
            sm.put(PARAMETER_MAP_ATTRIBUTE, pm);
        }
        return (ParameterMap)pm;
    }
View Full Code Here


    }
    */

    private static String encodeActionParam(String action)
    {
        ParameterMap pm = FacesUtils.getParameterMap(FacesUtils.getContext());
        if (pm==null)
            return action;
        return pm.put(ACTION_PARAMETER_TYPE, action, true);
    }
View Full Code Here

        return pm.put(ACTION_PARAMETER_TYPE, action, true);
    }
   
    public static String decodeActionParam(String param)
    {
        ParameterMap pm = FacesUtils.getParameterMap(FacesUtils.getContext());
        if (pm==null)
            return param;
        String action = StringUtils.valueOf(pm.get(ACTION_PARAMETER_TYPE, param));
        if (action==null)
            log.warn("no action available for param {}.", param);
        return action;
    }
View Full Code Here

    public static ParameterMap getParameterMap(final FacesContext fc)
    {
        Map<String, Object> sm = fc.getExternalContext().getSessionMap();
        Object pm = sm.get(PARAMETER_MAP_ATTRIBUTE);
        if (pm==null)
        {   pm = new ParameterMap();
            sm.put(PARAMETER_MAP_ATTRIBUTE, pm);
        }
        return (ParameterMap)pm;
    }
View Full Code Here

       
        // if (this.action==INVALID_ACTION)
        //      return null;

        // Generate key
        ParameterMap pm = FacesUtils.getParameterMap(FacesUtils.getContext());
        String actionParam = (pm!=null ? pm.encodeString(action) : action);
        return actionParam;
    }
View Full Code Here

        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);
            }
            return srw.toString();
        }
        else
        {   // An ordinary link
            Object value = getValue();
            return value;
View Full Code Here

        public void encodeChildren(FacesContext context)
            throws IOException
        {
            if (control!=null)
            {   // write end tag
                TagEncodingHelper helper = control.helper;
                String tagName = helper.getTagAttributeString("tag", "td");
               
                // render components
                ResponseWriter writer = context.getResponseWriter();
                writer.startElement(tagName, this);
                writeAttributes(writer, helper, tagName);
View Full Code Here

           
            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))
View Full Code Here

        public void encodeChildren(FacesContext context)
            throws IOException
        {
            if (control!=null)
            {   // write end tag
                TagEncodingHelper helper = control.helper;
                String tagName = helper.getTagAttributeString("tag", "td");
               
                // render components
                ResponseWriter writer = context.getResponseWriter();
                writer.startElement(tagName, this);
                writeAttributes(writer, helper, tagName);
View Full Code Here

           
            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))
View Full Code Here

TOP

Related Classes of org.apache.empire.jsf2.websample.db.SampleDB

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.