Package com.liferay.faces.alloy.component.inputfile.internal

Examples of com.liferay.faces.alloy.component.inputfile.internal.InputFileDelegationResponseWriter


    // Otherwise, if the component should show the preview table, then
    else if (inputFile.isShowPreview()) {

      // Delegate writing of the entire <input type="file"...> ... </input> element to the delegate renderer.
      DelegationResponseWriter delegationResponseWriter = new InputFileDelegationResponseWriter(responseWriter,
          inputFile.isAuto());
      super.encodeMarkupEnd(facesContext, uiComponent, delegationResponseWriter);

      // Format the preview-table.html template and write it to the response.
      Locale locale = facesContext.getViewRoot().getLocale();
      String clientId = uiComponent.getClientId(facesContext);
      PreviewTableTemplate previewTableTemplate = getPreviewTableTemplate(facesContext);
      String previewTableHTML = previewTableTemplate.format(locale, clientId, false);
      responseWriter.write(previewTableHTML);

      // Finish encoding of the outermost <div> element.
      responseWriter.endElement(StringPool.DIV);
    }

    // Otherwise, delegate writing of the entire <input type="file"...> ... </input> element to the delegate
    // renderer.
    else {
      DelegationResponseWriter delegationResponseWriter = new InputFileDelegationResponseWriter(responseWriter,
          inputFile.isAuto());
      super.encodeMarkupEnd(facesContext, uiComponent, delegationResponseWriter);
    }
  }
View Full Code Here

TOP

Related Classes of com.liferay.faces.alloy.component.inputfile.internal.InputFileDelegationResponseWriter

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.