Examples of IDataComposer


Examples of org.hdiv.dataComposer.IDataComposer

   * @see org.hdiv.dataComposer.IDataComposer#composeFormField(String, String, boolean, String)
   */
  public int doStartTag() throws JspException {

    HttpServletRequest request = (HttpServletRequest) this.pageContext.getRequest();
    IDataComposer dataComposer = HDIVUtil.getDataComposer(request);

    // this property is editable and we must check it
    dataComposer.composeFormField(prepareName(), "", true, "textarea");

    return super.doStartTag();
 
View Full Code Here

Examples of org.hdiv.dataComposer.IDataComposer

   
    sb.append("<option value=\"");
    String cipheredValue = null;

    HttpServletRequest request = (HttpServletRequest) this.pageContext.getRequest();
    IDataComposer dataComposer = HDIVUtil.getDataComposer(request);
    cipheredValue = dataComposer.composeFormField(selectTag.getProperty(), value, false, null);

    if (filter) {
      sb.append(TagUtils.getInstance().filter(cipheredValue));
    } else {
      sb.append(cipheredValue);
View Full Code Here

Examples of org.hdiv.dataComposer.IDataComposer

   *             exception will be thrown.
   */
  public int doStartTag() throws JspException {

    HttpServletRequest request = (HttpServletRequest) this.pageContext.getRequest();
    IDataComposer dataComposer = HDIVUtil.getDataComposer(request);

    String action = (String) this.getValue("action");
    String parameter = (String) this.getValue("parameter");
    String value = (String) this.getValue("value");

    String cipheredValue;
    if (action != null) {
      cipheredValue = dataComposer.compose(action, parameter, value, false);
    } else {
      cipheredValue = dataComposer.compose(parameter, value, false);
    }

    try {
      // getJspWriter to output content
      JspWriter out = this.pageContext.getOut();
View Full Code Here

Examples of org.hdiv.dataComposer.IDataComposer

  }

  public void testProcessFormThymeleafOrder() {

    HttpServletRequest request = HDIVUtil.getHttpServletRequest();
    IDataComposer dataComposer = this.dataComposerFactory.newInstance(request);
    HDIVUtil.setDataComposer(dataComposer, request);

    dataComposer.startPage();

    String action = "/testAction.do";

    // 1. the action url
    String result = this.dataValueProcessor.processAction(request, action);
    // Post urls are not modified
    assertEquals(action, result);

    // 2. Hidden field
    Map<String, String> extraParams = this.dataValueProcessor.getExtraHiddenFields(request);

    assertNotNull(extraParams);
    assertTrue(extraParams.size() == 1);
    String hdivStateParam = (String) request.getSession().getAttribute(Constants.HDIV_PARAMETER);
    String stateValue = extraParams.get(hdivStateParam);
    assertNotNull(stateValue);

    // 3. form parameters
    String val = this.dataValueProcessor.processFormFieldValue(request, "param", "value", "select");
    assertEquals("0", val);

    val = this.dataValueProcessor.processFormFieldValue(request, "param1", "value1", "text");
    assertEquals("value1", val);

    dataComposer.endPage();

    // Restore state
    IState state = stateUtil.restoreState(stateValue);
    assertNotNull(state);
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.