tomahawk

JSF: Dynamically change form

戏子无情 提交于 2019-11-27 17:18:52
问题 I want to build a form that dynamically changes the components visible depending on the state of other components. For example... There are some text boxes and some check boxes, and if the user activates a certain check box, a bunch of other input elements should appear. Can I do this with JSF 2.0 + Tomahawk or do I have to get another library to do this? And how can I do it? This won't work without AJAX, will it? Thanks in advance! 回答1: Ajax is a convenient way to do this and JSF 2.0 comes

Create and show thumbnail (byte[]) in JSF

雨燕双飞 提交于 2019-11-27 16:52:21
问题 I'm uploading image to server and when image is uploaded it should show me a thumb of uploaded image. Thumbnail is not saved on hard disc I use InputStream and OutputStream. For upload i'm ustig tomahawk. my index.jsp: <h:form id="uploadForm" enctype="multipart/form-data"> <t:inputFileUpload id="fileupload" accept="image/*" storage="file" value="#{fileUpload.uploadedFile}" styleClass="fileUploadInput" required="true" validator="epacient.FileUploadValidator" requiredMessage="Obvezna izbira