bootsfaces

Download pdf file from Java web app made in JSF

和自甴很熟 提交于 2021-02-11 17:51:36
问题 Hello I have a Java web app made in JSF...when you press a button it should write a string in a pdf file and download it. Here is the code: String cont = "DATA CREARE: " + data_creare3 + "\n" + "CIF: " + cif3 + "\n" + "ID SOLICITARE: " + id_solicitare3 + "\n" + "DETALII" + detalii3 + "\n" + "TIP: " + tip3 + "\n" + "ID: " + id3; startDownload(cont.getBytes(), "id.pdf"); This is the String and the method being called and here is the function that makes the download.. private void startDownload

How to validate whether my form is valid from an oncomplete function in a b:commandButton?

扶醉桌前 提交于 2021-02-05 07:40:38
问题 I'm using bootsfaces 1.3.0 from maven repository and I'm trying to use this commandButton example that is in the docs (https://showcase.bootsfaces.net/forms/commandButton.jsf): <b:commandButton value="Ajax Modal" ajax="true" update="form:inform amodal" look="inverse" oncomplete="if(validationFailed) alert('Please enter valid input before opening the modal'); else $('#amodal').modal('show')" /> It fails because it says validationFailed is not defined. Could somebody help me with showing me how

BootsFaces selectMultiMenu does not render correctly

 ̄綄美尐妖づ 提交于 2020-02-05 11:55:19
问题 I'm on Mojarra 2.2.7, PrimeFaces 5.2, BootsFaces 0.7.0. I'm creating my first BootsFaces page. I've got it configured, resources are loaded and I was able to create a container with a panel with a b:inputText and a b:selectOneMenu . Now I would like to add a b:selectMultiMenu: <b:selectMultiMenu nonSelectedText="Please select"> <f:selectItem itemLabel="Option 1" itemValue="1"/> <f:selectItem itemLabel="Option 2" itemValue="2"/> <f:selectItem itemLabel="Option 3" itemValue="3"/> </b

BootsFaces selectMultiMenu does not render correctly

早过忘川 提交于 2020-02-05 11:43:32
问题 I'm on Mojarra 2.2.7, PrimeFaces 5.2, BootsFaces 0.7.0. I'm creating my first BootsFaces page. I've got it configured, resources are loaded and I was able to create a container with a panel with a b:inputText and a b:selectOneMenu . Now I would like to add a b:selectMultiMenu: <b:selectMultiMenu nonSelectedText="Please select"> <f:selectItem itemLabel="Option 1" itemValue="1"/> <f:selectItem itemLabel="Option 2" itemValue="2"/> <f:selectItem itemLabel="Option 3" itemValue="3"/> </b

How to transform a radio input form to radio input bootsfaces form?

馋奶兔 提交于 2020-01-16 04:55:08
问题 Is it possible to transform the next code to bootsfaces labels? <div class="radio"> <label><input type="radio" name="optradio"/>Option 1</label> </div> <div class="radio"> <label><input type="radio" name="optradio"/>Option 2</label> </div> Thank you! 回答1: Update July 18, 2016: Inspired by your question, I've started to implement a <b:radiobutton /> component that's more flexible than its standard JSF counterpart. It will be published with the next version of BootsFaces - probably 1.0, which

BootsFaces tag auto completion shows duplicate properties style-class and styleClass

爷,独闯天下 提交于 2019-12-12 02:08:04
问题 Check the below screeshot, why is there for instance style-class and styleClass ? I am using bootsfaces 0.9.0-SNAPSHOT 回答1: Both versions are identical. Most web designers prefer the style-class version for their CSS class names. CamelCase is a tradition of Java developers. We felt that it looks odd to use CamelCase among all these boot-strap-css-classes. So we decided to implement the hyphen version as an alternative to the traditional CamelCase attribute names of JSF. We hope that it allows

Using multiple AJAX calls on the same element Bootsfaces

杀马特。学长 韩版系。学妹 提交于 2019-12-12 00:44:37
问题 Can I do something like this: <b:navLink ... onclick="ajax:callBeanMethodA;ajax:callBeanMethodB" /> Like that doesn't work, is there any way to make it work ? Thanks 回答1: I guess your best bet it to combine these two or multiple method calls in a convenience method in your backing bean. This way you can also make sure, that they're called in a consistent order: public void combinedMethod() { callBeanMethodA(); callBeanMethodB(); } Then just call the single convenience method from your

Use ui:repeat with b:carousel?

烂漫一生 提交于 2019-12-11 00:09:50
问题 Environment: I'm working with JSF2.2, Bootsfaces 0.9.1, Primefaces 6.0, JEE7 and Hibernate 5.2 in combination with MySQL 5.7 DB. What I have: I've got a model which has a set of images. The set contains instances of my custom Image class which holds values for the Image like a title, description and the filename. The images are stored on the filesystem and I got the MySQL DB for storing the models. I tried to display images on a view in my webapp and everything works fine. I also displayed

Change the Locale and Language of the Bootfaces DataTable

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 06:22:00
I want to change the language of the elements of the BootsFaces b:dataTable. (ex: entries => entradas, next=>siguiente), Does anyone know how to do this? As Bonifacio mentioned, the DataTable widget of BootsFaces 0.8.x is still in its infancy. Currently, we're working hard to bring you all the features you need - internationalization included. Maybe you want to watch the discussion on our bug tracker ( https://github.com/TheCoder4eu/BootsFaces-OSP/issues/301 ). By the way, it's surprisingly simple to replace the BootsFaces dataTable by standard JSF 2.x code and a few lines of JavaScript: <h

Bootsfaces page shows up in browser without any styling

无人久伴 提交于 2019-12-02 17:49:18
问题 I have created a simple JSF project in eclipse running on Tomcat, I tried including the Bootsfaces jar in /WEB-INF/lib and including the tags in my xhtml page (as shown in the Bootsfaces getting started page) ,but that does not seem to be work, I simply get the text without any styling. 回答1: We've had a lot of trouble with this. I suspect it was the fault of the HeadRenderer in former BootsFaces versions. We've replaced the offending class by a different solution in BootsFaces 0.6.5. If the