Package javax.faces.context

Examples of javax.faces.context.FacesContext


        return save(wod);
   
   
    @Override
    protected String afterUpdated() {
        FacesContext fc = FacesContext.getCurrentInstance();
        VariableResolver vr = fc.getApplication().getVariableResolver();

        DcWebObjects objects = (DcWebObjects) vr.resolveVariable(fc, "webObjects");
        DcWebObject wo = (DcWebObject) vr.resolveVariable(fc, "webObject");

        objects.update(wo);
View Full Code Here


        return back();
    }

    @Override
    protected String afterCreate() {
        FacesContext fc = FacesContext.getCurrentInstance();
        VariableResolver vr = fc.getApplication().getVariableResolver();

        DcWebObjects objects = (DcWebObjects) vr.resolveVariable(fc, "webObjects");
        DcWebObject wo = (DcWebObject) vr.resolveVariable(fc, "webObject");

        objects.add(wo);
View Full Code Here

        return menu;
    }
   
    @Override
    protected DcObject getItem() {
        FacesContext fc = FacesContext.getCurrentInstance();
        VariableResolver vr = fc.getApplication().getVariableResolver();
        DcWebObject wo = (DcWebObject) vr.resolveVariable(fc, "webObject");
        return wo.getDcObject();
    }
View Full Code Here

     *
     * @param name The name of the validator
     */
    public static ValidatorResources getValidatorResources()
    {
        final FacesContext context = FacesContext.getCurrentInstance();
        final ExternalContext external = context.getExternalContext();
        final Map applicationMap = external.getApplicationMap();
        ValidatorResources validatorResources = (ValidatorResources)applicationMap.get(VALIDATOR_RESOURCES_KEY);
        if (validatorResources == null)
        {
            final String rulesResource = RULES_LOCATION;
View Full Code Here

     * @throws ClassNotFoundException
     */
    private Class getValidatorClass()
        throws ClassNotFoundException
    {
        final FacesContext context = FacesContext.getCurrentInstance();
        final ExternalContext external = context.getExternalContext();
        final Map applicationMap = external.getApplicationMap();
        final String validatorClassName = this.validatorAction.getClassname();
        Class validatorClass = (Class)applicationMap.get(validatorClassName);
        if (validatorClass == null)
        {
View Full Code Here

    {
        Class type = null;
        ValueBinding binding = getValueBinding(name);
        if (binding != null)
        {
            final FacesContext context = this.getFacesContext();
            type = binding.getType(context);
        }
        return type;
    }
View Full Code Here

     */
    public static String get(
        String key,
        Object[] arguments)
    {
        FacesContext context = FacesContext.getCurrentInstance();
        String resourceString;
        try
        {
            final ResourceBundle bundle = ResourceBundle.getBundle(
                    BUNDLE_NAME,
                    context.getViewRoot().getLocale());
            resourceString = bundle.getString(key);
            if (arguments != null)
            {
                final MessageFormat format = new MessageFormat(resourceString,
                        context.getViewRoot().getLocale());
                resourceString = format.format(arguments);
            }
        }
        catch (final MissingResourceException exception)
        {
View Full Code Here

        final String attributeValue = this.client;
        if (attributeValue != null)
        {
            if (UIComponentTag.isValueReference(this.client))
            {
                final FacesContext context = FacesContext.getCurrentInstance();
                final Application application = context.getApplication();
                final ValueBinding binding = application.createValueBinding(attributeValue);
                component.setValueBinding(
                    attributeName,
                    binding);
            }
View Full Code Here

     *
     * @param component The component whose properties we're setting
     */
    public void setProperties(final UIComponent component)
    {
        final FacesContext context = this.getFacesContext();
        ComponentUtils.setValueProperty(context, component, this.getValue());
        ComponentUtils.setStringProperty(BinaryFile.FILE_NAME_ATTRIBUTE, context, component, this.getFileName());
        ComponentUtils.setStringProperty(BinaryFile.CONTENT_TYPE_ATTRIBUTE, context, component, this.getContentType());
        ComponentUtils.setBooleanProperty(BinaryFile.PROMPT_ATTRIBUTE, context, component, this.getPrompt());
        super.setProperties(component);
View Full Code Here

          this.characterEncoding = characterEncoding;
        }
        else {
          this.characterEncoding = DEFAULT_CHARACTER_ENCODING; 
        }
        FacesContext facesContext = FacesContext.getCurrentInstance();
        String prettryRenderedValue = facesContext.getExternalContext().getInitParameter(KitConstants.PRETTY_RENDERED);
        this.mustPrettyRender = "true".equals(prettryRenderedValue);
    }
View Full Code Here

TOP

Related Classes of javax.faces.context.FacesContext

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.