Package javax.faces.component.html

Examples of javax.faces.component.html.HtmlOutputText


                li.setTransient(true);
                li.setStyle("position: relative;width:" + comp.getHtmlfbitem().getWidth() + ";");
                formFiller.getFormContent().getChildren().add(li);
            }
        } else {
            HtmlOutputText output = new HtmlOutputText();
            output.setValue("ERROR: Model of form builder is null.");
            formFiller.getChildren().add(output);
        }
    }
View Full Code Here


*/
public class HtmlFormBuilderLabel extends HtmlFormBuilderItem {
   
    @Override
    public void renderView() {
        HtmlOutputText output = new HtmlOutputText();
        output.setValue(properties.getValues());
        getChildren().add(output);
    }
View Full Code Here

            }
            addLabeledComponent(output, input);
        } else {
            HtmlOutputLink downloadLink = new HtmlOutputLink();
            downloadLink.setValue("javascript: downloadFile('" + getDataUuid().substring(HtmlFormBuilderItem.DATA_UUID_PREFIX.length(), getDataUuid().length()) + "');");
            HtmlOutputText linkText = new HtmlOutputText();
            linkText.setValue(file.getFilename());
            downloadLink.getChildren().add(linkText);
            addLabeledComponent(output, downloadLink);
        }
    }
View Full Code Here

    protected void addIFrame(int width) {
        HtmlDiv div = new HtmlDiv();
        div.setStyle("margin:0;padding:0;position:relative;width:" + width + "px;");

        HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
        HtmlOutputText loadImage = new HtmlOutputText();
        loadImage.setEscape(false);
        loadImage.setValue("<div id=\"loadImg\" style=\"position:absolute; left: " + (width / 2 - 25) + "px; top: 200px;\">"
                + "<img width=\"50px\" height=\"50px\" src=\"" + request.getContextPath() + "/javax.faces.resource/formbuilder/images/ajaxReload.gif.xhtml\" />"
                + "</div>");
        div.getChildren().add(loadImage);

        iframe = new HtmlIFrame();
View Full Code Here

        contentHolder.getChildren().add(formContent);
       
        HtmlDiv mandatoryError = new HtmlDiv();
        mandatoryError.setId("mandatoryError");
        mandatoryError.setStyle("color: red;");
        HtmlOutputText mandatoryErrorText = new HtmlOutputText();
        mandatoryErrorText.setValue(Messages.getStringJSF("error.mandatory"));
        mandatoryError.getChildren().add(mandatoryErrorText);
       
        holder.getChildren().add(mandatoryError);
        holder.getChildren().add(contentHolder);
       
View Full Code Here

@SkipDialog
public class HtmlFormBuilderDownload extends HtmlFormBuilderItem {

    @Override
    public void renderView() {
        HtmlOutputText output = new HtmlOutputText();
        output.setValue(Messages.getStringJSF("download.label.default"));

        if (properties.getFile() == null || properties.getFile().getFilesize() == 0) {
            HtmlInputFile input = new HtmlInputFile();
            input.setId("download" + getItemUuid());
            addLabeledComponent(output, input);
            HtmlCommandButton submit = new HtmlCommandButton();
            submit.setValue(Messages.getStringJSF("download.submit"));
            getChildren().add(submit);
        } else {
            try {
                File tempFile = File.createTempFile(properties.getFile().getFilename(), "");
                try (FileOutputStream out = new FileOutputStream(tempFile)) {
                    out.write(properties.getFile().getFile());
                    out.flush();
                    out.close();
                }
                HtmlOutputText link = new HtmlOutputText();
                link.setEscape(false);
                HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
                link.setValue("<a target=\"_blank\" href=\"" + request.getContextPath() + "/" + FileServlet.FOLDER + "/" + tempFile.getName() + "\">" + properties.getFile().getFilename() + "</a>");
                getChildren().add(link);
            } catch (IOException ex) {
                Logger.getLogger(HtmlFormBuilderDownload.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
View Full Code Here

        addLabeledComponent(output, outputValue, null);
    }
   
    private UIComponent createLine(String text) {
        HtmlDiv div = new HtmlDiv();
        HtmlOutputText output = new HtmlOutputText();
        output.setEscape(false);
        output.setValue(text);
        div.getChildren().add(output);
        return div;
}
View Full Code Here

                    //Label
                    String labelText = property;
                    if (item.getPropertyTranslations().containsKey(property)) {
                        labelText = item.getPropertyTranslations().get(property);
                    }
                    HtmlOutputText label = new HtmlOutputText();
                    label.setValue(labelText);
                    grid.getChildren().add(label);

                    //Value
                    UIComponentBase comp = null;
                    if (item.getValueTranslations().containsKey(property)) {
View Full Code Here

       
    }

    @Override
    public void renderView() {
        HtmlOutputText output = new HtmlOutputText();
        output.setValue("--- " + Messages.getStringJSF("pagebreak") + " ---");
        output.setEscape(false);
        output.setTransient(true);
        getChildren().add(output);
    }
View Full Code Here

    public HtmlFormBuilderFormatArea() {
    }

    @Override
    public void renderView() {
        HtmlOutputText output = new HtmlOutputText();
        output.setValue("<div style=\"text-align: center; border-bottom: 1px solid black;\">" + properties.getValues() + "</div>");
        output.setEscape(false);
        output.setTransient(true);
        getChildren().add(output);
    }
View Full Code Here

TOP

Related Classes of javax.faces.component.html.HtmlOutputText

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.