Integrating third party Bootstrap CSS themes with Bootsfaces - jsf

I seem to have reached a conundrum in integrating this third party Bootstrap theme within bootsfaces. Currently what I'm trying to do is include the css/js files within the xhtml files, but that doesn't seem to display any styling or show any references to the css files when inspecting the page. Will I need to build bootsfaces from source? Any help would be greatly appreciated

Starting with BootsFaces 0.8.0, we (the BootsFaces team) have added full-blown theme support. This include the default theme, 16 Bootswatch themes which are included in the library, and arbitrary custom themes. Read the details on our showcase.
However, in earlier versions (i.e. BootsFaces 0.7.0 and below) it was a bit more difficult to get custom or third-party themes up and running. Therefore, I recommend updating to BootsFaces 0.8.x, if you're still using an older version.
Update Dec 6, 2015: Forget about my former answer. BootsFaces theming works a bit different than I thought. We've changed it in the soon-to-come BootsFaces 0.8.0, anyways. I'll update my answer as soon as I'll have worked out the details.
The default Bootstrap theme of BootsFaces is a simple file (bsf.css). If you don't activate it in the web.xml, BootsFaces runs without any theme. So your approach should work: simply add the CSS file to your XHTML page, and you're good to go. You don't have to compile BootsFaces from source.

Related

XPages - extlib 9.0.1v12 and JQuery 2.11

I have always used in my projects the latest version of the extension library for 9.01v12 9.0.1fp3 Domino
Everything works properly and well . But in this scenario, I have a large number of clients , with the terrible IE8 browser :-(
The problem is that JQuery 2.x broke support IE8 and I see errors in the code JS code JQuery .
If I try to manually put the 1.X version of JQuery everything works properly .
But the problem is that I use version EXTLIB bootstrap right now and everything is calculated and drawn on in runtime .
Do you have ideas ?
It would be enough to actually enter the following syntax in nell'extlib bootstrap Theme (upload too the JQuery 1.11.3), but I don't know how.
<resource rendered="#{javascript:context.getUserAgent().isIE(0,8)}">
<content-type>application/x-javascript</content-type>
<href>/.ibmxspres/.extlib/responsive/jquery/jquery-1.11.3.min.js</href>
</resource>
Some suggest ?
As you already said JQuery 2.x drops support for IE 8 and lower. To support IE 8 and lower, you will have to use jQuery 1.x.
I think you will have to load Bootstrap manually, and won't be able to take advantage of the latest ExtLib with built in Bootstrap. When I say manually, I mean before the latest ExtLib, the way you used to do it. You can still use the Bootstrap4Xpages openNTF project if you like, as it uses jQuery 1.11 and Bootstrap 3.2.
I wouldn't recommend using both jQuery versions in the same application. But with that being said, you asked if you can try loading the old jQuery for IE8 only. I would say that it is worth a try, but I would be surprised if everything just worked in new and old browsers.
I would also recommend storing your bootstrap code in your NSF as a resource if you are not already.
If you are forced to use bootstrap with IE 8, there will be cool things that you just won't be able to do. This was true even with version 2.3 of Bootstrap. As someone who has to support IE 8, I feel your pain.
The bottom line is that I think you are stuck doing this the old way.

Add CKEditor add-ons to <pe:ckEditor>

I am using PrimeFaces Extensions <pe:ckEditor> which is basically a server side JSF component which generates the necessary HTML/CSS/JS code output for CKEditor. It works fine, however I have a new requirement which requires me to use either the PBCKCODE or the syntaxhighlighter add-on of CKEditor.
I have successfully created a customized version with those add-ons from their website. However, I have no clue how to integrate those add-ons in <pe:ckEditor>. How can I integrate those add-ons in <pe:ckEditor>?
Is there any reason why you don't want to use the CKEditor directly in stead of using it through pe:ckEditor? At least thats what I did in our project.

IceFaces and PrimeFaces portlets on the same Liferay page

I have portlets written on IceFaces 1.8.2.
Since I found PrimeFaces better I decided to write my new portlet with JSF2 and PrimeFaces 3.5.
Separately everything is working. But when I'm trying to put my PrimeFaces portlet and IceFaces portlet on one page PrimeFaces doesn't work.
UI is more or less alright, but there are a lot of mistakes in javascript.
Can I solve this problem somehow?
I'm using Liferay 6.0.6
Do not include Primefaces and Icefaces portlets on the same portal page!
Since they both rely on jQuery, they will both include (potentially different versions of) jQuery on the page which will cause javascript conflicts. There may be workarounds for this (although I don't know of any), but it is an extremely bad idea.

Visual JSF Designer

Please can any one tell me from where I can have Visual JSF designer that can be integrated with Eclipse ?
And Why netbeas doesn't have this functionality
I know that Myeclipse provides this ability, but it;s just run on 32-bit in addition it's not free.
Thanks in advance.
If you have the Dynamic Web Module facet and JavaServer Faces facet added on your project, right click on the page you want and choose Open with -> Web Page Editor.
That works only with pure JSF tags, not with third party library ones like Primefaces. You can also go through JSF Web Page Designer, but not sure how it will work since it looks it's not updated since long time ago.

Primefaces 2.2.1 with FileUpload from Primefaces 3.0

Related to the last comment on this question, i would like to know if anyone managed to use the HTML5-Fileupload of Primefaces 3.0 with an older Primefaces version.
We have a lot of trouble with the old flash-version of the fileupload.
I know that the best option would be to update the whole project to the new primefaces version but it´s not possible for this project.
This is not going to be trivial. That you're already asking this question already indicates that it's going to be a long journey. I'd rather use a barebones and to-the-point file upload component of another component library such as Tomahawk's <t:inputFileUpload>. It only doesn't support asynchronous uploading and you need to make the submit button of the form a non-ajax one, but it does the job you want it to do without much hassle.
You can find in this answer detailed step-by-step instructions how to integrate and use it in your project: JSF 2.0 File upload. In case of PrimeFaces, you only need to make sure that you have removed PrimeFaces' own file upload filter from the web.xml, otherwise it would consume the uploaded file before Tomahawk's own filter get the chance.
Thats very difficult, I have many problems with fileupload and finally migate to 3.0 but witch are problems?.
If you wanna to change fileupload you will can change source code in library is not very smarted if you desnt know jquery ui o you can use other framework or use directly.
http://www.matlus.com/html5-file-upload-with-progress/
good luck

Resources