Examples of VariablesMap


Examples of net.l3x.faces.freeway.templating.jsf.VariablesMap

  public VariablesMapWrapper(VariablesMap target) {
    this.target = target;
  }

  public VariablesMap copy() {
    VariablesMap map = new VariablesMapWrapper(target.copy());
    map.putAll(variables);
    return map;
  }
View Full Code Here

Examples of net.l3x.faces.freeway.templating.jsf.VariablesMap

    }
    return template;
  }
 
  private JsfTemplate createTemplate(VariablesMap parentVariables) {
    VariablesMap newVariables = makeVariablesMap(parentVariables);
    setDefaultVariables(newVariables);
    SmartCopyingVariablesWrapper smartVariables = new SmartCopyingVariablesWrapper(newVariables);
    List<TemplateSpot> spots = new ArrayList<TemplateSpot>();
    for (TemplateComponent child : children) {
      spots.add(new TemplateSpot(child.asUIComponent().getId(), child.makeTemplate(smartVariables)));
View Full Code Here

Examples of net.l3x.faces.freeway.templating.jsf.VariablesMap

    return initialVariables;
  }
 
  protected void overrideChildren(JsfTemplate targetTemplate, VariablesMap parentVariables) {
    overrideVariables(targetTemplate.getVariables());
    VariablesMap compositeVariables = makeCompositeVariablesMap(targetTemplate, parentVariables);
    TemplateList<JsfTemplate> targetChildren = targetTemplate.getChildren();
    for (TemplateComponent child : children) {
      JsfTemplate childTemplate = child.makeTemplate(compositeVariables);
      TemplateList<JsfTemplate> targetSubList = targetChildren.subListByName(childTemplate.getName());
      if (targetSubList.size() == 0) {
View Full Code Here

Examples of org.apache.onami.configuration.variables.VariablesMap

    }

    @Override
    protected void configure()
    {
        final VariablesMap variablesMap = new VariablesMap( parser );

        for ( final Element element : elements )
        {
            element.acceptVisitor( new DefaultElementVisitor<Void>()
            {

                @Override
                public <T> Void visit( Binding<T> binding )
                {
                    Key<?> bindingKey = binding.getKey();

                    if ( stringLiteral.equals( bindingKey.getTypeLiteral() )
                            && bindingKey.getAnnotation() != null
                            && ( Named.class.isAssignableFrom( bindingKey.getAnnotationType() )
                                            || javax.inject.Named.class.isAssignableFrom( bindingKey.getAnnotationType() ) ) )
                    {
                        String propertyKey;

                        if ( Named.class.isAssignableFrom( bindingKey.getAnnotationType() ) )
                        {
                            propertyKey = ( (Named) bindingKey.getAnnotation() ).value();
                        }
                        else
                        {
                            propertyKey = ( (javax.inject.Named) bindingKey.getAnnotation() ).value();
                        }

                        String propertyValue = (String) binding.getProvider().get();

                        variablesMap.put( propertyKey, propertyValue );
                    }

                    return super.visit( binding );
                }

            });
        }

        for ( Entry<String, String> variable : variablesMap.entrySet() )
        {
            bindConstant().annotatedWith( named( variable.getKey() ) ).to( variable.getValue() );
        }
    }
View Full Code Here

Examples of org.apache.onami.configuration.variables.VariablesMap

     * Set up some variables use cases to test on
     */
    @Before
    public void setUp()
    {
        variablesMap = new VariablesMap( new AntStyleParser() );

        variablesMap.put( "prop.1", "One" );
        variablesMap.put( "prop.2", "Two" );
        variablesMap.put( "prop.3", "Three" );
        variablesMap.put( "found", "I'm here" );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.