Package org.hdiv.dataComposer

Examples of org.hdiv.dataComposer.IDataComposer


  }

  public void testRestore() {

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

    dataComposer.startPage();
    dataComposer.beginRequest("GET", "test.do");
    dataComposer.compose("parameter1", "2", false);
    String stateId = dataComposer.endRequest();
    dataComposer.endPage();

    assertNotNull(stateId);

    IState restored = this.stateUtil.restoreState(stateId);
View Full Code Here


  }

  public void testRestoreIncorrectStateId() {

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

    try {
      IState restored = this.stateUtil.restoreState("1111-");
      assertNull(restored);
View Full Code Here

   * @exception JspException if a JSP exception has occurred
   */
  public int doEndTag() throws JspException {

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

    // Acquire the select tag we are associated with
    SelectTag selectTag = (SelectTag) findAncestorWithClass(this, SelectTag.class);
    if (selectTag == null) {
      // This tag should only be nested in an select tag
      // If it's not, throw exception
      JspException e = new JspException(messages.getMessage("optionTag.select"));
      TagUtils.getInstance().saveException(pageContext, e);
      throw e;
    }

    String cipheredValue = dataComposer.composeFormField(selectTag.getProperty(), value, false, null);

    // If there isn't any content in the body of the tag option, and there isn't
    // any value for the property key, the value of the property value is shown.
    // This is, the encoded value is shown. That is the reason why we store the
    // plain value, without encoding.
View Full Code Here

   * @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, null);

    return super.doStartTag();
  }
View Full Code Here

   * @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, "text");

    return super.doStartTag();
  }
View Full Code Here

   * @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, null);

    return super.doStartTag();
  }   
View Full Code Here

   * @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(), value, true, null);

    return super.doStartTag();
  }   
View Full Code Here

   * Adds HDIV state as parameter.
   */
  protected void addHDIVParameter() throws JspException {
   
    HttpServletRequest request = (HttpServletRequest) this.pageContext.getRequest();
    IDataComposer dataComposer = HDIVUtil.getDataComposer(request);
    if(!dataComposer.isRequestStarted()){
      return;
    }
    String requestId = dataComposer.endRequest();
   
    if (requestId.length() > 0) {
      String hdivParameter = (String) request.getSession().getAttribute(Constants.HDIV_PARAMETER);
      TagUtils.getInstance().write(pageContext, this.generateHiddenTag(hdivParameter, requestId));
    }   
View Full Code Here

        SelectTag selectTag = (SelectTag) pageContext.getAttribute(Constants.SELECT_KEY);           
     
        sb.append("<option value=\"");
       
        HttpServletRequest request = (HttpServletRequest) this.pageContext.getRequest();
    IDataComposer dataComposer = HDIVUtil.getDataComposer(request);
        String cipheredValue = dataComposer.composeFormField(selectTag.getProperty(), value, false, null);
       
        if (filter) {
            sb.append(TagUtils.getInstance().filter(cipheredValue));
        } else {
            sb.append(cipheredValue);
View Full Code Here

     * @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(), "", false, null);
   
    return super.doStartTag();
    }
View Full Code Here

TOP

Related Classes of org.hdiv.dataComposer.IDataComposer

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.