Examples of IParameter


Examples of org.hdiv.state.IParameter

   */
  public void mergeParameters(String oldParameter, String newParameter) {

    // Get actual IState
    IState state = this.getStatesStack().peek();
    IParameter storedParameter = state.getParameter(oldParameter);

    if (storedParameter.getValues().size() > 0) {

      IParameter parameter = this.composeParameter(newParameter, storedParameter.getValuePosition(0), false, "",
          false, Constants.ENCODING_UTF_8);

      String currentValue = null;
      // We check the parameters since the second position because the first
      // value has been used to create the parameter
      for (int i = 1; i < storedParameter.getValues().size(); i++) {

        currentValue = storedParameter.getValuePosition(i);
        parameter.addValue(currentValue);
      }
    }
  }
View Full Code Here

Examples of org.hdiv.state.IParameter

    IPage page = new Page();
    page.setId(20);

    IState state = new State(0);
    state.setAction("/action");
    IParameter param = new Parameter("name", "value", false, null, true);
    state.addParameter(param);
    page.addState(state);

    session.addPage("20", page);
View Full Code Here

Examples of org.hdiv.state.IParameter

    IPage page = new Page();
    page.setId(20);

    IState state = new State(0);
    state.setAction("/action");
    IParameter param = new Parameter("name", "value", false, null, true);
    state.addParameter(param);
    page.addState(state);

    session.addPage("20", page);
View Full Code Here

Examples of org.hdiv.state.IParameter

    IPage page = new Page();
    page.setId(20);

    IState state = new State(0);
    state.setAction("/action");
    IParameter param = new Parameter("name", "value", false, null, true);
    state.addParameter(param);
    page.addState(state);

    session.addPage("20", page);
View Full Code Here

Examples of org.hdiv.state.IParameter

    // Restore state
    IState state = this.stateUtil.restoreState(state2);

    // State contains both parameters
    IParameter param = state.getParameter("parameter1");
    String val = param.getValues().get(0);
    assertEquals("1", val);

    param = state.getParameter("parameter2");
    val = param.getValues().get(0);
    assertEquals("2", val);
  }
View Full Code Here

Examples of org.hdiv.state.IParameter

    IState state = this.stateUtil.restoreState(stateId);

    assertEquals("test.do", state.getAction());

    IParameter param = state.getParameter("parameter1");
    List<String> values = param.getValues();
    assertEquals(1, values.size());
    assertEquals("è-test", values.get(0));// escaped value is the same

    IParameter param2 = state.getParameter("parameterEscaped");
    List<String> values2 = param2.getValues();
    assertEquals(1, values2.size());
    // State stored value is not escaped value, it is the unescaped value
    assertEquals("è-test", values2.get(0));
  }
View Full Code Here

Examples of org.hdiv.state.IParameter

    IState state = this.stateUtil.restoreState(stateId);

    assertEquals("test.do", state.getAction());

    IParameter param = state.getParameter("parameter1");
    List<String> values = param.getValues();
    assertEquals(0, values.size());
  }
View Full Code Here

Examples of org.hdiv.state.IParameter

    IState state = this.stateUtil.restoreState(stateId);

    assertEquals("test.do", state.getAction());

    IParameter param = state.getParameter("parameter1");
    List<String> values = param.getValues();
    assertEquals(1, values.size());
    assertEquals("è-test", values.get(0));// escaped value is the same

    IParameter param2 = state.getParameter("parameterEscaped");
    List<String> values2 = param2.getValues();
    assertEquals(1, values2.size());
    // State stored value is not escaped value, it is the unescaped value
    assertEquals("è-test", values2.get(0));
  }
View Full Code Here

Examples of org.hdiv.state.IParameter

    IState state = this.stateUtil.restoreState(stateId);

    assertEquals("test.do", state.getAction());

    IParameter param = state.getParameter("parameter1");
    List<String> values = param.getValues();
    assertEquals(0, values.size());
  }
View Full Code Here

Examples of org.hdiv.state.IParameter

    // Restore state
    IState state = this.stateUtil.restoreState(stateId);

    // State contains both parameters
    IParameter param = state.getParameter("parameter1");
    String val = param.getValues().get(0);
    assertEquals("1", val);

    param = state.getParameter("parameter2");
    val = param.getValues().get(0);
    assertEquals("2", val);
  }
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.