Package javax.faces.el

Examples of javax.faces.el.PropertyResolver


    protected String detectActiveJsfVersion()
    {
        //In JSF 1.2+ this artifact isn't wrapped by custom implementations (because it's deprecated)
        //-> usually it's the version of the implementation
       
        @SuppressWarnings({"deprecation"})
        PropertyResolver anyJsfClass = FacesContext.getCurrentInstance().getApplication().getPropertyResolver();

        if(anyJsfClass == null)
        {
            return null;
        }

        String version = ClassUtils.getJarVersion(anyJsfClass.getClass());

        String description = "Used JSF implementation: ";

        if(anyJsfClass.getClass().getName().startsWith("org.apache.myfaces"))
        {
            return description + "MyFaces Core v" + version;
        }
        else if(anyJsfClass.getClass().getName().startsWith("com.sun.faces"))
        {
            return description + "Mojarra v" + version;
        }
        return null;
    }
View Full Code Here


    }

    @Test
    public void testGetPropertyResolver() throws Exception
    {
        PropertyResolver resolver = _mocksControl.createMock(PropertyResolver.class);
        expect(_runtimeConfig.getPropertyResolver()).andReturn(resolver).anyTimes();
        _mocksControl.replay();
        _testImpl.addFromRuntimeConfig(_resolvers);
        _mocksControl.verify();
       
View Full Code Here

    }

    @Test
    public void testGetPropertyResolverChainHead() throws Exception
    {
        PropertyResolver resolver = _mocksControl.createMock(PropertyResolver.class);
        EasyMock.expect(_runtimeConfig.getPropertyResolverChainHead()).andReturn(resolver).anyTimes();
        _mocksControl.replay();
        _testImpl.addFromRuntimeConfig(_resolvers);
        _mocksControl.verify();
       
View Full Code Here

    }

    @Test
    public void testGetPropertyResolver() throws Exception
    {
        PropertyResolver resolver = _mocksControl.createMock(PropertyResolver.class);
        expect(_runtimeConfig.getPropertyResolver()).andReturn(resolver).anyTimes();
        _mocksControl.replay();
        _testImpl.addFromRuntimeConfig(_resolvers);
        _mocksControl.verify();
       
View Full Code Here

    }

    @Test
    public void testGetPropertyResolverChainHead() throws Exception
    {
        PropertyResolver resolver = _mocksControl.createMock(PropertyResolver.class);
        EasyMock.expect(_runtimeConfig.getPropertyResolverChainHead()).andReturn(resolver).anyTimes();
        _mocksControl.replay();
        _testImpl.addFromRuntimeConfig(_resolvers);
        _mocksControl.verify();
       
View Full Code Here

    }

    @Test
    public void testGetPropertyResolver() throws Exception
    {
        PropertyResolver resolver = _mocksControl.createMock(PropertyResolver.class);
        expect(_runtimeConfig.getPropertyResolver()).andReturn(resolver).anyTimes();
        _mocksControl.replay();
        _testImpl.addFromRuntimeConfig(_resolvers);
        _mocksControl.verify();
       
View Full Code Here

    }

    @Test
    public void testGetPropertyResolverChainHead() throws Exception
    {
        PropertyResolver resolver = _mocksControl.createMock(PropertyResolver.class);
        EasyMock.expect(_runtimeConfig.getPropertyResolverChainHead()).andReturn(resolver).anyTimes();
        _mocksControl.replay();
        _testImpl.addFromRuntimeConfig(_resolvers);
        _mocksControl.verify();
       
View Full Code Here

      tree.setRowIndex(i);
      if (viewIdProperty != null)
      {
        Object focusPath = tree.getRowKey();
        Object data = tree.getRowData();
        PropertyResolver resolver =
          context.getApplication().getPropertyResolver();
        Object viewIdObject = resolver.getValue(data, viewIdProperty);
        focusPathMap.put(viewIdObject, focusPath);
      }
      else
      {
        _LOG.warning("NULL_VIEWID");
View Full Code Here

    protected String detectActiveJsfVersion()
    {
        //In JSF 1.2+ this artifact isn't wrapped by custom implementations (because it's deprecated)
        //-> usually it's the version of the implementation
       
        @SuppressWarnings({"deprecation"})
        PropertyResolver anyJsfClass = FacesContext.getCurrentInstance().getApplication().getPropertyResolver();

        if(anyJsfClass == null)
        {
            return null;
        }

        String version = ClassUtils.getJarVersion(anyJsfClass.getClass());

        String description = "Used JSF implementation: ";

        if(anyJsfClass.getClass().getName().startsWith("org.apache.myfaces"))
        {
            return description + "MyFaces Core v" + version;
        }
        else if(anyJsfClass.getClass().getName().startsWith("com.sun.faces"))
        {
            return description + "Mojarra v" + version;
        }
        return null;
    }
View Full Code Here

            else
            {
                Object[] baseAndProperty = (Object[]) base_;
                Object base      = baseAndProperty[0];
                Object property  = baseAndProperty[1];
                PropertyResolver propertyResolver =
                    _application.getPropertyResolver();

                Integer index = ELParserHelper.toIndex(base, property);
                if (index == null)
                {
                    propertyResolver.setValue(
                        base, property, newValue);
                }
                else
                {
                    int indexVal = index.intValue();
                    propertyResolver.setValue(
                        base, indexVal, newValue);
                }
            }
        }
        catch (IndexOutOfBoundsException e)
View Full Code Here

TOP

Related Classes of javax.faces.el.PropertyResolver

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.